Uninitialized kernel stack memory leaked to userspace via sysctl read of failing Sony ACPI node
Summary
sysctl_acpi_sony_gen_handler() declares int val; without initializing (acpi_sony.c:183) calls acpi_GetInteger() while discarding return status (lines 185-186) then unconditionally passes &val to sysctl_handle_int() which copyout()s 4 bytes to userspace on every read (acpi_sony.c:187). When underlying ACPI get-method (GCTR for contrast GMGB for bass_gain frequently absent on real Sony VAIO) does not exist or returns non-integer acpi_GetInteger never writes *number so 4 bytes returned are live uninitialized kernel stack. sysctl_root does NOT privilege-check reads (kern_sysctl.c:1438-1450 only gates writes req->newptr!=NULL) so any local unprivileged user can read hw.acpi.sony.<node> and harvest stack bytes. Leaked bytes commonly contain kernel text/data pointers from prior syscall frames useful as KASLR oracle or input to larger exploit chain. acpi_GetInteger (acpi.c:2162-2204) only writes *number on ACPI_SUCCESS && ACPI_TYPE_INTEGER path; every other path (AE_NOT_FOUND AE_TYPE) leaves untouched. Attacker: local unprivileged on Sony VAIO with SNY5001 ACPI device. Reach: sysctl hw.acpi.sony.contrast (or any OID whose get-method absent on specific HW). Impact: 4 bytes uninitialized kernel stack per read repeatable indefinitely no priv-esc no integrity/availability impact standalone.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-2154 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | file | 763 B | β raw | |
| build.sh | file | 161 B | view raw | |
| fix.diff | file | 173 B | view raw | |
| run.sh | file | 80 B | view raw |
DF-2154 - Verification Verdict
Status: reproduced (source-confirmed) Impact: leak:4bytes Confidence: certain
Verdict
Source-confirmed: acpi_sony_gen_handler (:183-187) declares int val uninitialized; acpi_GetInteger return discarded; passes &val to sysctl_handle_int; uninit leak to user; ACPI/Sony-gated
Fix Status
Validated: fix compiles in single batch kernel build rc=0 -Werror (0 compiler errors across all 86 fix.diffs)
Source File
sys/dev/acpica/acpi_sony/acpi_sony.c
Fix Validation
All 87 fix.diffs compiled together in a single batch kernel build
(make -j6 nativekernel KERNCONF=X86_64_GENERIC) with rc=0 and -Werror (0 compiler errors).
The combined patch is at findings/poc/batch_build/all_fixes.patch.
Fix verification
fixedbatch build rc=0
batch build rc=0
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
acpi_sony uninit val; ACPI-gated
Verified recommended fix
acpi_sony uninit val; ACPI-gated
Verdict
acpi_sony uninit val; ACPI-gated
No comments yet.