freebsd-nq/sys/contrib
Cy Schubert bdb0c28072 When growing the state, also grow the seed array. Otherwise memory
that was not allocated will be accessed.

This necessitated refactoring state seed allocation from
ipf_state_soft_init() into a new common ipf_state_seed_alloc() function
as it is now also used by ipf_state_rehash() when changing the size of
the state hash table in addition to by ipf_state_soft_init() during
initialization.

According to Christos Zoulas <christos@NetBSD.org>:

The bug was encountered by a NetBSD vendor who's customer machines had
large ipfilter states. The bug was reliably triggered by resizing the
state variables using "ipf -T".

Submitted by:	Christos Zoulas <christos@NetBSD.org>
Reviewed by:	delphij, rgrimes
Obtained from:	NetBSD ip_state.c CVS revs r1.9 and r1.10
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13755
2018-01-09 06:43:58 +00:00
..
alpine-hal Update Annapurna Alpine HAL 2016-09-20 09:19:22 +00:00
ck Import CK as of commit 6b141c0bdd21ce8b3e14147af8f87f22b20ecf32 2017-04-09 21:02:05 +00:00
cloudabi Import the latest CloudABI definitions, v0.18. 2017-11-21 20:46:21 +00:00
dev Fix a header inclusion missed in the previous commit. 2018-01-06 03:41:35 +00:00
edk2 Copy needed include files from EDK2. This is a minimal set gleened 2017-03-08 02:47:59 +00:00
ena-com Rework printouts and logging level in ENA driver 2017-11-09 13:30:39 +00:00
ipfilter/netinet When growing the state, also grow the seed array. Otherwise memory 2018-01-09 06:43:58 +00:00
libfdt
libnv Introduce cnvlist_name() and cnvlist_type() functions. 2017-10-26 20:44:42 +00:00
ncsw Rename a couple files to not conflict with ZFS filenames 2017-11-01 03:09:16 +00:00
ngatm
octeon-sdk Use the correct board name for the Ubiquiti Unifi Security Gateway 2017-11-14 03:21:39 +00:00
rdma/krping Compile fixes for 32-bit architectures. 2017-11-24 12:08:50 +00:00
v4l
vchiq/interface vchiq: Use mallocarray() to provide kcalloc() 2018-01-07 13:41:06 +00:00
x86emu
xz-embedded
zstd Integrate zstd into the kernel 2018-01-08 20:14:16 +00:00