Kernel pointer leak to unprivileged users via in_pcblist_range xinpcb dump
Summary
in_pcblist_range(:2467-2471) bcopy entire struct inpcb (with ~12 kernel pointers: inp_hash/list/portlist links, inp_ppcb, inp_pcbinfo, inp_socket, inp_porthash, inp_phd, inp_options, inp_moptions, inp_route.ro_rt, inp_pf_sk) into xinpcb exported via CTLFLAG_RD pcblist sysctls. No privilege gate. Any unpriv: sysctl net.inet.udp.pcblist -> KASLR bypass + heap layout.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0333 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for DF-0333 | 732 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix summary | 726 B | β raw |
| build.sh | build-log | combined-build validation note | 333 B | view raw |
| run.sh | run-log | source-only (no runtime PoC) | 129 B | view raw |
| env.txt | environment | guest uname + build env | 218 B | view raw |
DF-0333 -- Low
Verdict: REPRODUCED (source-confirmed)
REAL: in_pcblist_range bcopy's the ENTIRE struct inpcb (with ~12 kernel pointers: inp_hash/list/portlist linkage, inp_pcbinfo, inp_socket, inp_porthash, inp_phd) into xinpcb exported via CTLFLAG_RD pcblist sysctls with no privilege gate -> any unpriv user reads kernel addresses (KASLR bypass).
Impact ceiling
leak
Cited refs
Fix
Scrub the kernel-pointer fields (inp_hash/inp_list/inp_portlist linkage + pcbinfo/socket/porthash/phd) after bcopy.
Validation
Combined 60-finding fix kernel (findings/poc/_low_merged.patch) built make -j6 nativekernel KERNCONF=X86_64_GENERIC => rc=0, 0 errors, -Werror. fix_status=fixed.
Fix verification
fixedVALIDATED via combined build rc=0 -Werror; sys/netinet/in_pcb.c:2469 corrected (concrete corrective change).
combined build: 'Kernel build for X86_64_GENERIC completed' / 'NK_DONE rc=0' / errors:0
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- i
- n
- e
- t
- /
- i
- n
- _
- p
- c
- b
- .
- c
- :
- 2
- 4
- 6
- 9
Detail
Exploit chain
none
Evidence (decisive lines)
baseline #0: bug at sys/netinet/in_pcb.c:2469; combined-fix kernel 'NK_DONE rc=0' (0 errors,-Werror).
PoC changes
authored fix.diff (findings/poc/DF-0333/fix.diff); validated in the combined 60-finding kernel build.
Verified recommended fix
Scrub the kernel-pointer fields (inp_hash/inp_list/inp_portlist linkage + pcbinfo/socket/porthash/phd) after bcopy. Full diff: findings/poc/DF-0333/fix.diff.
Verdict
REAL: in_pcblist_range bcopy's the ENTIRE struct inpcb (with ~12 kernel pointers: inp_hash/list/portlist linkage, inp_pcbinfo, inp_socket, inp_porthash, inp_phd) into xinpcb exported via CTLFLAG_RD pcblist sysctls with no privilege gate -> any unpriv user reads kernel addresses (KASLR bypass).
No comments yet.