{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-38539", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T04:51:24.024Z", "datePublished": "2025-08-16T11:12:31.678Z", "dateUpdated": "2026-08-05T12:02:45.638Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T12:02:45.638Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Add down_write(trace_event_sem) when adding trace event\n\nWhen a module is loaded, it adds trace events defined by the module. It\nmay also need to modify the modules trace printk formats to replace enum\nnames with their values.\n\nIf two modules are loaded at the same time, the adding of the event to the\nftrace_events list can corrupt the walking of the list in the code that is\nmodifying the printk format strings and crash the kernel.\n\nThe addition of the event should take the trace_event_sem for write while\nit adds the new event.\n\nAlso add a lockdep_assert_held() on that semaphore in\n__trace_add_event_dirs() as it iterates the list." } ], "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 race is driven entirely through local operations — module load (init_module/finit_module or attacker-triggered autoload via socket()) and tracefs dynamic-event registration. No network or adjacent-network input reaches kernel/trace/trace_events.c.\nAC:L - The attacker controls both sides of the race, initiating the list-walking module load and the list-adding module load concurrently, and `trace_event_eval_update()` calls `cond_resched()` on every iteration over a list of thousands of events, making the preemption window very wide and the race practically winnable. Per race-condition guidance, attacker-created races are Low.\nPR:L - Both sides of the race are reachable by an unprivileged local user via kernel module autoloading (e.g. concurrent `socket(AF_RXRPC,…)` loading rxrpc, whose TRACE_DEFINE_ENUM maps drive the unlocked walk, and `socket(AF_INET,SOCK_STREAM,IPPROTO_SCTP)` loading sctp, whose trace events drive the unlocked list_add), and containers granted CAP_SYS_MODULE can trigger it repeatably. No authentication beyond an ordinary local account is required.\nUI:N - The attacker triggers both concurrent module loads themselves; no victim action, mount, or file open by another user is needed.\nS:U - The corruption and its consequences are confined to kernel memory within the same security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - Following a torn list pointer, the walker dereferences an arbitrary `struct trace_event_call`, reading `call->print_fmt` and traversing `call->class->fields` from wild addresses, and the resulting strings are persisted into `field->type`/`print_fmt` which are readable through `/sys/kernel/tracing/events/*/format`, giving kernel memory disclosure.\nI:H - `eval_replace()` performs in-place `snprintf`/`memmove` writes through the wild `call->print_fmt` pointer and `update_event_fields()` stores `field->type = str`, yielding out-of-bounds writes; additionally `call->module` is assigned after the unlocked list_add, so a racing walker can attach strings to a stale module pointer that a later unload frees, producing a use-after-free suitable for control-flow hijacking.\nA:H - The commit states outright that the unsynchronized list_add \"can corrupt the walking of the list ... and crash the kernel\"; the reported failure is a kernel oops/panic, and dereferencing a stale next pointer reliably faults." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "kernel/trace/trace_events.c" ], "versions": [ { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "e70f5ee4c8824736332351b703c46f9469ed7f6c", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "db45632479ceecb669612ed8dbce927e3c6279fc", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "ca60064ea03f14e06c763de018403cb56ba3207d", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "6bc94f20a4c304997288f9a45278c9d0c06987d3", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "33e20747b47ddc03569b6bc27a2d6894c1428182", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "70fecd519caad0c1741c3379d5348c9000a5b29d", "status": "affected", "versionType": "git" }, { "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d", "lessThan": "b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "kernel/trace/trace_events.c" ], "versions": [ { "version": "2.6.31", "status": "affected" }, { "version": "0", "lessThan": "2.6.31", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.297", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.241", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.190", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.147", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.100", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.40", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.15.8", "lessThanOrEqual": "6.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.16", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "5.4.297" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "5.10.241" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "5.15.190" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "6.1.147" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "6.6.100" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "6.12.40" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "6.15.8" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.31", "versionEndExcluding": "6.16" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/e70f5ee4c8824736332351b703c46f9469ed7f6c" }, { "url": "https://git.kernel.org/stable/c/db45632479ceecb669612ed8dbce927e3c6279fc" }, { "url": "https://git.kernel.org/stable/c/ca60064ea03f14e06c763de018403cb56ba3207d" }, { "url": "https://git.kernel.org/stable/c/7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b" }, { "url": "https://git.kernel.org/stable/c/6bc94f20a4c304997288f9a45278c9d0c06987d3" }, { "url": "https://git.kernel.org/stable/c/33e20747b47ddc03569b6bc27a2d6894c1428182" }, { "url": "https://git.kernel.org/stable/c/70fecd519caad0c1741c3379d5348c9000a5b29d" }, { "url": "https://git.kernel.org/stable/c/b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df" } ], "title": "tracing: Add down_write(trace_event_sem) when adding trace event", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html" }, { "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T17:39:34.419Z" } } ] } }