net: netpoll: initialize work queue before error checks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.17.136.18.26.19In the Linux kernel, the following vulnerability has been resolved:
net: netpoll: initialize work queue before error checks
Prevent a kernel warning when netconsole setup fails on devices with IFF_DISABLE_NETPOLL flag. The warning (at kernel/workqueue.c:4242 in __flush_work) occurs because the cleanup path tries to cancel an uninitialized work queue.
When __netpoll_setup() encounters a device with IFF_DISABLE_NETPOLL, it fails early and calls skb_pool_flush() for cleanup. This function calls cancel_work_sync(&np->refill_wq), but refill_wq hasn't been initialized yet, triggering the warning.
Move INIT_WORK() to the beginning of __netpoll_setup(), ensuring the work queue is properly initialized before any potential failure points. This allows the cleanup path to safely cancel the work queue regardless of where the setup fails.
From the CVE record · Linux
The Linux kernel’s netpoll setup can trigger a kernel warning when netconsole setup fails on a device with the IFF_DISABLE_NETPOLL flag. The cleanup path attempts to cancel a work queue before it has been initialized. The input does not describe an attacker, authentication requirement, or user interaction.
Engineers running Linux kernels with netconsole should check whether their kernel includes the netpoll fix; affected versions are not specified.