Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-6-1] src/sys/netipsec



Module Name:    src
Committed By:   snj
Date:           Tue Mar 13 17:18:14 UTC 2018

Modified Files:
        src/sys/netipsec [netbsd-6-1]: xform_ah.c xform_esp.c xform_ipip.c

Log Message:
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);
232     ipo->ip_src.s_addr
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
IPv6.


To generate a diff of this commit:
cvs rdiff -u -r1.37.8.3 -r1.37.8.4 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.40 -r1.40.8.1 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.28.22.1 -r1.28.22.2 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.




Home | Main Index | Thread Index | Old Index