diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-10-17 00:47:49 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-10-17 00:47:49 +0000 |
commit | 9d179a1e4d1b28a722089050a209000c738a4b09 (patch) | |
tree | a5090e86c6ed5b5a8024a5a32d353d75daef19e0 /usr.bin/yacc | |
parent | 903fd0e0762f3bcbe2ca1bb62fe3a7d4504e62f8 (diff) |
reset all the pfsync packet state before calling ip_output in
pfsync_sendout. more specifically, move the reset of sc->sc_len to
PFSYNC_MINPKT above ip_output.
this prevents a situation where ipsec via ip_output calls
pfsync_update_tdb for syncing the ipsec flow to a peer, which
accounts for the tdb in the next pfsync packet, before unwinding
back to pfsync_output which resets the accounting we just did.
the next pfsync packet to be sent out will be allocated with a short
length because sc_len is wrong, and the long lists of things (eg,
the tdb) can overwrite memory after the mbuf. this manifests as
incorrect poisoning or xsimpleq entry corruption in mbufs still in
a pool, or random corruption of m->m_next on other mbufs in the
system.
bug found, fix tested, and ok stsp@
Diffstat (limited to 'usr.bin/yacc')
0 files changed, 0 insertions, 0 deletions