{"id":"CVE-2024-55639","state":"PUBLISHED","title":"net: renesas: rswitch: avoid use-after-put for a device tree node","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: renesas: rswitch: avoid use-after-put for a device tree node\n\nThe device tree node saved in the rswitch_device structure is used at\nseveral driver locations. So passing this node to of_node_put() after\nthe first use is wrong.\n\nMove of_node_put() for this node to exit paths.","publishedAt":"2025-01-11T12:29:55.309Z","updatedAt":"2026-08-05T11:44:52.040Z","severity":{"score":8.4,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/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":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"bf8c6755f02029d1eddc3ff19b870240f054afc7","versionType":"git"},{"version":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"92007a28f95413058a7268dc84e5f44b700165d1","versionType":"git"},{"version":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"66b7e9f85b8459c823b11e9af69dbf4be5eb6be8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/renesas/rswitch.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.67","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.6","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/renesas/rswitch.c"]}],"references":["https://git.kernel.org/stable/c/bf8c6755f02029d1eddc3ff19b870240f054afc7","https://git.kernel.org/stable/c/92007a28f95413058a7268dc84e5f44b700165d1","https://git.kernel.org/stable/c/66b7e9f85b8459c823b11e9af69dbf4be5eb6be8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:04.920Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/55xxx/CVE-2024-55639.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-55639","state":"PUBLISHED","datePublished":"2025-01-11T12:29:55.309Z","dateUpdated":"2026-08-05T11:44:52.040Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-01-09T09:51:32.415Z"},"containers":{"cna":{"title":"net: renesas: rswitch: avoid use-after-put for a device tree node","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: renesas: rswitch: avoid use-after-put for a device tree node\n\nThe device tree node saved in the rswitch_device structure is used at\nseveral driver locations. So passing this node to of_node_put() after\nthe first use is wrong.\n\nMove of_node_put() for this node to exit paths."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"bf8c6755f02029d1eddc3ff19b870240f054afc7","versionType":"git"},{"version":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"92007a28f95413058a7268dc84e5f44b700165d1","versionType":"git"},{"version":"b46f1e5793298c67efc2f1b917350a2cefacf9d6","status":"affected","lessThan":"66b7e9f85b8459c823b11e9af69dbf4be5eb6be8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/renesas/rswitch.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.67","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.6","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/renesas/rswitch.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bf8c6755f02029d1eddc3ff19b870240f054afc7"},{"url":"https://git.kernel.org/stable/c/92007a28f95413058a7268dc84e5f44b700165d1"},{"url":"https://git.kernel.org/stable/c/66b7e9f85b8459c823b11e9af69dbf4be5eb6be8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The affected code is entirely in the rswitch platform driver's probe/init path (`rswitch_probe()` → `rswitch_init()` → `rswitch_device_alloc()`/`rswitch_ether_port_init_all()`), reached through local device/driver lifecycle events such as module load, sysfs bind, or device-tree overlay attach — never from network traffic.\nAC:L - The premature `of_node_put()` executes unconditionally on every probe, so the dangling reference is created deterministically with no race to win and no memory-layout precondition; an attacker able to drive overlay attach/detach or driver rebind controls both the probe and the node teardown.\nPR:N - The vulnerable sequence runs automatically during driver probe at boot or on device-tree overlay/hotplug attach, requiring no authenticated account or credential for the dangling-reference window to be created, consistent with how comparable probe-path OF-node use-after-free issues are scored.\nUI:N - Probe and port initialization happen autonomously as part of device enumeration; no victim must open a file, mount anything, or take any other action.\nS:U - The freed `struct device_node` and all consequences of dereferencing it remain within the kernel's own security authority, with no crossing into a hypervisor, IOMMU, or other separate security scope.\nC:H - Use-after-free on a device-tree node lets reclaimed heap contents be interpreted as `struct device_node`/property lists by `of_get_phy_mode()`, `of_property_read_u32()`, and `of_parse_phandle()`, yielding attacker-directed pointer dereferences and disclosure of arbitrary kernel memory.\nI:H - The same UAF gives control over a freed object that is subsequently walked and passed to `devm_of_phy_get()` and phandle resolution, so heap spraying the reclaimed allocation provides write/control-flow-hijack primitives; the refcount imbalance additionally corrupts kobject state.\nA:H - Dereferencing the released node reliably produces a kernel oops or panic, and on static base-tree nodes the imbalance triggers the `refcount_t: underflow; use-after-free` path in `of_node_release()`, leaving the network device unusable on an automotive/embedded gateway SoC."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:44:52.040Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.6.67"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.12.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}