diff options
| author | Desmond Cheong Zhi Xi <[email protected]> | 2021-06-28 19:33:52 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-06-29 10:53:45 -0700 |
| commit | d98e4d95411bbde2220a7afa38dcc9c14d71acbe (patch) | |
| tree | 687751da151621e051978d74da3841722ee01f6f /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | c1c9142004e7e21d6d3d2cd6a339845771ce6a27 (diff) | |
ntfs: fix validity check for file name attribute
When checking the file name attribute, we want to ensure that it fits
within the bounds of ATTR_RECORD. To do this, we should check that (attr
record + file name offset + file name length) < (attr record + attr record
length).
However, the original check did not include the file name offset in the
calculation. This means that corrupted on-disk metadata might not caught
by the incorrect file name check, and lead to an invalid memory access.
An example can be seen in the crash report of a memory corruption error
found by Syzbot:
https://syzkaller.appspot.com/bug?id=a1a1e379b225812688566745c3e2f7242bffc246
Adding the file name offset to the validity check fixes this error and
passes the Syzbot reproducer test.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Desmond Cheong Zhi Xi <[email protected]>
Reported-by: [email protected]
Tested-by: [email protected]
Acked-by: Anton Altaparmakov <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions