CVE-2023-53860 (GCVE-0-2023-53860)
Vulnerability from cvelistv5
Published
2025-12-09 01:30
Modified
2025-12-09 01:30
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: dm: don't attempt to queue IO under RCU protection dm looks up the table for IO based on the request type, with an assumption that if the request is marked REQ_NOWAIT, it's fine to attempt to submit that IO while under RCU read lock protection. This is not OK, as REQ_NOWAIT just means that we should not be sleeping waiting on other IO, it does not mean that we can't potentially schedule. A simple test case demonstrates this quite nicely: int main(int argc, char *argv[]) { struct iovec iov; int fd; fd = open("/dev/dm-0", O_RDONLY | O_DIRECT); posix_memalign(&iov.iov_base, 4096, 4096); iov.iov_len = 4096; preadv2(fd, &iov, 1, 0, RWF_NOWAIT); return 0; } which will instantly spew: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5580, name: dm-nowait preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 INFO: lockdep is turned off. CPU: 7 PID: 5580 Comm: dm-nowait Not tainted 6.6.0-rc1-g39956d2dcd81 #132 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x11d/0x1b0 __might_resched+0x3c3/0x5e0 ? preempt_count_sub+0x150/0x150 mempool_alloc+0x1e2/0x390 ? mempool_resize+0x7d0/0x7d0 ? lock_sync+0x190/0x190 ? lock_release+0x4b7/0x670 ? internal_get_user_pages_fast+0x868/0x2d40 bio_alloc_bioset+0x417/0x8c0 ? bvec_alloc+0x200/0x200 ? internal_get_user_pages_fast+0xb8c/0x2d40 bio_alloc_clone+0x53/0x100 dm_submit_bio+0x27f/0x1a20 ? lock_release+0x4b7/0x670 ? blk_try_enter_queue+0x1a0/0x4d0 ? dm_dax_direct_access+0x260/0x260 ? rcu_is_watching+0x12/0xb0 ? blk_try_enter_queue+0x1cc/0x4d0 __submit_bio+0x239/0x310 ? __bio_queue_enter+0x700/0x700 ? kvm_clock_get_cycles+0x40/0x60 ? ktime_get+0x285/0x470 submit_bio_noacct_nocheck+0x4d9/0xb80 ? should_fail_request+0x80/0x80 ? preempt_count_sub+0x150/0x150 ? lock_release+0x4b7/0x670 ? __bio_add_page+0x143/0x2d0 ? iov_iter_revert+0x27/0x360 submit_bio_noacct+0x53e/0x1b30 submit_bio_wait+0x10a/0x230 ? submit_bio_wait_endio+0x40/0x40 __blkdev_direct_IO_simple+0x4f8/0x780 ? blkdev_bio_end_io+0x4c0/0x4c0 ? stack_trace_save+0x90/0xc0 ? __bio_clone+0x3c0/0x3c0 ? lock_release+0x4b7/0x670 ? lock_sync+0x190/0x190 ? atime_needs_update+0x3bf/0x7e0 ? timestamp_truncate+0x21b/0x2d0 ? inode_owner_or_capable+0x240/0x240 blkdev_direct_IO.part.0+0x84a/0x1810 ? rcu_is_watching+0x12/0xb0 ? lock_release+0x4b7/0x670 ? blkdev_read_iter+0x40d/0x530 ? reacquire_held_locks+0x4e0/0x4e0 ? __blkdev_direct_IO_simple+0x780/0x780 ? rcu_is_watching+0x12/0xb0 ? __mark_inode_dirty+0x297/0xd50 ? preempt_count_add+0x72/0x140 blkdev_read_iter+0x2a4/0x530 do_iter_readv_writev+0x2f2/0x3c0 ? generic_copy_file_range+0x1d0/0x1d0 ? fsnotify_perm.part.0+0x25d/0x630 ? security_file_permission+0xd8/0x100 do_iter_read+0x31b/0x880 ? import_iovec+0x10b/0x140 vfs_readv+0x12d/0x1a0 ? vfs_iter_read+0xb0/0xb0 ? rcu_is_watching+0x12/0xb0 ? rcu_is_watching+0x12/0xb0 ? lock_release+0x4b7/0x670 do_preadv+0x1b3/0x260 ? do_readv+0x370/0x370 __x64_sys_preadv2+0xef/0x150 do_syscall_64+0x39/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5af41ad806 Code: 41 54 41 89 fc 55 44 89 c5 53 48 89 cb 48 83 ec 18 80 3d e4 dd 0d 00 00 74 7a 45 89 c1 49 89 ca 45 31 c0 b8 47 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 be 00 00 00 48 85 c0 79 4a 48 8b 0d da 55 RSP: 002b:00007ffd3145c7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000147 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5af41ad806 RDX: 0000000000000001 RSI: 00007ffd3145c850 RDI: 0000000000000003 RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000008 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 00007ffd3145c850 R14: 000055f5f0431dd8 R15: 0000000000000001 </TASK> where in fact it is ---truncated---
Impacted products
Vendor Product Version
Linux Linux Version: 563a225c9fd207326c2a2af9d59b4097cb31ce70
Version: 563a225c9fd207326c2a2af9d59b4097cb31ce70
Version: 563a225c9fd207326c2a2af9d59b4097cb31ce70
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d7b2abd87d1fcdb47811f90090a363e7ca15cb14",
              "status": "affected",
              "version": "563a225c9fd207326c2a2af9d59b4097cb31ce70",
              "versionType": "git"
            },
            {
              "lessThan": "699775e9338adcd4eaedea000d32c60250c3114d",
              "status": "affected",
              "version": "563a225c9fd207326c2a2af9d59b4097cb31ce70",
              "versionType": "git"
            },
            {
              "lessThan": "a9ce385344f916cd1c36a33905e564f5581beae9",
              "status": "affected",
              "version": "563a225c9fd207326c2a2af9d59b4097cb31ce70",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/md/dm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.19"
            },
            {
              "lessThan": "5.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.55",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.6",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.55",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5.5",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm: don\u0027t attempt to queue IO under RCU protection\n\ndm looks up the table for IO based on the request type, with an\nassumption that if the request is marked REQ_NOWAIT, it\u0027s fine to\nattempt to submit that IO while under RCU read lock protection. This\nis not OK, as REQ_NOWAIT just means that we should not be sleeping\nwaiting on other IO, it does not mean that we can\u0027t potentially\nschedule.\n\nA simple test case demonstrates this quite nicely:\n\nint main(int argc, char *argv[])\n{\n        struct iovec iov;\n        int fd;\n\n        fd = open(\"/dev/dm-0\", O_RDONLY | O_DIRECT);\n        posix_memalign(\u0026iov.iov_base, 4096, 4096);\n        iov.iov_len = 4096;\n        preadv2(fd, \u0026iov, 1, 0, RWF_NOWAIT);\n        return 0;\n}\n\nwhich will instantly spew:\n\nBUG: sleeping function called from invalid context at include/linux/sched/mm.h:306\nin_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5580, name: dm-nowait\npreempt_count: 0, expected: 0\nRCU nest depth: 1, expected: 0\nINFO: lockdep is turned off.\nCPU: 7 PID: 5580 Comm: dm-nowait Not tainted 6.6.0-rc1-g39956d2dcd81 #132\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014\nCall Trace:\n \u003cTASK\u003e\n dump_stack_lvl+0x11d/0x1b0\n __might_resched+0x3c3/0x5e0\n ? preempt_count_sub+0x150/0x150\n mempool_alloc+0x1e2/0x390\n ? mempool_resize+0x7d0/0x7d0\n ? lock_sync+0x190/0x190\n ? lock_release+0x4b7/0x670\n ? internal_get_user_pages_fast+0x868/0x2d40\n bio_alloc_bioset+0x417/0x8c0\n ? bvec_alloc+0x200/0x200\n ? internal_get_user_pages_fast+0xb8c/0x2d40\n bio_alloc_clone+0x53/0x100\n dm_submit_bio+0x27f/0x1a20\n ? lock_release+0x4b7/0x670\n ? blk_try_enter_queue+0x1a0/0x4d0\n ? dm_dax_direct_access+0x260/0x260\n ? rcu_is_watching+0x12/0xb0\n ? blk_try_enter_queue+0x1cc/0x4d0\n __submit_bio+0x239/0x310\n ? __bio_queue_enter+0x700/0x700\n ? kvm_clock_get_cycles+0x40/0x60\n ? ktime_get+0x285/0x470\n submit_bio_noacct_nocheck+0x4d9/0xb80\n ? should_fail_request+0x80/0x80\n ? preempt_count_sub+0x150/0x150\n ? lock_release+0x4b7/0x670\n ? __bio_add_page+0x143/0x2d0\n ? iov_iter_revert+0x27/0x360\n submit_bio_noacct+0x53e/0x1b30\n submit_bio_wait+0x10a/0x230\n ? submit_bio_wait_endio+0x40/0x40\n __blkdev_direct_IO_simple+0x4f8/0x780\n ? blkdev_bio_end_io+0x4c0/0x4c0\n ? stack_trace_save+0x90/0xc0\n ? __bio_clone+0x3c0/0x3c0\n ? lock_release+0x4b7/0x670\n ? lock_sync+0x190/0x190\n ? atime_needs_update+0x3bf/0x7e0\n ? timestamp_truncate+0x21b/0x2d0\n ? inode_owner_or_capable+0x240/0x240\n blkdev_direct_IO.part.0+0x84a/0x1810\n ? rcu_is_watching+0x12/0xb0\n ? lock_release+0x4b7/0x670\n ? blkdev_read_iter+0x40d/0x530\n ? reacquire_held_locks+0x4e0/0x4e0\n ? __blkdev_direct_IO_simple+0x780/0x780\n ? rcu_is_watching+0x12/0xb0\n ? __mark_inode_dirty+0x297/0xd50\n ? preempt_count_add+0x72/0x140\n blkdev_read_iter+0x2a4/0x530\n do_iter_readv_writev+0x2f2/0x3c0\n ? generic_copy_file_range+0x1d0/0x1d0\n ? fsnotify_perm.part.0+0x25d/0x630\n ? security_file_permission+0xd8/0x100\n do_iter_read+0x31b/0x880\n ? import_iovec+0x10b/0x140\n vfs_readv+0x12d/0x1a0\n ? vfs_iter_read+0xb0/0xb0\n ? rcu_is_watching+0x12/0xb0\n ? rcu_is_watching+0x12/0xb0\n ? lock_release+0x4b7/0x670\n do_preadv+0x1b3/0x260\n ? do_readv+0x370/0x370\n __x64_sys_preadv2+0xef/0x150\n do_syscall_64+0x39/0xb0\n entry_SYSCALL_64_after_hwframe+0x63/0xcd\nRIP: 0033:0x7f5af41ad806\nCode: 41 54 41 89 fc 55 44 89 c5 53 48 89 cb 48 83 ec 18 80 3d e4 dd 0d 00 00 74 7a 45 89 c1 49 89 ca 45 31 c0 b8 47 01 00 00 0f 05 \u003c48\u003e 3d 00 f0 ff ff 0f 87 be 00 00 00 48 85 c0 79 4a 48 8b 0d da 55\nRSP: 002b:00007ffd3145c7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000147\nRAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5af41ad806\nRDX: 0000000000000001 RSI: 00007ffd3145c850 RDI: 0000000000000003\nRBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000008\nR10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003\nR13: 00007ffd3145c850 R14: 000055f5f0431dd8 R15: 0000000000000001\n \u003c/TASK\u003e\n\nwhere in fact it is\n---truncated---"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-09T01:30:27.903Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d7b2abd87d1fcdb47811f90090a363e7ca15cb14"
        },
        {
          "url": "https://git.kernel.org/stable/c/699775e9338adcd4eaedea000d32c60250c3114d"
        },
        {
          "url": "https://git.kernel.org/stable/c/a9ce385344f916cd1c36a33905e564f5581beae9"
        }
      ],
      "title": "dm: don\u0027t attempt to queue IO under RCU protection",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53860",
    "datePublished": "2025-12-09T01:30:27.903Z",
    "dateReserved": "2025-12-09T01:27:17.828Z",
    "dateUpdated": "2025-12-09T01:30:27.903Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-53860\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-09T16:17:26.740\",\"lastModified\":\"2025-12-09T18:37:13.640\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndm: don\u0027t attempt to queue IO under RCU protection\\n\\ndm looks up the table for IO based on the request type, with an\\nassumption that if the request is marked REQ_NOWAIT, it\u0027s fine to\\nattempt to submit that IO while under RCU read lock protection. This\\nis not OK, as REQ_NOWAIT just means that we should not be sleeping\\nwaiting on other IO, it does not mean that we can\u0027t potentially\\nschedule.\\n\\nA simple test case demonstrates this quite nicely:\\n\\nint main(int argc, char *argv[])\\n{\\n        struct iovec iov;\\n        int fd;\\n\\n        fd = open(\\\"/dev/dm-0\\\", O_RDONLY | O_DIRECT);\\n        posix_memalign(\u0026iov.iov_base, 4096, 4096);\\n        iov.iov_len = 4096;\\n        preadv2(fd, \u0026iov, 1, 0, RWF_NOWAIT);\\n        return 0;\\n}\\n\\nwhich will instantly spew:\\n\\nBUG: sleeping function called from invalid context at include/linux/sched/mm.h:306\\nin_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5580, name: dm-nowait\\npreempt_count: 0, expected: 0\\nRCU nest depth: 1, expected: 0\\nINFO: lockdep is turned off.\\nCPU: 7 PID: 5580 Comm: dm-nowait Not tainted 6.6.0-rc1-g39956d2dcd81 #132\\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014\\nCall Trace:\\n \u003cTASK\u003e\\n dump_stack_lvl+0x11d/0x1b0\\n __might_resched+0x3c3/0x5e0\\n ? preempt_count_sub+0x150/0x150\\n mempool_alloc+0x1e2/0x390\\n ? mempool_resize+0x7d0/0x7d0\\n ? lock_sync+0x190/0x190\\n ? lock_release+0x4b7/0x670\\n ? internal_get_user_pages_fast+0x868/0x2d40\\n bio_alloc_bioset+0x417/0x8c0\\n ? bvec_alloc+0x200/0x200\\n ? internal_get_user_pages_fast+0xb8c/0x2d40\\n bio_alloc_clone+0x53/0x100\\n dm_submit_bio+0x27f/0x1a20\\n ? lock_release+0x4b7/0x670\\n ? blk_try_enter_queue+0x1a0/0x4d0\\n ? dm_dax_direct_access+0x260/0x260\\n ? rcu_is_watching+0x12/0xb0\\n ? blk_try_enter_queue+0x1cc/0x4d0\\n __submit_bio+0x239/0x310\\n ? __bio_queue_enter+0x700/0x700\\n ? kvm_clock_get_cycles+0x40/0x60\\n ? ktime_get+0x285/0x470\\n submit_bio_noacct_nocheck+0x4d9/0xb80\\n ? should_fail_request+0x80/0x80\\n ? preempt_count_sub+0x150/0x150\\n ? lock_release+0x4b7/0x670\\n ? __bio_add_page+0x143/0x2d0\\n ? iov_iter_revert+0x27/0x360\\n submit_bio_noacct+0x53e/0x1b30\\n submit_bio_wait+0x10a/0x230\\n ? submit_bio_wait_endio+0x40/0x40\\n __blkdev_direct_IO_simple+0x4f8/0x780\\n ? blkdev_bio_end_io+0x4c0/0x4c0\\n ? stack_trace_save+0x90/0xc0\\n ? __bio_clone+0x3c0/0x3c0\\n ? lock_release+0x4b7/0x670\\n ? lock_sync+0x190/0x190\\n ? atime_needs_update+0x3bf/0x7e0\\n ? timestamp_truncate+0x21b/0x2d0\\n ? inode_owner_or_capable+0x240/0x240\\n blkdev_direct_IO.part.0+0x84a/0x1810\\n ? rcu_is_watching+0x12/0xb0\\n ? lock_release+0x4b7/0x670\\n ? blkdev_read_iter+0x40d/0x530\\n ? reacquire_held_locks+0x4e0/0x4e0\\n ? __blkdev_direct_IO_simple+0x780/0x780\\n ? rcu_is_watching+0x12/0xb0\\n ? __mark_inode_dirty+0x297/0xd50\\n ? preempt_count_add+0x72/0x140\\n blkdev_read_iter+0x2a4/0x530\\n do_iter_readv_writev+0x2f2/0x3c0\\n ? generic_copy_file_range+0x1d0/0x1d0\\n ? fsnotify_perm.part.0+0x25d/0x630\\n ? security_file_permission+0xd8/0x100\\n do_iter_read+0x31b/0x880\\n ? import_iovec+0x10b/0x140\\n vfs_readv+0x12d/0x1a0\\n ? vfs_iter_read+0xb0/0xb0\\n ? rcu_is_watching+0x12/0xb0\\n ? rcu_is_watching+0x12/0xb0\\n ? lock_release+0x4b7/0x670\\n do_preadv+0x1b3/0x260\\n ? do_readv+0x370/0x370\\n __x64_sys_preadv2+0xef/0x150\\n do_syscall_64+0x39/0xb0\\n entry_SYSCALL_64_after_hwframe+0x63/0xcd\\nRIP: 0033:0x7f5af41ad806\\nCode: 41 54 41 89 fc 55 44 89 c5 53 48 89 cb 48 83 ec 18 80 3d e4 dd 0d 00 00 74 7a 45 89 c1 49 89 ca 45 31 c0 b8 47 01 00 00 0f 05 \u003c48\u003e 3d 00 f0 ff ff 0f 87 be 00 00 00 48 85 c0 79 4a 48 8b 0d da 55\\nRSP: 002b:00007ffd3145c7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000147\\nRAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5af41ad806\\nRDX: 0000000000000001 RSI: 00007ffd3145c850 RDI: 0000000000000003\\nRBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000008\\nR10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003\\nR13: 00007ffd3145c850 R14: 000055f5f0431dd8 R15: 0000000000000001\\n \u003c/TASK\u003e\\n\\nwhere in fact it is\\n---truncated---\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/699775e9338adcd4eaedea000d32c60250c3114d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a9ce385344f916cd1c36a33905e564f5581beae9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d7b2abd87d1fcdb47811f90090a363e7ca15cb14\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…