diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-13 09:15:00 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-13 21:39:18 +0900 |
| commit | 04fb910da2c857cdf99a331c576c3e5e7197c6dd (patch) | |
| tree | 80941fd7fe026e182195c04b9180500c42fce6e8 /tools/lib/python | |
| parent | 771bec7d9b8bacf0057e6cd7cf465bf3152c7df9 (diff) | |
| download | linux-next-04fb910da2c857cdf99a331c576c3e5e7197c6dd.tar.gz linux-next-04fb910da2c857cdf99a331c576c3e5e7197c6dd.zip | |
ntfs: fix NULL dereference on index allocation open failure
ntfs_index_lookup() returns -ENOENT when ntfs_ia_open() fails to open the
index allocation. This error path leaves icx->ib unset, unlike a missing
key in an otherwise valid index, which returns an insertion context.
ntfs_ie_add() treats -ENOENT as a valid insertion position and dereferences
icx->ib when the lookup is not in the index root. A corrupt $I30 bitmap
attribute can therefore cause a NULL pointer dereference when adding a
directory entry.
Return -EIO for index allocation open failures so insertion aborts through
the existing error path. Keep -ENOENT for genuinely missing keys and
document that other errors leave no valid index entry.
Fixes: 0a8ac0c1fa0b ("ntfs: update directory operations")
Reported-by: 1sh1ro <yangguikun19@qq.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
