{"id":"CVE-2026-99853","aliases":["CVE-2026-99853"],"related":[],"kind":"vulnerability","state":"published","title":"nvme-tcp: fix io_work priority inversion when send_mutex is held","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-tcp: fix io_work priority inversion when send_mutex is held\n\nCommit f42d4796ee10 (\"nvme-tcp: fix I/O stalls on congested sockets\")\nadded a check in nvme_tcp_io_work() that sets pending to true when the\nqueue has pending requests and the socket is writeable. The check is\nplaced after the mutex_trylock() block, so it also runs when\nmutex_trylock(&queue->send_mutex) failed and io_work did not send\nanything.\n\nWhen .queue_rq sends a request directly from its own context, it holds\nsend_mutex and can give up the CPU in lock_sock_nested() when another\ntask needs the CPU, for example the io_work kworker of the same queue,\nwhich runs on the same CPU. Then io_work cannot take send_mutex, but\nthe requests are still on req_list and the socket is writeable, so\npending is set to true. io_work loops until the deadline and queues\nitself again on io_cpu, without sleeping.\n\nThis is a priority inversion. io_work runs on the high priority\nnvme_tcp_wq and cannot make progress until send_mutex is released, but\nit keeps running. The task holding send_mutex runs at normal priority\nand needs the CPU to release it. The scheduler keeps giving the CPU to\nio_work, so the task holding send_mutex may not run again, and the\nrequests on the queue are not sent and time out.\n\nThis is the same problem that commit 70f437fb4395 (\"nvme-tcp: fix\nio_work priority inversion\") fixed. That commit removed\n\"pending = !llist_empty(&queue->req_list)\" from the path where\nmutex_trylock() fails, and let the task holding send_mutex queue\nio_work again in nvme_tcp_queue_request() after it releases the mutex.\nThe new check brings back the same behavior in a different form.\n\nTwo things make this easier to hit. nvme_tcp_queue_request() sends\ndirectly only when it runs on io_cpu, so the task that takes send_mutex\nis on the same CPU as the io_work kworker of that queue when it takes\nthe mutex. Also, when the tasks are in a cgroup with the cpu controller\nenabled, the whole group competes with the nice -20 kworker as one\nentity, so each task in the group gets even less CPU time.\n\nWe hit this on a 6 CPU VM running a database on nvme-tcp storage. In\nthe vmcore, 2 tasks held send_mutex of 2 queues and were runnable in\nlock_sock_nested() for 103 seconds, while the kworkers for those queues\nkept running io_work on their CPUs. All database tasks were in one\ncgroup, which got only about 0.3% of the CPU against the nice -20\nkworker. Requests timed out, and blk_mq_timeout_work() waited in\nsynchronize_srcu() for the tasks still in .queue_rq.\n\nOnly do the pending check if io_work could take send_mutex. If it could\nnot, the task holding send_mutex sends what it can in\nnvme_tcp_send_all(), and queues io_work again after it releases the\nmutex if requests are still pending, so no request is left behind.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-tcp: fix io_work priority inversion when send_mutex is held\n\nCommit f42d4796ee10 (\"nvme-tcp: fix I/O stalls on congested sockets\")\nadded a check in nvme_tcp_io_work() that sets pending to true when the\nqueue has pending requests and the socket is writeable. The check is\nplaced after the mutex_trylock() block, so it also runs when\nmutex_trylock(&queue->send_mutex) failed and io_work did not send\nanything.\n\nWhen .queue_rq sends a request directly from its own context, it holds\nsend_mutex and can give up the CPU in lock_sock_nested() when another\ntask needs the CPU, for example the io_work kworker of the same queue,\nwhich runs on the same CPU. Then io_work cannot take send_mutex, but\nthe requests are still on req_list and the socket is writeable, so\npending is set to true. io_work loops until the deadline and queues\nitself again on io_cpu, without sleeping.\n\nThis is a priority inversion. io_work runs on the high priority\nnvme_tcp_wq and cannot make progress until send_mutex is released, but\nit keeps running. The task holding send_mutex runs at normal priority\nand needs the CPU to release it. The scheduler keeps giving the CPU to\nio_work, so the task holding send_mutex may not run again, and the\nrequests on the queue are not sent and time out.\n\nThis is the same problem that commit 70f437fb4395 (\"nvme-tcp: fix\nio_work priority inversion\") fixed. That commit removed\n\"pending = !llist_empty(&queue->req_list)\" from the path where\nmutex_trylock() fails, and let the task holding send_mutex queue\nio_work again in nvme_tcp_queue_request() after it releases the mutex.\nThe new check brings back the same behavior in a different form.\n\nTwo things make this easier to hit. nvme_tcp_queue_request() sends\ndirectly only when it runs on io_cpu, so the task that takes send_mutex\nis on the same CPU as the io_work kworker of that queue when it takes\nthe mutex. Also, when the tasks are in a cgroup with the cpu controller\nenabled, the whole group competes with the nice -20 kworker as one\nentity, so each task in the group gets even less CPU time.\n\nWe hit this on a 6 CPU VM running a database on nvme-tcp storage. In\nthe vmcore, 2 tasks held send_mutex of 2 queues and were runnable in\nlock_sock_nested() for 103 seconds, while the kworkers for those queues\nkept running io_work on their CPUs. All database tasks were in one\ncgroup, which got only about 0.3% of the CPU against the nice -20\nkworker. Requests timed out, and blk_mq_timeout_work() waited in\nsynchronize_srcu() for the tasks still in .queue_rq.\n\nOnly do the pending check if io_work could take send_mutex. If it could\nnot, the task holding send_mutex sends what it can in\nnvme_tcp_send_all(), and queues io_work again after it releases the\nmutex if requests are still pending, so no request is left behind.","source":"cvelist"}],"published":"2026-11-30T13:17:40.304Z","modified":"2026-11-30T14:20:18.850Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"7b86ce16706b985e27fe589675f1dee1708032c8","fixed":"bbca60a0ac5dca1d2f4e547f0fa0402001d12299","status":"affected"},{"type":"git","introduced":"f42d4796ee100fade86086d1cf98537fb4d326c8","fixed":"32bfe3eddb18691b482893c730fd71b0996e4aca","status":"affected"},{"type":"git","introduced":"f42d4796ee100fade86086d1cf98537fb4d326c8","fixed":"6aba58adb5ff9d4b62b820518f409f1ee615021a","status":"affected"},{"type":"git","introduced":"f42d4796ee100fade86086d1cf98537fb4d326c8","fixed":"5db358f3a7f9c33717622c1597d15c4c91997b19","status":"affected"},{"type":"git","version":"8484cbcf59c0f222ef31a3dd2a7ab59506464554","status":"affected"},{"type":"semver","introduced":"6.12.36","fixed":"6.12.118","status":"affected"},{"type":"semver","introduced":"6.15.5","fixed":"6.16","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.12.118","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/bbca60a0ac5dca1d2f4e547f0fa0402001d12299","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/32bfe3eddb18691b482893c730fd71b0996e4aca","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6aba58adb5ff9d4b62b820518f409f1ee615021a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5db358f3a7f9c33717622c1597d15c4c91997b19","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99853","url":"https://www.cve.org/CVERecord?id=CVE-2026-99853","licence":"CVE Terms of Use","modified":"2026-11-30T13:17:40.304Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99853","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99853","licence":"Public domain","modified":"2026-11-30T14:20:18.850Z"}],"updatedAt":"2026-11-30T14:33:33.148Z","epss":{"score":0.00209,"percentile":0.11658,"date":"2026-12-01T12:00:22.000Z"}}