block, bfq: fix possible UAF for bfqq->bic with merge chain
In the Linux kernel, the following vulnerability has been resolved: block, bfq: fix possible UAF for bfqq->bic with merge chain 1) initial state, three tasks: Process 1 Process 2 Process 3 (BIC1) (BIC2) (BIC3) | Λ | Λ | Λ | | | | | | V | V | V | bfqq1 bfqq2 bfqq3 process ref: 1 1 1 2) bfqq1 merged to bfqq2: Process 1 Process 2 Process 3 (BIC1) (BIC2) (BIC3) | | | Λ \--------------\| | | V V | bfqq1--------->bfqq2 bfqq3 process ref: 0 2 1 3) bfqq2 merged to bfqq3: Process 1 Process 2 Process 3 (BIC1) (BIC2) (BIC3) here -> Λ | | \--------------\ \-------------\| V V bfqq1--------->bfqq2---------->bfqq3 process ref: 0 1 3 In this case, IO from Process 1 will get bfqq2 from BIC1 first, and then get bfqq3 through merge chain, and finially handle IO by bfqq3. Howerver, current code will think bfqq2 is owned by BIC1, like initial state, and set bfqq2->bic to BIC1. bfq_insert_request -> by Process 1 bfqq = bfq_init_rq(rq) bfqq = bfq_get_bfqq_handle_split bfqq = bic_to_bfqq -> get bfqq2 from BIC1 bfqq->ref++ rq->elv.priv[0] = bic rq->elv.priv[1] = bfqq if (bfqq_process_refs(bfqq) == 1) bfqq->bic = bic -> record BIC1 to bfqq2 __bfq_insert_request new_bfqq = bfq_setup_cooperator -> get bfqq3 from bfqq2->new_bfqq bfqq_request_freed(bfqq) new_bfqq->ref++ rq->elv.priv[1] = new_bfqq -> handle IO by bfqq3 Fix the problem by checking bfqq is from merge chain fist. And this might fix a following problem reported by our syzkaller(unreproducible): ================================================================== BUG: KASAN: slab-use-after-free in bfq_do_early_stable_merge block/bfq-iosched.c:5692 [inline] BUG: KASAN: slab-use-after-free in bfq_do_or_sched_stable_merge block/bfq-iosched.c:5805 [inline] BUG: KASAN: slab-use-after-free in bfq_get_queue+0x25b0/0x2610 block/bfq-iosched.c:5889 Write of size 1 at addr ffff888123839eb8 by task kworker/0:1H/18595 CPU: 0 PID: 18595 Comm: kworker/0:1H Tainted: G L 6.6.0-07439-gba2303cacfda #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Workqueue: kblockd blk_mq_requeue_work Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x91/0xf0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x10d/0x610 mm/kasan/report.c:475 kasan_report+0x8e/0xc0 mm/kasan/report.c:588 bfq_do_early_stable_merge block/bfq-iosched.c:5692 [inline] bfq_do_or_sched_stable_merge block/bfq-iosched.c:5805 [inline] bfq_get_queue+0x25b0/0x2610 block/bfq-iosched.c:5889 bfq_get_bfqq_handle_split+0x169/0x5d0 block/bfq-iosched.c:6757 bfq_init_rq block/bfq-iosched.c:6876 [inline] bfq_insert_request block/bfq-iosched.c:6254 [inline] bfq_insert_requests+0x1112/0x5cf0 block/bfq-iosched.c:6304 blk_mq_insert_request+0x290/0x8d0 block/blk-mq.c:2593 blk_mq_requeue_work+0x6bc/0xa70 block/blk-mq.c:1502 process_one_work kernel/workqueue.c:2627 [inline] process_scheduled_works+0x432/0x13f0 kernel/workqueue.c:2700 worker_thread+0x6f2/0x1160 kernel/workqueue.c:2781 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:305 </TASK> Allocated by task 20776: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x87/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3458 [inline] kmem_cache_alloc_node+0x1a4/0x6f0 mm/slub.c:3503 ioc_create_icq block/blk-ioc.c:370 [inline] ---truncated---
- BDU:2025-03289
- SUSE-SU-2025:03097-1
- SUSE-SU-2025:03108-1
- SUSE-SU-2025:03124-1
- SUSE-SU-2025:03130-1
- SUSE-SU-2025:03135-1
- SUSE-SU-2025:03156-1
- SUSE-SU-2025:03175-1
- SUSE-SU-2025:03181-1
- SUSE-SU-2025:03186-1
- SUSE-SU-2025:03190-1
- SUSE-SU-2025:03191-1
- SUSE-SU-2025:03209-1
- SUSE-SU-2025:03223-1
- SUSE-SU-2025:03226-1
- SUSE-SU-2025:20698-1
- SUSE-SU-2025:20703-1
- SUSE-SU-2025:20711-1
- SUSE-SU-2025:20714-1
- SUSE-SU-2025:20766-1
- Published
- Oct 21, 2024
- Updated
- Aug 5, 2026
- EPSS
- 0.2% · 14th percentile
- CWE
- CWE-416
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
22
Monitor
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 5.5
- CNA · Linux
- 7.8
- 2.3 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel4.12 and later · before 5.10.227
- linux linux kernel5.11 and later · before 5.15.168
- linux linux kernel5.16 and later · before 6.1.113
- linux linux kernel6.2 and later · before 6.6.54
- linux linux kernel6.7 and later · before 6.10.13
- linux linux kernel6.11 and later · before 6.11.2
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
- 4.12affected
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before a9bdd5b36887d2bacb8bc777fd18317c99fc2587affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before bc2140534b2aae752e4f7cb4489642dbb5ec4777affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before e1277ae780cca4e69ef5468d4582dfd48f0b8320affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before 8aa9de02a4be2e7006e636816ce19b0d667ceaa3affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before ddbdaad123254fb53e32480cb74a486a6868b1e0affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before 7faed2896d78e48ec96229e73b30b0af6c00a9aaaffected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before 880692ee233ba63808182705b3333403413b58f5affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before 6d130db286ad0ea392c96ebb2551acf0d7308048affected · git
- 36eca894832351feed9072d0f97eb06fc9482ca4 and later · before 18ad4df091dd5d067d2faa8fce1180b79f7041a7affected · git
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.1.115-1 | 6.1.115-1 |
| Debian:13 | linux | before 6.11.2-1 | 6.11.2-1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_60 | before 15-2.1 | 15-2.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_61 | before 18-4.1 | 18-4.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_47 | before 17-150300.2.1 | 17-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_49 | before 15-150300.2.1 | 15-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_29 | before 16-150400.2.1 | 16-150400.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_31 | before 14-150400.2.1 | 14-150400.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_32 | before 14-150400.2.1 | 14-150400.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_17 | before 16-150500.2.1 | 16-150500.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_19 | before 14-150500.2.1 | 14-150500.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_20 | before 14-150500.2.1 | 14-150500.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_3 | before 20-150600.2.1 | 20-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_4 | before 16-150600.2.1 | 16-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_5 | before 15-150600.2.1 | 15-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_0 | before 21-150600.3.1 | 21-150600.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_1 | before 20-150600.2.1 | 20-150600.2.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_2 | before 11-1.1 | 11-1.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_3 | before 11-1.2 | 11-1.2 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0-RT_Update_2 | before 11-1.1 | 11-1.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0-RT_Update_3 | before 11-1.2 | 11-1.2 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- 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 KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
- CVE-2016-5195Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by leveraging incorrect haKEV83Now
- CVE-2019-13272In the Linux kernel before 5.1.17, ptrace_link in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to creKEV77This week
- CVE-2013-6282The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the v6k and v7 ARM platforms do not validate certain addKEV77This week
- CVE-2013-2094The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9 uses an incorrect integer data type, which allows loKEV77This week
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 18ad4df091dd5d067d2faa8fce1180b79f7041a7 | Vendor (CNA) |
| Linux Linux | 6d130db286ad0ea392c96ebb2551acf0d7308048 | Vendor (CNA) |
| Linux Linux | 7faed2896d78e48ec96229e73b30b0af6c00a9aa | Vendor (CNA) |
| Linux Linux | 880692ee233ba63808182705b3333403413b58f5 | Vendor (CNA) |
| Linux Linux | 8aa9de02a4be2e7006e636816ce19b0d667ceaa3 | Vendor (CNA) |
| Linux Linux | a9bdd5b36887d2bacb8bc777fd18317c99fc2587 | Vendor (CNA) |
| Linux Linux | bc2140534b2aae752e4f7cb4489642dbb5ec4777 | Vendor (CNA) |
| Linux Linux | ddbdaad123254fb53e32480cb74a486a6868b1e0 | Vendor (CNA) |
| Linux Linux | e1277ae780cca4e69ef5468d4582dfd48f0b8320 | Vendor (CNA) |
| debian:linux | 6.1.115-1 · Debian:12 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP3_Update_47 | 17-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP3_Update_49 | 15-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_29 | 16-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_31 | 14-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_32 | 14-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP5_Update_17 | 16-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP5_Update_19 | 14-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP5_Update_20 | 14-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6_Update_4 | 16-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_0 | 21-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_1 | 20-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_60 | 15-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package 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.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
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)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);/* ... another thread is still running ... */process(dev->buf);Fixed
lock(&dev->lock);free(dev->buf);dev->buf = NULL;unlock(&dev->lock);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.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- git.kernel.org/stable/c/18ad4df091dd5d067d2faa8fce1180b79f7041a7
- git.kernel.org/stable/c/6d130db286ad0ea392c96ebb2551acf0d7308048
- git.kernel.org/stable/c/7faed2896d78e48ec96229e73b30b0af6c00a9aa
- git.kernel.org/stable/c/880692ee233ba63808182705b3333403413b58f5
- git.kernel.org/stable/c/8aa9de02a4be2e7006e636816ce19b0d667ceaa3
- git.kernel.org/stable/c/a9bdd5b36887d2bacb8bc777fd18317c99fc2587
- git.kernel.org/stable/c/bc2140534b2aae752e4f7cb4489642dbb5ec4777
- git.kernel.org/stable/c/ddbdaad123254fb53e32480cb74a486a6868b1e0
- git.kernel.org/stable/c/e1277ae780cca4e69ef5468d4582dfd48f0b8320
- lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- cert-portal.siemens.com/productcert/html/ssa-265688.html
- cert-portal.siemens.com/productcert/html/ssa-355557.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.