Bug 2301471 (CVE-2024-42108) - CVE-2024-42108 kernel: net: rswitch: Avoid use-after-free in rswitch_poll()
Summary: CVE-2024-42108 kernel: net: rswitch: Avoid use-after-free in rswitch_poll()
Keywords:
Status: NEW
Alias: CVE-2024-42108
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2301770
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-30 08:30 UTC by OSIDB Bzimport
Modified: 2024-09-19 16:27 UTC (History)
4 users (show)

Fixed In Version: kernel 6.9.9, kernel 6.10
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-07-30 08:30:16 UTC
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.

Comment 1 Mauro Matteo Cascella 2024-07-30 18:41:43 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024073021-CVE-2024-42108-7e70@gregkh/T

Comment 3 Mauro Matteo Cascella 2024-07-30 18:42:07 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301770]


Note You need to log in before you can comment on or make changes to this bug.