Lucene search

K
cvelistLinuxCVELIST:CVE-2024-42108
HistoryJul 30, 2024 - 7:46 a.m.

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

2024-07-3007:46:03
Linux
www.cve.org
4
linux kernel
cve-2024-42108
rswitch
use-after-free
rswitch_poll
skb
kfence
arp
icmp

EPSS

0

Percentile

9.4%

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.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/renesas/rswitch.c"
    ],
    "versions": [
      {
        "version": "271e015b9153",
        "lessThan": "92cbbe775919",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "271e015b9153",
        "lessThan": "9a0c28efeec6",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/net/ethernet/renesas/rswitch.c"
    ],
    "versions": [
      {
        "version": "6.8",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "6.8",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.9.9",
        "lessThanOrEqual": "6.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

EPSS

0

Percentile

9.4%