CVE-2024-42108
JSON

9.8critical

net: rswitch: Avoid use-after-free in rswitch_poll()

Severity
9.8critical CVSS:3.1 by Linux
Exploit likelihood
0.63% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net: rswitch: Avoid use-after-free in rswitch_poll() The use-after-free is actually in rswitch_tx_free(), which is inlined in rswitch_poll(). Since `skb` and `gq->skbs[gq->dirty]` are in fact the same pointer, the skb is first freed using dev_kfree_skb_any(), then the value in skb->len is used to update the interface statistics. Let's move around the instructions to use skb->len before the skb is freed. This bug is trivial to reproduce using KFENCE. It will trigger a splat every few packets. A simple ARP request or ICMP echo request is enough.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 0aeec4bb6a9fc963932bf3c929bdf27d835d44e9 before 4a41bb9f2b402469d425a1c13359d3b3ea4e6403, from 271e015b91535dd87fd0f5df0cc3b906c2eddef9 before 92cbbe7759193e3418f38d0d73f8fe125312c58b, from 271e015b91535dd87fd0f5df0cc3b906c2eddef9 before 9a0c28efeec6383ef22e97437616b920e7320b67, 6.8
Not affected: before 6.8, from 6.9.9 up to 6.9.*, from 6.10 up to *
CVE List
linux linux_kernelfrom 6.8 before 6.9.9NVD

All scores

Linux9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-416

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: net: rswitch: Avoid use-after-free in rswitch_poll() The use-after-free is actually in rswitch_tx_free(), which is inlined in rswitch_poll(). Since `skb` and `gq->skbs[gq->dirty]` are in fact the same pointer, the skb is first freed using dev_kfree_skb_any(), then the value in skb->len is used to update the interface statistics. Let's move around the instructions to use skb->len before the skb is freed. This bug is trivial to reproduce using KFENCE. It will trigger a splat every few packets. A simple ARP request or ICMP echo request is enough.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: rswitch: Evite el use after free en rswitch_poll() El use after free está en realidad en rswitch_tx_free(), que está incluido en rswitch_poll(). Dado que `skb` y `gq->skbs[gq->dirty]` son de hecho el mismo puntero, el skb primero se libera usando dev_kfree_skb_any(), luego el valor en skb->len se usa para actualizar las estadísticas de la interfaz. Avancemos por las instrucciones para usar skb->len antes de liberar el skb. Este error es trivial de reproducir usando KFENCE. Activará un sonido cada pocos paquetes. Una simple solicitud ARP o una solicitud de eco ICMP es suficiente.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-42108 changed 2026-08-05CVE Terms of Use
NVDCVE-2024-42108 changed 2026-08-04Public domain