Use After Free in Linux

CVE-2024-42108

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.

Vulnerability class: Use-After-Free

EPSS: 0.006 (47.3th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Affected products

  • Linux — versions 0aeec4bb6a9fc963932bf3c929bdf27d835d44e9, 271e015b91535dd87fd0f5df0cc3b906c2eddef9, 6.8
  • Linux Linux_kernel

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2024-42108?
CVE-2024-42108 is a critical-severity vulnerability in Linux, classified under Use After Free. CVSS score: 9.8/10. Published 2024-07-30.
How severe is CVE-2024-42108?
Critical severity. CVSS v3 base score is 9.8 out of 10.