CVE-2021-47275:Linux kernel vulnerability in the bcache cache-miss path could cause oversized read requests leading to kernel panics (BUG/BUG_ON) due to an overflow in sector calculations; the issue has been fixed in the stable kernel series.

splash
Back

Description Preview

This CVE describes a defect in the Linux kernel’s bcache subsystem where, in the cache-missing code path, an oversized calculation of the read sector count could be used to determine the amount of data read from the backing device. Specifically, when a proper location from the internal B+ tree is matched for a cache miss range, the computed sectors parameter could overflow, causing subsequent operations (such as inserting a key into the internal B+ tree) to trigger kernel panics (BUG_ON or BUG). The panics can occur in multiple code paths, including bch_btree_insert_key and related slab/biovec handling. The vulnerability affects certain git commits and older kernel releases prior to the fix, and has been addressed in subsequent stable releases (with the 5.12.x and 5.13+ lines listed as containing the fix). Upgrading to a kernel version containing the fix (or newer) mitigates the risk.

Overview

The vulnerability arises in the bcache cache miss handling within the Linux kernel. When a cache miss occurs, the code computes a read size (sectors) that may overflow, producing an invalid key and triggering kernel panics through BUG_ON and BUG() checks. This can lead to system instability or crashes under cache miss scenarios. The issue has been resolved in later commits and is addressed in the stable kernel series (notably in commits referenced by the stable tree fixes), with 5.12.x and 5.13+ series indicated as unaffected by the vulnerability.

Remediation

  • Upgrade to a kernel version that includes the fix (prefer the 5.12.x or 5.13+ stable releases, or the distribution’s latest patched kernel). After upgrading, reboot the system and verify the kernel version.
  • If upgrading is not immediately possible, apply interim mitigations:
    • Review and reduce reliance on bcache until a patch can be applied, e.g., disable or remove bcache caches if feasible.
    • Monitor vendor and distribution advisories for a backport or security patch and apply as soon as available.
  • Validate the fix by testing cache miss scenarios in a controlled environment and ensuring no panics occur during cache misses.
  • Plan and perform a documented upgrade path across affected systems, ensuring compatibility and regression testing for storage workloads.

References

  • https://git.kernel.org/stable/c/555002a840ab88468e252b0eedf0b05e2ce7099c
  • https://git.kernel.org/stable/c/41fe8d088e96472f63164e213de44ec77be69478

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Manufacturing: Medium
    Manufacturing
  2. Health Care & Social Assistance: Low
    Health Care & Social Assistance
  3. Professional, Scientific, & Technical Services: Low
    Professional, Scientific, & Technical Services
  4. Finance and Insurance: Low
    Finance and Insurance
  5. Educational Services: Low
    Educational Services
  6. Public Administration: Low
    Public Administration
  7. Retail Trade: Low
    Retail Trade
  8. Arts, Entertainment & Recreation: Low
    Arts, Entertainment & Recreation
  9. Transportation & Warehousing: Low
    Transportation & Warehousing
  10. Management of Companies & Enterprises: Low
    Management of Companies & Enterprises
  11. Other Services (except Public Administration): Low
    Other Services (except Public Administration)
  12. Utilities: Low
    Utilities
  13. Real Estate Rental & Leasing: Low
    Real Estate Rental & Leasing
  14. Accommodation & Food Services: Low
    Accommodation & Food Services
  15. Administrative, Support, Waste Management & Remediation Services: Low
    Administrative, Support, Waste Management & Remediation Services
  16. Agriculture, Forestry Fishing & Hunting: Low
    Agriculture, Forestry Fishing & Hunting
  17. Construction: Low
    Construction
  18. Information: Low
    Information
  19. Mining: Low
    Mining
  20. Wholesale Trade: Low
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background