{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-50127",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-50127"
  ],
  "published": "2024-11-05T17:11:07Z",
  "summary": "net: sched: fix use-after-free in taprio_change()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: sched: fix use-after-free in taprio_change()\n\nIn 'taprio_change()', 'admin' pointer may become dangling due to sched\nswitch / removal caused by 'advance_sched()', and critical section\nprotected by 'q->current_entry_lock' is too small to prevent from such\na scenario (which causes use-after-free detected by KASAN). Fix this\nby prefer 'rcu_replace_pointer()' over 'rcu_assign_pointer()' to update\n'admin' immediately before an attempt to schedule freeing.",
  "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": "6.1.115",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-50127"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2f868ce6013548a713c431c679ef73747a66fcf3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8a283a19026aaae8a773fd8061263cfa315b127f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/999612996df28d81f163dad530d7f8026e03aec6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/fe371f084073e8672a2d7d46b335c3c060d1e301"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0d4c0d2844e4eac3aed647f948fd7e60eea56a61"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2240f9376f20f8b6463232b4ca7292569217237f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f504465970aebb2467da548f7c1efbbf36d0f44b"
    }
  ],
  "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 vulnerability is reached through the tc/qdisc netlink configuration interface (RTM_NEWQDISC/RTM_CHANGEQDISC on the taprio qdisc), which requires local system access to open an AF_NETLINK socket. No remote packet processing path reaches taprio_change().\nAC:L - The attacker controls both sides of the race: the schedule's base-time, cycle-time and per-entry intervals determine precisely when advance_sched() fires and promotes the admin schedule, while a large gate-control list arbitrarily widens the unlocked parse window in taprio_change(). advance_sched() takes neither rtnl nor qdisc_lock, so nothing serializes it, and syzkaller reproduced the UAF by fuzzing alone.\nPR:L - tc_modify_qdisc is gated only by netlink_net_capable(skb, CAP_NET_ADMIN), which is namespace-aware, so an unprivileged user can obtain it via `unshare -Urn` and then create a multiqueue dummy/veth device to host the taprio qdisc. Per kernel scoring convention, CAP_NET_ADMIN reachable through user namespaces is Low, not High.\nUI:N - The attacker performs every step alone \u2014 creating the netns, the multiqueue device, the taprio qdisc, and issuing the two racing schedule changes. No victim action is involved.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; there is no crossing of a hypervisor, IOMMU, or other distinct security boundary.\nC:H - Freeing the live sched_gate_list while q->oper_sched still points at it lets the attacker reclaim the kmalloc-512 allocation with a controlled object that the dequeue/dump paths then read, and the double-free plus list walk over reallocated memory yields primitives capable of arbitrary kernel memory disclosure.\nI:H - advance_sched() writes 64-bit attacker-influenced values (cycle_end_time, end_time, gate_close_time[], budgets) at known offsets into the freed objects, and taprio_free_sched_cb() later performs list_del writes and kfree() on pointers read from reallocated memory \u2014 an arbitrary-write/arbitrary-free chain suitable for privilege escalation.\nA:H - The use-after-free and subsequent double free of the operational schedule reliably corrupt the slab allocator and panic the kernel (KASAN-detected), and the attacker can trigger it repeatedly, taking down TSN-critical automotive and industrial systems where taprio is deployed."
    }
  }
}
