{"id":"CVE-2026-46031","aliases":["CVE-2026-46031"],"related":[],"kind":"vulnerability","state":"published","title":"net: ks8851: Reinstate disabling of BHs around IRQ handler","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: ks8851: Reinstate disabling of BHs around IRQ handler\n\nIf the driver executes ks8851_irq() AND a TX packet has been sent, then\nthe driver enables TX queue via netif_wake_queue() which schedules TX\nsoftirq to queue packets for this device.\n\nIf CONFIG_PREEMPT_RT=y is set AND a packet has also been received by\nthe MAC, then ks8851_rx_pkts() calls netdev_alloc_skb_ip_align() to\nallocate SKBs for the received packets. If netdev_alloc_skb_ip_align()\nis called with BH enabled, then local_bh_enable() at the end of\nnetdev_alloc_skb_ip_align() will trigger the pending softirq processing,\nwhich may ultimately call the .xmit callback ks8851_start_xmit_par().\nThe ks8851_start_xmit_par() will try to lock struct ks8851_net_par\n.lock spinlock, which is already locked by ks8851_irq() from which\nks8851_start_xmit_par() was called. This leads to a deadlock, which\nis reported by the kernel, including a trace listed below.\n\nIf CONFIG_PREEMPT_RT is not set, then since commit 0913ec336a6c0\n(\"net: ks8851: Fix deadlock with the SPI chip variant\") the deadlock\ncan also be triggered without received packet in the RX FIFO. The\npending softirqs will be processed on return from\nspin_unlock_bh(&ks->statelock) in ks8851_irq(), which triggers the\ndeadlock as well.\n\nFix the problem by disabling BH around critical sections, including the\nIRQ handler, thus preventing the net_tx_action() softirq from triggering\nduring these critical sections. The net_tx_action() softirq is triggered\nonce BH are re-enabled and at the end of the IRQ handler, once all the\nother IRQ handler actions have been completed.\n\n __schedule from schedule_rtlock+0x1c/0x34\n schedule_rtlock from rtlock_slowlock_locked+0x548/0x904\n rtlock_slowlock_locked from rt_spin_lock+0x60/0x9c\n rt_spin_lock from ks8851_start_xmit_par+0x74/0x1a8\n ks8851_start_xmit_par from netdev_start_xmit+0x20/0x44\n netdev_start_xmit from dev_hard_start_xmit+0xd0/0x188\n dev_hard_start_xmit from sch_direct_xmit+0xb8/0x25c\n sch_direct_xmit from __qdisc_run+0x1f8/0x4ec\n __qdisc_run from qdisc_run+0x1c/0x28\n qdisc_run from net_tx_action+0x1f0/0x268\n net_tx_action from handle_softirqs+0x1a4/0x270\n handle_softirqs from __local_bh_enable_ip+0xcc/0xe0\n __local_bh_enable_ip from __alloc_skb+0xd8/0x128\n __alloc_skb from __netdev_alloc_skb+0x3c/0x19c\n __netdev_alloc_skb from ks8851_irq+0x388/0x4d4\n ks8851_irq from irq_thread_fn+0x24/0x64\n irq_thread_fn from irq_thread+0x178/0x28c\n irq_thread from kthread+0x12c/0x138\n kthread from ret_from_fork+0x14/0x28","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: ks8851: Reinstate disabling of BHs around IRQ handler\n\nIf the driver executes ks8851_irq() AND a TX packet has been sent, then\nthe driver enables TX queue via netif_wake_queue() which schedules TX\nsoftirq to queue packets for this device.\n\nIf CONFIG_PREEMPT_RT=y is set AND a packet has also been received by\nthe MAC, then ks8851_rx_pkts() calls netdev_alloc_skb_ip_align() to\nallocate SKBs for the received packets. If netdev_alloc_skb_ip_align()\nis called with BH enabled, then local_bh_enable() at the end of\nnetdev_alloc_skb_ip_align() will trigger the pending softirq processing,\nwhich may ultimately call the .xmit callback ks8851_start_xmit_par().\nThe ks8851_start_xmit_par() will try to lock struct ks8851_net_par\n.lock spinlock, which is already locked by ks8851_irq() from which\nks8851_start_xmit_par() was called. This leads to a deadlock, which\nis reported by the kernel, including a trace listed below.\n\nIf CONFIG_PREEMPT_RT is not set, then since commit 0913ec336a6c0\n(\"net: ks8851: Fix deadlock with the SPI chip variant\") the deadlock\ncan also be triggered without received packet in the RX FIFO. The\npending softirqs will be processed on return from\nspin_unlock_bh(&ks->statelock) in ks8851_irq(), which triggers the\ndeadlock as well.\n\nFix the problem by disabling BH around critical sections, including the\nIRQ handler, thus preventing the net_tx_action() softirq from triggering\nduring these critical sections. The net_tx_action() softirq is triggered\nonce BH are re-enabled and at the end of the IRQ handler, once all the\nother IRQ handler actions have been completed.\n\n __schedule from schedule_rtlock+0x1c/0x34\n schedule_rtlock from rtlock_slowlock_locked+0x548/0x904\n rtlock_slowlock_locked from rt_spin_lock+0x60/0x9c\n rt_spin_lock from ks8851_start_xmit_par+0x74/0x1a8\n ks8851_start_xmit_par from netdev_start_xmit+0x20/0x44\n netdev_start_xmit from dev_hard_start_xmit+0xd0/0x188\n dev_hard_start_xmit from sch_direct_xmit+0xb8/0x25c\n sch_direct_xmit from __qdisc_run+0x1f8/0x4ec\n __qdisc_run from qdisc_run+0x1c/0x28\n qdisc_run from net_tx_action+0x1f0/0x268\n net_tx_action from handle_softirqs+0x1a4/0x270\n handle_softirqs from __local_bh_enable_ip+0xcc/0xe0\n __local_bh_enable_ip from __alloc_skb+0xd8/0x128\n __alloc_skb from __netdev_alloc_skb+0x3c/0x19c\n __netdev_alloc_skb from ks8851_irq+0x388/0x4d4\n ks8851_irq from irq_thread_fn+0x24/0x64\n irq_thread_fn from irq_thread+0x178/0x28c\n irq_thread from kthread+0x12c/0x138\n kthread from ret_from_fork+0x14/0x28","source":"cvelist"}],"published":"2026-05-27T12:56:40.357Z","modified":"2026-08-05T12:29:14.460Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"8a3ff43dcbab7c96f9e8cf2bd1049ab8d6e59545","fixed":"1962027a6d223f90df8b372929f9d1a8d321ad6a","status":"affected"},{"type":"git","introduced":"ae87f661f3c1a3134a7ed86ab69bf9f12af88993","fixed":"640a7631d31db87d5fa1b34cea44a99b6e78854b","status":"affected"},{"type":"git","introduced":"e0863634bf9f7cf36291ebb5bfa2d16632f79c49","fixed":"518040324067d8efaa2da1992297b7e7bf5640f4","status":"affected"},{"type":"git","introduced":"e0863634bf9f7cf36291ebb5bfa2d16632f79c49","fixed":"be8aad558b4675f45b43080f81a9ffdeddea73a5","status":"affected"},{"type":"git","introduced":"e0863634bf9f7cf36291ebb5bfa2d16632f79c49","fixed":"21f1707a8e978558dcb11b053855521e32ac0eec","status":"affected"},{"type":"git","introduced":"e0863634bf9f7cf36291ebb5bfa2d16632f79c49","fixed":"5c9fcac3c872224316714d0d8914d9af16c76a6d","status":"affected"},{"type":"git","version":"7e2901a2a9195da76111f351584bf77552a038f0","status":"affected"},{"type":"semver","introduced":"6.1.91","fixed":"6.1.175","status":"affected"},{"type":"semver","introduced":"6.6.31","fixed":"6.6.140","status":"affected"},{"type":"semver","introduced":"6.8.10","fixed":"6.9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.9","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.140","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.86","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.27","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.4","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.1.91","fixed":"6.1.175"},{"status":"affected","introduced":"6.6.31","fixed":"6.6.140"},{"status":"affected","introduced":"6.8.10","fixed":"6.9"},{"status":"affected","introduced":"6.9.1","fixed":"6.12.86"},{"status":"affected","introduced":"6.13","fixed":"6.18.27"},{"status":"affected","introduced":"6.19","fixed":"7.0.4"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1962027a6d223f90df8b372929f9d1a8d321ad6a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/640a7631d31db87d5fa1b34cea44a99b6e78854b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/518040324067d8efaa2da1992297b7e7bf5640f4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/be8aad558b4675f45b43080f81a9ffdeddea73a5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/21f1707a8e978558dcb11b053855521e32ac0eec","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5c9fcac3c872224316714d0d8914d9af16c76a6d","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46031","url":"https://www.cve.org/CVERecord?id=CVE-2026-46031","licence":"CVE Terms of Use","modified":"2026-08-05T12:29:14.460Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46031","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46031","licence":"Public domain","modified":"2026-06-17T10:52:55.930Z"}],"updatedAt":"2026-11-25T22:59:22.552Z","epss":{"score":0.0037,"percentile":0.32907,"date":"2026-12-01T12:00:22.000Z"}}