CVE-2024-42071

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42071
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42071.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-42071
Related
Published
2024-07-29T16:15:06Z
Modified
2024-09-18T03:26:32.903648Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

ionic: use devconsumeskb_any outside of napi

If we're not in a NAPI softirq context, we need to be careful about how we call napiconsumeskb(), specifically we need to call it with budget==0 to signal to it that we're not in a safe context.

This was found while running some configuration stress testing of traffic and a change queue config loop running, and this curious note popped out:

[ 4371.402645] BUG: using smpprocessorid() in preemptible [00000000] code: ethtool/20545 [ 4371.402897] caller is napiskbcacheput+0x16/0x80 [ 4371.403120] CPU: 25 PID: 20545 Comm: ethtool Kdump: loaded Tainted: G OE 6.10.0-rc3-netnext+ #8 [ 4371.403302] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 01/23/2021 [ 4371.403460] Call Trace: [ 4371.403613] <TASK> [ 4371.403758] dumpstacklvl+0x4f/0x70 [ 4371.403904] checkpreemptiondisabled+0xc1/0xe0 [ 4371.404051] napiskbcacheput+0x16/0x80 [ 4371.404199] ionictxclean+0x18a/0x240 [ionic] [ 4371.404354] ionictxcqservice+0xc4/0x200 [ionic] [ 4371.404505] ionictxflush+0x15/0x70 [ionic] [ 4371.404653] ? ioniclifqcqdeinit.isra.23+0x5b/0x70 [ionic] [ 4371.404805] ionictxrxdeinit+0x71/0x190 [ionic] [ 4371.404956] ionicreconfigurequeues+0x5f5/0xff0 [ionic] [ 4371.405111] ionicsetringparam+0x2e8/0x3e0 [ionic] [ 4371.405265] ethnlsetrings+0x1f1/0x300 [ 4371.405418] ethnldefaultsetdoit+0xbb/0x160 [ 4371.405571] genlfamilyrcvmsg_doit+0xff/0x130 [...]

I found that ionictxclean() calls napiconsumeskb() which calls napiskbcacheput(), but before that last call is the note /* Zero budget indicate non-NAPI context called us, like netpoll */ and DEBUGNETWARNONONCE(!insoftirq());

Those are pretty big hints that we're doing it wrong. We can pass a context hint down through the calls to let ionictxclean() know what we're doing so it can call napiconsumeskb() correctly.

References

Affected packages

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.9.8-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1
6.1.99-1
6.1.106-1
6.1.106-2
6.1.106-3
6.3.1-1~exp1
6.3.2-1~exp1
6.3.4-1~exp1
6.3.5-1~exp1
6.3.7-1~bpo12+1
6.3.7-1
6.3.11-1
6.4~rc6-1~exp1
6.4~rc7-1~exp1
6.4.1-1~exp1
6.4.4-1~bpo12+1
6.4.4-1
6.4.4-2
6.4.4-3~bpo12+1
6.4.4-3
6.4.11-1
6.4.13-1
6.5~rc4-1~exp1
6.5~rc6-1~exp1
6.5~rc7-1~exp1
6.5.1-1~exp1
6.5.3-1~bpo12+1
6.5.3-1
6.5.6-1
6.5.8-1
6.5.10-1~bpo12+1
6.5.10-1
6.5.13-1
6.6.3-1~exp1
6.6.4-1~exp1
6.6.7-1~exp1
6.6.8-1
6.6.9-1
6.6.11-1
6.6.13-1~bpo12+1
6.6.13-1
6.6.15-1
6.6.15-2
6.7-1~exp1
6.7.1-1~exp1
6.7.4-1~exp1
6.7.7-1
6.7.9-1
6.7.9-2
6.7.12-1~bpo12+1
6.7.12-1
6.8.9-1
6.8.11-1
6.8.12-1~bpo12+1
6.8.12-1
6.9.2-1~exp1
6.9.7-1~bpo12+1
6.9.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}