Bug 2300401 (CVE-2024-41034)

Summary: CVE-2024-41034 kernel: nilfs2: fix kernel bug on rename operation of broken directory
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, rhel-process-autobot, vkumar, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.19.318, kernel 5.4.280, kernel 5.10.222, kernel 5.15.163, kernel 6.1.100, kernel 6.6.41, kernel 6.9.10, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
The Linux kernel vulnerability in `nilfs2` related to the `rename` operation has been resolved. The issue arose when attempting to rename a directory in the `nilfs2` file system, where `nilfs_dotdot()` might return an entry location exceeding the folio/page size for broken directories, leading to a `BUG_ON` failure.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2301535    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-29 15:32:05 UTC
In the Linux kernel, the following vulnerability has been resolved:

nilfs2: fix kernel bug on rename operation of broken directory

Syzbot reported that in rename directory operation on broken directory on
nilfs2, __block_write_begin_int() called to prepare block write may fail
BUG_ON check for access exceeding the folio/page size.

This is because nilfs_dotdot(), which gets parent directory reference
entry ("..") of the directory to be moved or renamed, does not check
consistency enough, and may return location exceeding folio/page size for
broken directories.

Fix this issue by checking required directory entries ("." and "..") in
the first chunk of the directory in nilfs_dotdot().

Comment 1 Mauro Matteo Cascella 2024-07-30 08:59:16 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072922-CVE-2024-41034-7593@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-30 08:59:36 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301535]