Skip to main content
Network Thinking Solutions Logo

CVE-2021-47460

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.

All CVEs
CVE-2021-47460Published 5/22/2024

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.

Vendor advisory
CVSS5.5Medium

Overview

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. [akpm@linux-foundation.org: fix whitespace, per Joseph]

Published
5/22/2024
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 4.9.242, < 4.9.288

Verify advisory

Source
linux kernel
linux
≥ 4.14.204, < 4.14.253

Verify advisory

Source
linux kernel
linux
≥ 4.19.155, < 4.19.214

Verify advisory

Source
linux kernel
linux
≥ 5.4.75, < 5.4.156

Verify advisory

Source
linux kernel
linux
≥ 5.9.5, < 5.10.76

Verify advisory

Source
linux kernel
linux
≥ 5.11, < 5.14.15

Verify advisory

Source
linux kernel
linux
5.15

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ acef5107e2eacb08a16ad5db60320d65bd26a6c0, < 560edd14de2bf9dbc0129681eeb4d5ef87cc105f

Verify advisory

Source
Linux
Linux
≥ 7ed80e77c908cbaa686529a49f8ae0060c5caee7, < 8e6bfb4f70168ddfd32fb6dc028ad52faaf1f32e

Verify advisory

Source
Linux
Linux
≥ 7ce2b16bad2cbfa3fa7bbc42c4448914f639ca47, < a3a089c241cd49b33a8cdd7fcb37cc87a086912a

Verify advisory

Source
Linux
Linux
≥ f8a6a2ed4b7d1c3c8631eeb6d00572bc853094a8, < b05caf023b14cbed9223bb5b48ecc7bffe38f632

Verify advisory

Source
Linux
Linux
≥ 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b, < f1b98569e81c37d7e0deada7172f8f60860c1360

Verify advisory

Source
Linux
Linux
≥ 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b, < fa9b6b6c953e3f6441ed6cf83b4c771dac2dae08

Verify advisory

Source
Linux
Linux
≥ 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b, < 5314454ea3ff6fc746eaf71b9a7ceebed52888fa

Verify advisory

Source
Linux
Linux
36ed9e604215f58cec0381ca5fcc6da05f2d87ca

Verify advisory

Source
Linux
Linux
≥ 4.9.242, < 4.9.288

Verify advisory

Source
Linux
Linux
≥ 4.14.204, < 4.14.253

Verify advisory

Source
Linux
Linux
≥ 4.19.155, < 4.19.214

Verify advisory

Source
Linux
Linux
≥ 5.4.75, < 5.4.156

Verify advisory

Source
Linux
Linux
≥ 5.9.5, < 5.10

Verify advisory

Source
Linux
Linux
5.10

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 5.5. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.