Skip to content
Heist/ feed
High

block, bfq: fix bfqq uaf in bfq_limit_depth()

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: block, bfq: fix bfqq uaf in bfq_limit_depth() Set new allocated bfqq to bic or remove freed bfqq from bic are both protected by bfqd->lock, however bfq_limit_depth() is deferencing bfqq from bic without the lock, this can lead to UAF if the io_context is shared by multiple tasks. For example, test bfq with io_uring can trigger following UAF in v6.6: ================================================================== BUG: KASAN: slab-use-after-free in bfqq_group+0x15/0x50 Call Trace: dump_stack_lvl+0x47/0x80 print_address_description.constprop.0+0x66/0x300 print_report+0x3e/0x70 kasan_report+0xb4/0xf0 bfqq_group+0x15/0x50 bfqq_request_over_limit+0x130/0x9a0 bfq_limit_depth+0x1b5/0x480 __blk_mq_alloc_requests+0x2b5/0xa00 blk_mq_get_new_requests+0x11d/0x1d0 blk_mq_submit_bio+0x286/0xb00 submit_bio_noacct_nocheck+0x331/0x400 __block_write_full_folio+0x3d0/0x640 writepage_cb+0x3b/0xc0 write_cache_pages+0x254/0x6c0 write_cache_pages+0x254/0x6c0 do_writepages+0x192/0x310 filemap_fdatawrite_wbc+0x95/0xc0 __filemap_fdatawrite_range+0x99/0xd0 filemap_write_and_wait_range.part.0+0x4d/0xa0 blkdev_read_iter+0xef/0x1e0 io_read+0x1b6/0x8a0 io_issue_sqe+0x87/0x300 io_wq_submit_work+0xeb/0x390 io_worker_handle_work+0x24d/0x550 io_wq_worker+0x27f/0x6c0 ret_from_fork_asm+0x1b/0x30 Allocated by task 808602: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_slab_alloc+0x83/0x90 kmem_cache_alloc_node+0x1b1/0x6d0 bfq_get_

Announced Group revision 1
Original source ↗

CVE-2024-53166

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2024-53166

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "76f1df88bbc2f984eb0418cc90de0a8384e63604",
        "lessThan": "ada4ca5fd5a9d5212f28164d49a4885951c979c9",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "76f1df88bbc2f984eb0418cc90de0a8384e63604",
        "lessThan": "906cdbdd3b018ff69cc830173bce277a847d4fdc",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "76f1df88bbc2f984eb0418cc90de0a8384e63604",
        "lessThan": "dcaa738afde55085ac6056252e319479cf23cde2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "76f1df88bbc2f984eb0418cc90de0a8384e63604",
        "lessThan": "01a853faaeaf3379ccf358ade582b1d28752126e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "76f1df88bbc2f984eb0418cc90de0a8384e63604",
        "lessThan": "e8b8344de3980709080d86c157d24e7de07d70ad",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "block/bfq-iosched.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.17"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.17",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.1.130",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.64",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.11.11",
        "versionType": "semver",
        "lessThanOrEqual": "6.11.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.2",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.13",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "block/bfq-iosched.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2024-53166

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#26816 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement