ext4: fix buffer_head leak in ext4_init_orphan_info
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.221, 6.1.188, 6.6.157, 6.12.110, 6.18.52, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: ext4: fix buffer_head leak in ext4_init_orphan_info ext4_init_orphan_info() reads orphan file blocks with ext4_bread() and stores the returned buffer_head in oi->of_binfo[i].ob_bh. If ext4_bread() succeeds but the orphan block magic or checksum validation fails, the function jumps to out_free. However, the old out_free loop starts releasing buffers from i - 1, so the current buffer_head at index i is skipped. This leaks the buffer_head reference obtained by ext4_bread() on the bad magic and bad checksum error paths. Fix this by tracking the number of successfully read buffer_heads and releasing exactly those buffer_heads on the error path.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in a9a6ec1298f9bc134b2c5db27d25bb10603b7113; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in 35fc83c65faf7949f5701bb34b20f822560a7718; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in 74637f7fef030e5fb2e835b7dfeb05efdc48e0fe; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in 6ec53ccab0d691b3c73e03d930343ca45987e88d; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in 1399f102d8a1855c1a38506057306ec79d0787d9; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in e1e342d9a561c016b8531ec1f4dcefaad9d64954; From 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 · fixed in 05704335803b69c1bfa8637b7ada942bf2ee8a41
- Linux Linux
5.15
- KernelLinux
From 5.15.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 7
git.kernel.org
- stable/c/a9a6ec1298f9bc134b2c5db27d25bb10603b7113
- stable/c/35fc83c65faf7949f5701bb34b20f822560a7718
- stable/c/74637f7fef030e5fb2e835b7dfeb05efdc48e0fe
- stable/c/6ec53ccab0d691b3c73e03d930343ca45987e88d
- stable/c/1399f102d8a1855c1a38506057306ec79d0787d9
- stable/c/e1e342d9a561c016b8531ec1f4dcefaad9d64954
- stable/c/05704335803b69c1bfa8637b7ada942bf2ee8a41