fs/hfsplus: Set a grub_errno if mount fails
authorB Horn <b@horn.uk>
Sun, 12 May 2024 05:22:51 +0000 (06:22 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit65999e4a4dac0035b19dc87e4ad0a3392b4c8999
treefc87464ccf10fab3815eea35fba591798b4b6e53
parent703e9c14b99f3efb2543a0c24a7e699aabc0e5bc
fs/hfsplus: Set a grub_errno if mount fails

It was possible for mount to fail but not set grub_errno. This led to
a possible double decrement of the module reference count if the NULL
page was mapped.

Fixing in general as a similar bug was fixed in commit 61b13c187
(fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there
are likely more variants around.

Fixes: CVE-2024-45783
Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-hfsplus-Set-a-grub_errno-if-mount-fails.patch
grub-core/fs/hfsplus.c