Module Name: src
Committed By: snj
Date: Tue Mar 13 17:18:16 UTC 2018
src/sys/netipsec [netbsd-6]: xform_ah.c xform_esp.c xform_ipip.c
Pull up following revision(s) (requested by maxv in ticket #1532):
sys/netipsec/xform_ah.c: 1.77 via patch
sys/netipsec/xform_esp.c: 1.73 via patch
sys/netipsec/xform_ipip.c: 1.56-1.57 via patch
Reinforce and clarify.
Add missing NULL check. Normally that's not triggerable remotely, since we
are guaranteed that 8 bytes are valid at mbuf+skip.
Fix use-after-free. There is a path where the mbuf gets pulled up without
a proper mtod afterwards:
218 ipo = mtod(m, struct ip *);
281 m = m_pullup(m, hlen);
Found by Mootja.
Meanwhile it seems to me that 'ipo' should be set to NULL if the inner
packet is IPv6, but I'll revisit that later.
As I said in my last commit in this file, ipo should be set to NULL;
otherwise the 'local address spoofing' check below is always wrong on
To generate a diff of this commit:
cvs rdiff -u -r18.104.22.168 -r22.214.171.124 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.40 -r126.96.36.199 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r188.8.131.52 -r184.108.40.206 src/sys/netipsec/xform_ipip.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.