[MDEV-221] memcmp() in filename_to_tablename can read past the end of the input string Created: 2012-04-15  Updated: 2012-04-16  Resolved: 2012-04-16

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.22, 5.5.23
Fix Version/s: 5.5.24

Type: Bug Priority: Minor
Reporter: Vladislav Vaintroub Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

The code in question is

if (!memcmp(from, tmp_file_prefix, tmp_file_prefix_length))

The problem here is that 'from' can have length < 4 (=tmp_file_prefix_length), and there might be anything past the end of from, for example another page with unmapped memory

The problem is found with Windows Application verifier, that tweaks heap allocations in a way that they are places at the end of the page. Quite a lot of innodb tests crash in this function, when mysqld is run under application verifier.


Generated at Thu Feb 08 06:27:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.