diff options
| author | Allan ELKAIM <[email protected]> | 2026-07-13 16:22:45 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-07-24 18:39:29 -0600 |
| commit | 57e0bb7bf00dadd7537f93609afb955108ce22c7 (patch) | |
| tree | 3243889f2de6d51a4ae553c70c016f136896756f /doc/develop | |
| parent | 9a9d46cb5e1a8f600c52f3ddaeaca8d4f28f66ee (diff) | |
fs/squashfs: add sqfs_dir_offset() error checks
sqfs_dir_offset() returns a negative errno on failure, but three
call sites in sqfs_search_dir() use the return value as an array
index without checking for errors first. If the lookup fails,
dirs->table is set to an invalid address, leading to undefined
behavior.
Add negative-value guards after each sqfs_dir_offset() call so
that any lookup failure propagates cleanly as an error rather
than producing incorrect results.
Note: the corresponding sqfs_find_inode() NULL checks and the
heap exhaustion fix during symlink resolution are applied in
separate patches.
Acked-by: Miquel Raynal <[email protected]>
Reviewed-by: Richard Genoud <[email protected]>
Signed-off-by: Allan ELKAIM <[email protected]>
Diffstat (limited to 'doc/develop')
0 files changed, 0 insertions, 0 deletions
