ocfs2: fix data corruption after conversion from inline format
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix data corruption after conversion from inline format Commit 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()") uncovered a latent bug in ocfs2 conversion from inline inode format to a normal inode format. The code in ocfs2_convert_inline_data_to_extents() attempts to zero out the whole cluster allocated for file data by grabbing, zeroing, and dirtying all pages covering this cluster. However these pages are beyond i_size, thus writeback code generally ignores these dirty pages and no blocks were ever actually zeroed on the disk. This oversight was fixed by commit 693c241a5f6a ("ocfs2: No need to zero pages past i_size.") for standard ocfs2 write path, inline conversion path was apparently forgotten; the commit log also has a reasoning why the zeroing actually is not needed. After commit 6dbf7bb55598, things became worse as writeback code stopped invalidating buffers on pages beyond i_size and thus these pages end up with clean PageDirty bit but with buffers attached to these pages being still dirty. So when a file is converted from inline format, then writeback triggers, and then the file is grown so that these pages become valid, the invalid dirtiness state is preserved, mark_buffer_dirty() does nothing on these pages (buffers are already dirty) but page is never written back because it is clean. So data written to these pages is lost once pages are reclaimed. Simple reproducer for the problem is: xfs_io -f -c "pwrite 0 2000" -c "pwrite 2000 2000" -c "fsync" \ -c "pwrite 4000 2000" ocfs2_file After unmounting and mounting the fs again, you can observe that end of 'ocfs2_file' has lost its contents. Fix the problem by not doing the pointless zeroing during conversion from inline format similarly as in the standard write path. [[email protected]: fix whitespace, per Joseph]
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 4.9.242 to before 4.9.288; 4.14.204 to before 4.14.253; 4.19.155 to before 4.19.214; 5.4.75 to before 5.4.156; 5.9.5 to before 5.10 | 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10 | Patch available | CNA |
| Linux | Linux | 5.10 and later | 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10.76, 5.14.15, 5.15 | Patch available | CNA |
- Linux VendorLinux Affected 4.9.242 to before 4.9.288; 4.14.204 to before 4.14.253; 4.19.155 to before 4.19.214; 5.4.75 to before 5.4.156; 5.9.5 to before 5.10 Fixed in 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10 Patch available CNA
- Linux VendorLinux Affected 5.10 and later Fixed in 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10.76, 5.14.15, 5.15 Patch available CNA
CPE configurations NVD · 7
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.9.242 to before 4.9.288; 4.14.204 to before 4.14.253; 4.19.155 to before 4.19.214; 5.4.75 to before 5.4.156; 5.9.5 to before 5.10.76; 5.11 to before 5.14.15 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* | 5.15 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* | 5.15 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* | 5.15 rc3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* | 5.15 rc4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* | 5.15 rc5 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* | 5.15 rc6 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 4.9.242 to before 4.9.288; 4.14.204 to before 4.14.253; 4.19.155 to before 4.19.214; 5.4.75 to before 5.4.156; 5.9.5 to before 5.10.76; 5.11 to before 5.14.15 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* Versions 5.15 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* Versions 5.15 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* Versions 5.15 rc3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* Versions 5.15 rc4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* Versions 5.15 rc5 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* Versions 5.15 rc6 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10
- Fix · CNA Linux (Linux) Fixed in 4.9.288, 4.14.253, 4.19.214, 5.4.156, 5.10.76, 5.14.15, 5.15
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
Not affected: 3 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2021-47460
- 2026-10-03 Alias added: GHSA-f639-593q-rjgw
References
Patch 7
- https://git.kernel.org/stable/c/560edd14de2bf9dbc0129681eeb4d5ef87cc105f
- https://git.kernel.org/stable/c/8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e
- https://git.kernel.org/stable/c/a3a089c241cd49b33a8cdd7fcb37cc87a086912a
- https://git.kernel.org/stable/c/b05caf023b14cbed9223bb5b48ecc7bffe38f632
- https://git.kernel.org/stable/c/f1b98569e81c37d7e0deada7172f8f60860c1360
- https://git.kernel.org/stable/c/fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08
- https://git.kernel.org/stable/c/5314454ea3ff6fc746eaf71b9a7ceebed52888fa
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2021-47460 · CVE Program
- CVE-2021-47460 · NVD
- FIRST EPSS
- GHSA-f639-593q-rjgw · GitHub Advisory Database · CC BY 4.0
- CVE-2021-47460 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences