{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-57795",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-57795"
  ],
  "published": "2025-01-15T13:11:32Z",
  "summary": "RDMA/rxe: Remove the direct link to net_device",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: Remove the direct link to net_device\n\nThe similar patch in siw is in the link:\nhttps://git.kernel.org/rdma/rdma/c/16b87037b48889\n\nThis problem also occurred in RXE. The following analyze this problem.\nIn the following Call Traces:\n\"\nBUG: KASAN: slab-use-after-free in dev_get_flags+0x188/0x1d0 net/core/dev.c:8782\nRead of size 4 at addr ffff8880554640b0 by task kworker/1:4/5295\n\nCPU: 1 UID: 0 PID: 5295 Comm: kworker/1:4 Not tainted\n6.12.0-rc3-syzkaller-00399-g9197b73fd7bb #0\nHardware name: Google Compute Engine/Google Compute Engine,\nBIOS Google 09/13/2024\nWorkqueue: infiniband ib_cache_event_task\nCall Trace:\n <TASK>\n __dump_stack lib/dump_stack.c:94 [inline]\n dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120\n print_address_description mm/kasan/report.c:377 [inline]\n print_report+0x169/0x550 mm/kasan/report.c:488\n kasan_report+0x143/0x180 mm/kasan/report.c:601\n dev_get_flags+0x188/0x1d0 net/core/dev.c:8782\n rxe_query_port+0x12d/0x260 drivers/infiniband/sw/rxe/rxe_verbs.c:60\n __ib_query_port drivers/infiniband/core/device.c:2111 [inline]\n ib_query_port+0x168/0x7d0 drivers/infiniband/core/device.c:2143\n ib_cache_update+0x1a9/0xb80 drivers/infiniband/core/cache.c:1494\n ib_cache_event_task+0xf3/0x1e0 drivers/infiniband/core/cache.c:1568\n process_one_work kernel/workqueue.c:3229 [inline]\n process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310\n worker_thread+0x870/0xd30 kernel/workqueue.c:3391\n kthread+0x2f2/0x390 kernel/kthread.c:389\n ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\n </TASK>\n\"\n\n1). In the link [1],\n\n\"\n infiniband syz2: set down\n\"\n\nThis means that on 839.350575, the event ib_cache_event_task was sent andi\nqueued in ib_wq.\n\n2). In the link [1],\n\n\"\n team0 (unregistering): Port device team_slave_0 removed\n\"\n\nIt indicates that before 843.251853, the net device should be freed.\n\n3). In the link [1],\n\n\"\n BUG: KASAN: slab-use-after-free in dev_get_flags+0x188/0x1d0\n\"\n\nThis means that on 850.559070, this slab-use-after-free problem occurred.\n\nIn all, on 839.350575, the event ib_cache_event_task was sent and queued\nin ib_wq,\n\nbefore 843.251853, the net device veth was freed.\n\non 850.559070, this event was executed, and the mentioned freed net device\nwas called. Thus, the above call trace occurred.\n\n[1] https://syzkaller.appspot.com/x/log.txt?x=12e7025f980000",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-57795"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/32ca3557d968e662957131374a5f81c9c9cdbba8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9f6f54e6a6863131442b40e14d1792b090c7ce21"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2ac5415022d16d63d912a39a06f32f1f51140261"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The dangling `rxe->ndev` is dereferenced from local paths \u2014 RDMA netlink link add/del, netdev up/down/unregister events, and uverbs QUERY_PORT/ATTACH_MCAST on /dev/infiniband/uverbsN. Incoming RoCEv2 packets use `skb->dev` rather than the cached pointer, so there is no remote trigger.\nAC:L - The attacker drives both halves deterministically: bring the netdev down to queue `ib_cache_event_task`, then delete the netdev so `free_netdevs()` drops the last reference before `flush_workqueue(ib_wq)` runs the pending work. syzbot reproduced it, and the sequence can be looped until it lands.\nPR:L - On a system with Soft-RoCE already configured, the UAF dereference sites (`rxe_query_port`, `rxe_mcast_add`/`rxe_mcast_del`) are reachable by any local unprivileged user through the world-accessible uverbs character device and sysfs port attributes. This matches the scoring of the same class of RDMA lifetime UAFs (CVE-2025-22085, CVE-2025-38022, CVE-2025-38024).\nUI:N - The entire sequence is performed by the attacker via netlink and verbs calls; no victim action or cooperation is needed.\nS:U - The freed `struct net_device` and the corrupting code both live in the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a slab use-after-free on `struct net_device`; the attacker can spray the freed slab and have `dev_get_flags()`/`netif_running()`/`netdev_name()` read back reclaimed content, and the leaked port state and device-name data flow back to userspace via query_port and dev_info.\nI:H - `dev_mc_add()`/`dev_mc_del()` on the freed netdev perform list manipulation into reclaimed slab memory and then indirect-call `dev->netdev_ops->ndo_set_rx_mode` through a freed function-pointer table, giving a write and control-flow-hijack primitive.\nA:H - The confirmed KASAN slab-use-after-free read in `dev_get_flags()` panics the kernel with `panic_on_warn`/KASAN and readily oopses otherwise, and the multicast paths corrupt freed heap state leading to further crashes."
    }
  }
}
