pktgen: use cpus_read_lock() in pg_net_init()
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pktgen: use cpus_read_lock() in pg_net_init()
I have seen the WARN_ON(smp_processor_id() != cpu) firing in pktgen_thread_worker() during tests.
We must use cpus_read_lock()/cpus_read_unlock() around the for_each_online_cpu(cpu) loop.
While we are at it use WARN_ON_ONCE() to avoid a possible syslog flood.
From the CVE record · Linux
The Linux kernel's pktgen initialization did not hold the CPU read lock while iterating over online CPUs, and tests triggered a warning in pktgen_thread_worker(). The input does not establish an attacker action or specify network or local access, authentication, or user-interaction requirements.
Engineers running the Linux kernel with pktgen should check their versions; affected versions were not provided.