# CVE-2022-50752: md/raid5: Remove unnecessary bio\_put() in raid5\_read\_one\_chunk()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **Published:** 2025-12-24T13:05:46.881Z
- **Modified:** 2026-08-05T08:59:39.128Z

## Who should check

- Anyone running Linux \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c0fd5d4d8fd7b1a50306d7a23c720cf808f41fdf; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 21a9c7354aa59e97e26ece5f0a609c8bfa43020d; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c66a6f41e09ad386fd2cce22b9cded837bbbc704
- Anyone running Linux 5.14

## Description

In the Linux kernel, the following vulnerability has been resolved:

md/raid5: Remove unnecessary bio\_put() in raid5\_read\_one\_chunk()

When running chunk-sized reads on disks with badblocks duplicate bio
free/puts are observed:

   =============================================================================
   BUG bio-200 (Not tainted): Object already free
   -----------------------------------------------------------------------------
   Allocated in mempool\_alloc\_slab+0x17/0x20 age=3 cpu=2 pid=7504
    \_\_slab\_alloc.constprop.0+0x5a/0xb0
    kmem\_cache\_alloc+0x31e/0x330
    mempool\_alloc\_slab+0x17/0x20
    mempool\_alloc+0x100/0x2b0
    bio\_alloc\_bioset+0x181/0x460
    do\_mpage\_readpage+0x776/0xd00
    mpage\_readahead+0x166/0x320
    blkdev\_readahead+0x15/0x20
    read\_pages+0x13f/0x5f0
    page\_cache\_ra\_unbounded+0x18d/0x220
    force\_page\_cache\_ra+0x181/0x1c0
    page\_cache\_sync\_ra+0x65/0xb0
    filemap\_get\_pages+0x1df/0xaf0
    filemap\_read+0x1e1/0x700
    blkdev\_read\_iter+0x1e5/0x330
    vfs\_read+0x42a/0x570
   Freed in mempool\_free\_slab+0x17/0x20 age=3 cpu=2 pid=7504
    kmem\_cache\_free+0x46d/0x490
    mempool\_free\_slab+0x17/0x20
    mempool\_free+0x66/0x190
    bio\_free+0x78/0x90
    bio\_put+0x100/0x1a0
    raid5\_make\_request+0x2259/0x2450
    md\_handle\_request+0x402/0x600
    md\_submit\_bio+0xd9/0x120
    \_\_submit\_bio+0x11f/0x1b0
    submit\_bio\_noacct\_nocheck+0x204/0x480
    submit\_bio\_noacct+0x32e/0xc70
    submit\_bio+0x98/0x1a0
    mpage\_readahead+0x250/0x320
    blkdev\_readahead+0x15/0x20
    read\_pages+0x13f/0x5f0
    page\_cache\_ra\_unbounded+0x18d/0x220
   Slab 0xffffea000481b600 objects=21 used=0 fp=0xffff8881206d8940 flags=0x17ffffc0010201(locked\|slab\|head\|node=0\|zone=2\|lastcpupid=0x1fffff)
   CPU: 0 PID: 34525 Comm: kworker/u24:2 Not tainted 6.0.0-rc2-localyes-265166-gf11c5343fa3f \#143
   Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
   Workqueue: raid5wq raid5\_do\_work
   Call Trace:
    \<TASK\>
    dump\_stack\_lvl+0x5a/0x78
    dump\_stack+0x10/0x16
    print\_trailer+0x158/0x165
    object\_err+0x35/0x50
    free\_debug\_processing.cold+0xb7/0xbe
    \_\_slab\_free+0x1ae/0x330
    kmem\_cache\_free+0x46d/0x490
    mempool\_free\_slab+0x17/0x20
    mempool\_free+0x66/0x190
    bio\_free+0x78/0x90
    bio\_put+0x100/0x1a0
    mpage\_end\_io+0x36/0x150
    bio\_endio+0x2fd/0x360
    md\_end\_io\_acct+0x7e/0x90
    bio\_endio+0x2fd/0x360
    handle\_failed\_stripe+0x960/0xb80
    handle\_stripe+0x1348/0x3760
    handle\_active\_stripes.constprop.0+0x72a/0xaf0
    raid5\_do\_work+0x177/0x330
    process\_one\_work+0x616/0xb20
    worker\_thread+0x2bd/0x6f0
    kthread+0x179/0x1b0
    ret\_from\_fork+0x22/0x30
    \</TASK\>

The double free is caused by an unnecessary bio\_put() in the
if(is\_badblock(...)) error path in raid5\_read\_one\_chunk().

The error path was moved ahead of bio\_alloc\_clone() in c82aa1b76787c
("md/raid5: move checking badblock before clone bio in
raid5\_read\_one\_chunk"). The previous code checked and freed align\_bio
which required a bio\_put. After the move that is no longer needed as
raid\_bio is returned to the control of the common io path which
performs its own endio resulting in a double free on bad device blocks.

## Affected and fixed versions

- Linux: \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c0fd5d4d8fd7b1a50306d7a23c720cf808f41fdf; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 21a9c7354aa59e97e26ece5f0a609c8bfa43020d; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c66a6f41e09ad386fd2cce22b9cded837bbbc704 (cvelist)
- Linux: 5.14 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50752. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50752.md
Affected: Linux >= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, < 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7; >= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, < c0fd5d4d8fd7b1a50306d7a23c720cf808f41fdf; >= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, < 21a9c7354aa59e97e26ece5f0a609c8bfa43020d; >= c82aa1b76787c34fd02374e…
Fixed in: Linux 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7, Linux 21a9c7354aa59e97e26ece5f0a609c8bfa43020d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50752 being exploited?

There is no confirmed exploitation: CVE-2022-50752 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50752?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50752?

Linux \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c0fd5d4d8fd7b1a50306d7a23c720cf808f41fdf; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< 21a9c7354aa59e97e26ece5f0a609c8bfa43020d; \>= c82aa1b76787c34fd02374e519b6f52cdeb2f54b, \< c66a6f41e09ad386fd2cce22b9cded837bbbc704; Linux 5.14.

### Is there a fix for CVE-2022-50752?

Yes. Fixed in Linux 7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7, Linux 21a9c7354aa59e97e26ece5f0a609c8bfa43020d. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50752?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/7a37c58ee72e1fadd22c4ee990cb74c2ca2280e7>
- other: <https://git.kernel.org/stable/c/c0fd5d4d8fd7b1a50306d7a23c720cf808f41fdf>
- other: <https://git.kernel.org/stable/c/21a9c7354aa59e97e26ece5f0a609c8bfa43020d>
- other: <https://git.kernel.org/stable/c/c66a6f41e09ad386fd2cce22b9cded837bbbc704>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50752>

HTML: <https://flawdb.com/CVE-2022-50752> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50752>
