Avoid access to stale ip pointer and call UPDATE_POINTERS() after

PULLUP_LEN_LOCKED().

PULLUP_LEN_LOCKED() could update mbuf and thus we need to update related
pointers that can be used in next opcodes.

Reported by:	Maxime Villard <max at m00nbsd net>
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2019-12-10 10:35:32 +00:00
parent aa7bdbc00c
commit ca0ac0a6c1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355581

View File

@ -1465,7 +1465,8 @@ do { \
#define PULLUP_LEN(_len, p, T) _PULLUP_LOCKED(_len, p, T, )
#define PULLUP_LEN_LOCKED(_len, p, T) \
_PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain))
_PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); \
UPDATE_POINTERS()
/*
* In case pointers got stale after pullups, update them.
*/