Skip to content
Noroxi
CVE-2024-47706· NVD / CVE Program· CNA Linux

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---

MediumCVSS 5.5 · v3.1—No exploit Fix available
Published
Oct 21, 2024
Updated
Aug 5, 2026
EPSS
0.2% · 14th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

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.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 help

Affected systems

VendorProduct
linuxlinux 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.

EcosystemPackageAffected rangeFix
Debian:12linuxbefore 6.1.115-16.1.115-1
Debian:13linuxbefore 6.11.2-16.11.2-1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_60before 15-2.115-2.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_61before 18-4.118-4.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_47before 17-150300.2.117-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_49before 15-150300.2.115-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_29before 16-150400.2.116-150400.2.1
SUSE:Linux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_31before 14-150400.2.114-150400.2.1
SUSE:Linux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_32before 14-150400.2.114-150400.2.1
SUSE:Linux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_17before 16-150500.2.116-150500.2.1
SUSE:Linux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_19before 14-150500.2.114-150500.2.1
SUSE:Linux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_20before 14-150500.2.114-150500.2.1
SUSE:Linux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_3before 20-150600.2.120-150600.2.1
SUSE:Linux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_4before 16-150600.2.116-150600.2.1
SUSE:Linux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_5before 15-150600.2.115-150600.2.1
SUSE:Linux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_0before 21-150600.3.121-150600.3.1
SUSE:Linux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_1before 20-150600.2.120-150600.2.1
SUSE:Linux Micro 6.0kernel-livepatch-MICRO-6-0_Update_2before 11-1.111-1.1
SUSE:Linux Micro 6.0kernel-livepatch-MICRO-6-0_Update_3before 11-1.211-1.2
SUSE:Linux Micro 6.0kernel-livepatch-MICRO-6-0-RT_Update_2before 11-1.111-1.1
SUSE:Linux Micro 6.0kernel-livepatch-MICRO-6-0-RT_Update_3before 11-1.211-1.2

Other 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 KEV
    89Now
  • CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV
    85Now
  • 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 haKEV
    83Now
  • 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 creKEV
    77This 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 addKEV
    77This 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 loKEV
    77This 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 / packageFixed versionSource
Linux Linux18ad4df091dd5d067d2faa8fce1180b79f7041a7Vendor (CNA)
Linux Linux6d130db286ad0ea392c96ebb2551acf0d7308048Vendor (CNA)
Linux Linux7faed2896d78e48ec96229e73b30b0af6c00a9aaVendor (CNA)
Linux Linux880692ee233ba63808182705b3333403413b58f5Vendor (CNA)
Linux Linux8aa9de02a4be2e7006e636816ce19b0d667ceaa3Vendor (CNA)
Linux Linuxa9bdd5b36887d2bacb8bc777fd18317c99fc2587Vendor (CNA)
Linux Linuxbc2140534b2aae752e4f7cb4489642dbb5ec4777Vendor (CNA)
Linux Linuxddbdaad123254fb53e32480cb74a486a6868b1e0Vendor (CNA)
Linux Linuxe1277ae780cca4e69ef5468d4582dfd48f0b8320Vendor (CNA)
debian:linux6.1.115-1 · Debian:12Package registry (OSV)
suse:kernel-livepatch-SLE15-SP3_Update_4717-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3Package registry (OSV)
suse:kernel-livepatch-SLE15-SP3_Update_4915-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_2916-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_3114-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_3214-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP5_Update_1716-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5Package registry (OSV)
suse:kernel-livepatch-SLE15-SP5_Update_1914-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5Package registry (OSV)
suse:kernel-livepatch-SLE15-SP5_Update_2014-150500.2.1 · SUSE:Linux Enterprise Live Patching 15 SP5Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6_Update_416-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6-RT_Update_021-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6-RT_Update_120-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_6015-2.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.

EPSS, last 120 days

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.

Finders, 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 Free

CVSS 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.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

c
free(dev->buf);/* ... another thread is still running ... */process(dev->buf);

Fixed

c
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

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records