ICMP-error NAT for other protocol corrupts inner source (copy-paste bug)
Summary
pf_test_state_icmp default inner-proto case: guard tests pd2.dst(:5732) but calls pf_change_icmp(pd2.src,...)(:5734) should be pd2.dst. ICMPv6 inner case(:5635-5643) correct. Copy-paste from source branch. Inner dest untranslated + inner source overwritten. Remote: ICMP error embedding non-TCP/UDP/ICMP packet on NAT state.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0263 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | git-apply-able fix for DF-0263 | 362 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix summary | 604 B | β raw |
| build.sh | build-log | combined-build validation note | 333 B | view raw |
| run.sh | run-log | source-only (no runtime PoC) | 148 B | view raw |
| env.txt | environment | guest uname + build env | 218 B | view raw |
DF-0263 -- Low
Verdict: REPRODUCED (source-confirmed)
REAL: pf_test_state_icmp default inner-proto case guards on pd2.dst (line 5732) but calls pf_change_icmp(pd2.src,...) (line 5734) -- copy-paste. Inner dest untranslated + source overwritten. Remote ICMP error.
Impact ceiling
none
Cited refs
Fix
Change the first pf_change_icmp arg from pd2.src to pd2.dst.
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/net/pf/pf.c:5732 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
- /
- p
- f
- /
- p
- f
- .
- c
- :
- 5
- 7
- 3
- 2
- s
- y
- s
- /
- n
- e
- t
- /
- p
- f
- /
- p
- f
- .
- c
- :
- 5
- 7
- 3
- 4
Detail
Exploit chain
none
Evidence (decisive lines)
baseline #0: bug at sys/net/pf/pf.c:5732; combined-fix kernel 'NK_DONE rc=0' (0 errors,-Werror).
PoC changes
authored fix.diff (findings/poc/DF-0263/fix.diff); validated in the combined 60-finding kernel build.
Verified recommended fix
Change the first pf_change_icmp arg from pd2.src to pd2.dst. Full diff: findings/poc/DF-0263/fix.diff.
Verdict
REAL: pf_test_state_icmp default inner-proto case guards on pd2.dst (line 5732) but calls pf_change_icmp(pd2.src,...) (line 5734) -- copy-paste. Inner dest untranslated + source overwritten. Remote ICMP error.
No comments yet.