CVE-2024-42071
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
29/07/2024
Last modified:
30/07/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ionic: use dev_consume_skb_any outside of napi<br />
<br />
If we&#39;re not in a NAPI softirq context, we need to be careful<br />
about how we call napi_consume_skb(), specifically we need to<br />
call it with budget==0 to signal to it that we&#39;re not in a<br />
safe context.<br />
<br />
This was found while running some configuration stress testing<br />
of traffic and a change queue config loop running, and this<br />
curious note popped out:<br />
<br />
[ 4371.402645] BUG: using smp_processor_id() in preemptible [00000000] code: ethtool/20545<br />
[ 4371.402897] caller is napi_skb_cache_put+0x16/0x80<br />
[ 4371.403120] CPU: 25 PID: 20545 Comm: ethtool Kdump: loaded Tainted: G OE 6.10.0-rc3-netnext+ #8<br />
[ 4371.403302] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 01/23/2021<br />
[ 4371.403460] Call Trace:<br />
[ 4371.403613] <br />
[ 4371.403758] dump_stack_lvl+0x4f/0x70<br />
[ 4371.403904] check_preemption_disabled+0xc1/0xe0<br />
[ 4371.404051] napi_skb_cache_put+0x16/0x80<br />
[ 4371.404199] ionic_tx_clean+0x18a/0x240 [ionic]<br />
[ 4371.404354] ionic_tx_cq_service+0xc4/0x200 [ionic]<br />
[ 4371.404505] ionic_tx_flush+0x15/0x70 [ionic]<br />
[ 4371.404653] ? ionic_lif_qcq_deinit.isra.23+0x5b/0x70 [ionic]<br />
[ 4371.404805] ionic_txrx_deinit+0x71/0x190 [ionic]<br />
[ 4371.404956] ionic_reconfigure_queues+0x5f5/0xff0 [ionic]<br />
[ 4371.405111] ionic_set_ringparam+0x2e8/0x3e0 [ionic]<br />
[ 4371.405265] ethnl_set_rings+0x1f1/0x300<br />
[ 4371.405418] ethnl_default_set_doit+0xbb/0x160<br />
[ 4371.405571] genl_family_rcv_msg_doit+0xff/0x130<br />
[...]<br />
<br />
I found that ionic_tx_clean() calls napi_consume_skb() which calls<br />
napi_skb_cache_put(), but before that last call is the note<br />
/* Zero budget indicate non-NAPI context called us, like netpoll */<br />
and<br />
DEBUG_NET_WARN_ON_ONCE(!in_softirq());<br />
<br />
Those are pretty big hints that we&#39;re doing it wrong. We can pass a<br />
context hint down through the calls to let ionic_tx_clean() know what<br />
we&#39;re doing so it can call napi_consume_skb() correctly.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9.1 (including) | 6.9.8 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



