{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54139","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-12-24T13:02:52.522Z","datePublished":"2025-12-24T13:06:54.094Z","dateUpdated":"2026-08-05T09:17:34.267Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T09:17:34.267Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntracing/user_events: Ensure write index cannot be negative\n\nThe write index indicates which event the data is for and accesses a\nper-file array. The index is passed by user processes during write()\ncalls as the first 4 bytes. Ensure that it cannot be negative by\nreturning -EINVAL to prevent out of bounds accesses.\n\nUpdate ftrace self-test to ensure this occurs properly."}],"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 only through local file operations — `ioctl()`/`write()`/`writev()` on the tracefs file `/sys/kernel/tracing/user_events_data`. There is no network or remote-peer data path into `user_events_write_core()`.\nAC:L - Triggering is fully deterministic — the attacker registers an event, then writes a payload whose first 4 bytes are a negative integer, and the signed comparison `idx < refs->count` is bypassed every time. No race, timing window, or condition outside the attacker's control is involved, and the attacker can freely groom the slab to influence what the OOB read returns.\nPR:L - The registration ioctl and the write path contain no capability checks; the only gate is write access to the tracefs `user_events_data` file, which this feature exists specifically to grant to ordinary unprivileged applications (via tracefs `gid=` mounts or relaxed permissions in tracing-enabled deployments). An unprivileged local user with the intended tracing access can trigger it, so no administrative privilege is needed.\nUI:N - The attacker performs the entire sequence — open, `DIAG_IOCSREG`, then a `writev()` with a negative index — within their own process. No victim action, mount, or interaction of any kind is required.\nS:U - The out-of-bounds access and resulting type confusion occur entirely within the kernel's own memory and security authority. There is no crossing of a VM, IOMMU, or sandbox boundary — this is a standard local kernel compromise.\nC:H - A negative index yields a pointer-sized out-of-bounds read anywhere within roughly 16 GB below the `user_event_refs` allocation, and the resulting bogus `struct user_event *` is dereferenced to read `min_size`, `tracepoint`, and `call` fields, whose contents are then emitted into trace/perf buffers readable by the attacker. This constitutes an effectively arbitrary kernel-memory read primitive.\nI:H - The OOB-read value is used as a `struct user_event *` and reaches `probe_func = probe_func_ptr->func; probe_func(user, ...)`, an indirect call through an attacker-influenced pointer chain. Combined with heap grooming of the small `kmalloc` slab, this gives type confusion escalating to control-flow hijack and arbitrary kernel writes.\nA:H - Even without any exploitation effort, indexing arbitrarily far below the allocation and dereferencing the resulting garbage pointer reliably produces a kernel oops or panic. The fault is trivially and repeatedly reproducible by an unprivileged process, making it a dependable local denial of service."}]}],"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_user.c","tools/testing/selftests/user_events/ftrace_test.c"],"versions":[{"version":"7f5a08c79df35e68f1a43033450c5050f12bc155","lessThan":"0489c2b2c3104b89f078dbcec8c744dfc157d3e9","status":"affected","versionType":"git"},{"version":"7f5a08c79df35e68f1a43033450c5050f12bc155","lessThan":"4fe46b5adf18e3dc606e62c9e6a0413398a17572","status":"affected","versionType":"git"},{"version":"7f5a08c79df35e68f1a43033450c5050f12bc155","lessThan":"fa7f2f5d1739452280c22727c4384a52b72ab5de","status":"affected","versionType":"git"},{"version":"7f5a08c79df35e68f1a43033450c5050f12bc155","lessThan":"cd98c93286a30cc4588dfd02453bec63c2f4acf4","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_user.c","tools/testing/selftests/user_events/ftrace_test.c"],"versions":[{"version":"5.18","status":"affected"},{"version":"0","lessThan":"5.18","status":"unaffected","versionType":"semver"},{"version":"6.1.28","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2.15","lessThanOrEqual":"6.2.*","status":"unaffected","versionType":"semver"},{"version":"6.3.2","lessThanOrEqual":"6.3.*","status":"unaffected","versionType":"semver"},{"version":"6.4","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":"5.18","versionEndExcluding":"6.1.28"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.2.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.4"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/0489c2b2c3104b89f078dbcec8c744dfc157d3e9"},{"url":"https://git.kernel.org/stable/c/4fe46b5adf18e3dc606e62c9e6a0413398a17572"},{"url":"https://git.kernel.org/stable/c/fa7f2f5d1739452280c22727c4384a52b72ab5de"},{"url":"https://git.kernel.org/stable/c/cd98c93286a30cc4588dfd02453bec63c2f4acf4"}],"title":"tracing/user_events: Ensure write index cannot be negative","x_generator":{"engine":"bippy-1.2.0"}}}}