{"id":"CVE-2025-39872","summary":"hsr: hold rcu and dev lock for hsr_get_port_ndev","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nhsr: hold rcu and dev lock for hsr_get_port_ndev\n\nhsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock.\nOn the other hand, before return the port device, we need to hold the\ndevice reference to avoid UaF in the caller function.","modified":"2026-04-02T12:48:11.448049Z","published":"2025-09-23T06:00:45.528Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39872.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/68a6729afd3e8e9a2a32538642ce92b96ccf9b1d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/847748fc66d08a89135a74e29362a66ba4e3ab15"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9433ba79c2ec3ec7c9a711748701549339c3438c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39872.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39872"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ef964411c8ca775967355d855abc56aeaca3c867"},{"fixed":"9433ba79c2ec3ec7c9a711748701549339c3438c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9c10dd8eed74de9e8adeb820939f8745cd566d4a"},{"fixed":"68a6729afd3e8e9a2a32538642ce92b96ccf9b1d"},{"fixed":"847748fc66d08a89135a74e29362a66ba4e3ab15"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39872.json"}}],"schema_version":"1.7.5"}