]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/fshelp: Avoid possible NULL pointer deference
authorAndrew Hamilton <adhamilt@gmail.com>
Thu, 22 May 2025 03:20:41 +0000 (22:20 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 29 May 2025 13:45:24 +0000 (15:45 +0200)
commitb71bc0f8b4d62bdb04cedc44cb0864616a11d90f
tree0edb2e2f377a050a35fca8b8f1b5ac7718b9841e
parent272ff81cb291437211047f2402ff20aaa1c6bcf6
fs/fshelp: Avoid possible NULL pointer deference

Avoid attempting to defererence a NULL pointer to call read_symlink() when
the given filesystem does not provide a read_symlink() function. This could
be triggered if the calling filesystem had a file marked as a symlink.
This appears possible for HFS and was observed during fuzzing of NTFS.

Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/fshelp.c