{"id":"CVE-2024-50127","state":"PUBLISHED","title":"net: sched: fix use-after-free in taprio_change()","description":"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.","publishedAt":"2024-11-05T17:10:54.385Z","updatedAt":"2026-10-15T00:57:08.737Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"2f868ce6013548a713c431c679ef73747a66fcf3","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"8a283a19026aaae8a773fd8061263cfa315b127f","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"999612996df28d81f163dad530d7f8026e03aec6","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"fe371f084073e8672a2d7d46b335c3c060d1e301","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"0d4c0d2844e4eac3aed647f948fd7e60eea56a61","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"2240f9376f20f8b6463232b4ca7292569217237f","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"f504465970aebb2467da548f7c1efbbf36d0f44b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_taprio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.2","versionType":"semver"},{"version":"5.4.285","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.229","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.170","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.115","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.59","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.6","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_taprio.c"]}],"references":["https://git.kernel.org/stable/c/2f868ce6013548a713c431c679ef73747a66fcf3","https://git.kernel.org/stable/c/8a283a19026aaae8a773fd8061263cfa315b127f","https://git.kernel.org/stable/c/999612996df28d81f163dad530d7f8026e03aec6","https://git.kernel.org/stable/c/fe371f084073e8672a2d7d46b335c3c060d1e301","https://git.kernel.org/stable/c/0d4c0d2844e4eac3aed647f948fd7e60eea56a61","https://git.kernel.org/stable/c/2240f9376f20f8b6463232b4ca7292569217237f","https://git.kernel.org/stable/c/f504465970aebb2467da548f7c1efbbf36d0f44b","https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","https://cert-portal.siemens.com/productcert/html/ssa-265688.html"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/50xxx/CVE-2024-50127.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-50127","state":"PUBLISHED","datePublished":"2024-11-05T17:10:54.385Z","dateUpdated":"2026-10-15T00:57:08.737Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-10-21T19:36:19.954Z"},"containers":{"cna":{"title":"net: sched: fix use-after-free in taprio_change()","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"2f868ce6013548a713c431c679ef73747a66fcf3","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"8a283a19026aaae8a773fd8061263cfa315b127f","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"999612996df28d81f163dad530d7f8026e03aec6","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"fe371f084073e8672a2d7d46b335c3c060d1e301","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"0d4c0d2844e4eac3aed647f948fd7e60eea56a61","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"2240f9376f20f8b6463232b4ca7292569217237f","versionType":"git"},{"version":"a3d43c0d56f1b94e74963a2fbadfb70126d92213","status":"affected","lessThan":"f504465970aebb2467da548f7c1efbbf36d0f44b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_taprio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.2","versionType":"semver"},{"version":"5.4.285","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.229","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.170","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.115","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.59","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.6","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sched/sch_taprio.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2f868ce6013548a713c431c679ef73747a66fcf3"},{"url":"https://git.kernel.org/stable/c/8a283a19026aaae8a773fd8061263cfa315b127f"},{"url":"https://git.kernel.org/stable/c/999612996df28d81f163dad530d7f8026e03aec6"},{"url":"https://git.kernel.org/stable/c/fe371f084073e8672a2d7d46b335c3c060d1e301"},{"url":"https://git.kernel.org/stable/c/0d4c0d2844e4eac3aed647f948fd7e60eea56a61"},{"url":"https://git.kernel.org/stable/c/2240f9376f20f8b6463232b4ca7292569217237f"},{"url":"https://git.kernel.org/stable/c/f504465970aebb2467da548f7c1efbbf36d0f44b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"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 — 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 — 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:41:53.116Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"5.4.285"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"5.10.229"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"5.15.170"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.1.115"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.6.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.11.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.2","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-50127","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2024-12-11T14:28:21.328657Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-12-11T14:58:33.392Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:25:48.715Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V1.1.1","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T00:57:08.737Z"},"x_adpType":"supplier"}]}}}