Skip to content
Noroxi
NVD / CVE Program· CNA Linux

CVE-2021-47275: bcache: avoid oversized read request in cache missing code path

MediumCVSS 5.5 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 22/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 0.19% (FIRST EPSS).
  • Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: Linux Linux 41fe8d088e96472f63164e213de44ec77be69478, 555002a840ab88468e252b0eedf0b05e2ce7099c.
  • Mentioned 1 time in Turkish national cyber security advisories (siberguvenlik.gov.tr).

Low priority for now. Upgrade to Linux Linux 41fe8d088e96472f63164e213de44ec77be69478, 555002a840ab88468e252b0eedf0b05e2ce7099c or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

In the Linux kernel, the following vulnerability has been resolved: bcache: avoid oversized read request in cache missing code path In the cache missing code path of cached device, if a proper location from the internal B+ tree is matched for a cache miss range, function cached_dev_cache_miss() will be called in cache_lookup_fn() in the following code block, [code block 1] 526 unsigned int sectors = KEY_INODE(k) == s->iop.inode 527 ? min_t(uint64_t, INT_MAX, 528 KEY_START(k) - bio->bi_iter.bi_sector) 529 : INT_MAX; 530 int ret = s->d->cache_miss(b, s, bio, sectors); Here s->d->cache_miss() is the call backfunction pointer initialized as cached_dev_cache_miss(), the last parameter 'sectors' is an important hint to calculate the size of read request to backing device of the missing cache data. Current calculation in above code block may generate oversized value of 'sectors', which consequently may trigger 2 different potential kernel panics by BUG() or BUG_ON() as listed below, 1) BUG_ON() inside bch_btree_insert_key(), [code block 2] 886 BUG_ON(b->ops->is_extents && !KEY_SIZE(k)); 2) BUG() inside biovec_slab(), [code block 3] 51 default: 52 BUG(); 53 return NULL; All the above panics are original from cached_dev_cache_miss() by the oversized parameter 'sectors'. Inside cached_dev_cache_miss(), parameter 'sectors' is used to calculate the size of data read from backing device for the cache missing. This size is stored in s->insert_bio_sectors by the following lines of code, [code block 4] 909 s->insert_bio_sectors = min(sectors, bio_sectors(bio) + reada); Then the actual key inserting to the internal B+ tree is generated and stored in s->iop.replace_key by the following lines of code, [code block 5] 911 s->iop.replace_key = KEY(s->iop.inode, 912 bio->bi_iter.bi_sector + s->insert_bio_sectors, 913 s->insert_bio_sectors); The oversized parameter 'sectors' may trigger panic 1) by BUG_ON() from the above code block. And the bio sending to backing device for the missing data is allocated with hint from s->insert_bio_sectors by the following lines of code, [code block 6] 926 cache_bio = bio_alloc_bioset(GFP_NOWAIT, 927 DIV_ROUND_UP(s->insert_bio_sectors, PAGE_SECTORS), 928 &dc->disk.bio_split); The oversized parameter 'sectors' may trigger panic 2) by BUG() from the agove code block. Now let me explain how the panics happen with the oversized 'sectors'. In code block 5, replace_key is generated by macro KEY(). From the definition of macro KEY(), [code block 7] 71 #define KEY(inode, offset, size) \ 72 ((struct bkey) { \ 73 .high = (1ULL << 63) | ((__u64) (size) << 20) | (inode), \ 74 .low = (offset) \ 75 }) Here 'size' is 16bits width embedded in 64bits member 'high' of struct bkey. But in code block 1, if "KEY_START(k) - bio->bi_iter.bi_sector" is very probably to be larger than (1<<16) - 1, which makes the bkey size calculation in code block 5 is overflowed. In one bug report the value of parameter 'sectors' is 131072 (= 1 << 17), the overflowed 'sectors' results the overflowed s->insert_bio_sectors in code block 4, then makes size field of s->iop.replace_key to be 0 in code block 5. Then the 0- sized s->iop.replace_key is inserted into the internal B+ tree as cache missing check key (a special key to detect and avoid a racing between normal write request and cache missing read request) as, [code block 8] 915 ret = bch_btree_insert_check_key(b, &s->op, &s->iop.replace_key); Then the 0-sized s->iop.replace_key as 3rd parameter triggers the bkey size check BUG_ON() in code block 2, and causes the kernel panic 1). Another ke ---truncated---

Published
May 21, 2024
Updated
Jun 17, 2026
EPSS
0.1% · 9th percentile
CWE
—

Report tools

JSON

Action score

22

Monitor

Low priority for now.

CVSS
22 / 40 · 5.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.1%

CISA SSVC decision

Exploitation
none
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2021-47275

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
linuxlinux kernel

Versions reported by the vendor

Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.

  • Linux Linux

    • 3.10affected
    • cafe563591446cf80bfbc2fe3bc72a2e36cf1060 and later · before 555002a840ab88468e252b0eedf0b05e2ce7099caffected · git
    • cafe563591446cf80bfbc2fe3bc72a2e36cf1060 and later · before 41fe8d088e96472f63164e213de44ec77be69478affected · git
    • before 3.10not affected · semver
    • 5.12.11 and later · up to and including 5.12.*not affected · semver
    • 5.13 and laternot affected · original_commit_for_fix

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • linux linux kernelbefore 5.12.11
  • linux linux kernel5.13

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12linuxbefore 5.14.6-15.14.6-1
SUSE:Linux Enterprise High Availability Extension 12 SP5kernel-defaultbefore 4.12.14-122.222.14.12.14-122.222.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_58before 1-8.3.11-8.3.1
SUSE:Linux Enterprise Real Time 12 SP5kernel-rtbefore 4.12.14-10.194.14.12.14-10.194.1
SUSE:Linux Enterprise Real Time 12 SP5kernel-rt_debugbefore 4.12.14-10.194.14.12.14-10.194.1
SUSE:Linux Enterprise Real Time 12 SP5kernel-source-rtbefore 4.12.14-10.194.14.12.14-10.194.1
SUSE:Linux Enterprise Real Time 12 SP5kernel-syms-rtbefore 4.12.14-10.194.14.12.14-10.194.1
SUSE:Linux Enterprise Server 12 SP5kernel-azurebefore 4.12.14-16.194.14.12.14-16.194.1
SUSE:Linux Enterprise Server 12 SP5kernel-sourcebefore 4.12.14-122.222.14.12.14-122.222.1
SUSE:Linux Enterprise Server 12 SP5kernel-source-azurebefore 4.12.14-16.194.14.12.14-16.194.1
SUSE:Linux Enterprise Server 12 SP5kernel-symsbefore 4.12.14-122.222.14.12.14-122.222.1
SUSE:Linux Enterprise Server 12 SP5kernel-syms-azurebefore 4.12.14-16.194.14.12.14-16.194.1
SUSE:Linux Enterprise Software Development Kit 12 SP5kernel-docsbefore 4.12.14-122.222.14.12.14-122.222.1
SUSE:Linux Enterprise Software Development Kit 12 SP5kernel-obs-buildbefore 4.12.14-122.222.14.12.14-122.222.1

Other highest-scoring records for the same primary product.

  • CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV
    90Now
  • CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe…KEV
    89Now
  • CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV
    85Now

Published before and after this one in the same product

  • ← EarlierCVE-2021-47273May 21, 2024 · usb: dwc3-meson-g12a: fix usb2 PHY glue init when phy0 is disabled
    22Monitor
  • ← EarlierCVE-2021-47274May 21, 2024 · tracing: Correct the length check which causes memory corruption
    31Monitor
  • Later →CVE-2021-47276May 21, 2024 · ftrace: Do not blindly read the ip address in ftrace_bug()
    22Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Linux Linux41fe8d088e96472f63164e213de44ec77be69478Vendor (CNA)
Linux Linux555002a840ab88468e252b0eedf0b05e2ce7099cVendor (CNA)
debian:linux5.14.6-1 · Debian:12Package registry (OSV)
suse:kernel-azure4.12.14-16.194.1 · SUSE:Linux Enterprise Server 12 SP5Package registry (OSV)
suse:kernel-default4.12.14-122.222.1 · SUSE:Linux Enterprise High Availability Extension 12 SP5Package registry (OSV)
suse:kernel-docs4.12.14-122.222.1 · SUSE:Linux Enterprise Software Development Kit 12 SP5Package registry (OSV)
suse:kernel-obs-build4.12.14-122.222.1 · SUSE:Linux Enterprise Software Development Kit 12 SP5Package registry (OSV)
suse:kernel-rt4.12.14-10.194.1 · SUSE:Linux Enterprise Real Time 12 SP5Package registry (OSV)
suse:kernel-rt_debug4.12.14-10.194.1 · SUSE:Linux Enterprise Real Time 12 SP5Package registry (OSV)
suse:kernel-source4.12.14-122.222.1 · SUSE:Linux Enterprise Server 12 SP5Package registry (OSV)
suse:kernel-source-azure4.12.14-16.194.1 · SUSE:Linux Enterprise Server 12 SP5Package registry (OSV)
suse:kernel-source-rt4.12.14-10.194.1 · SUSE:Linux Enterprise Real Time 12 SP5Package registry (OSV)
suse:kernel-syms4.12.14-122.222.1 · SUSE:Linux Enterprise Server 12 SP5Package registry (OSV)
suse:kernel-syms-rt4.12.14-10.194.1 · SUSE:Linux Enterprise Real Time 12 SP5Package registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_581-8.3.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

National notice (Türkiye Cybersecurity Directorate / USOM)

Official security notices citing this record; remediation advice is on the agency's page.

All national notices →

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
none
Availability
high · the service can be disrupted
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
None
Availability impact
High

Weakness class (CWE)

—

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

References

Show all references (1 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records