Re: 12.0-BETA1 vnet with pf firewall

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Tue, 30 Oct 2018 13:23:25 +0100
On 29 Oct 2018, at 4:41, Kristof Provost wrote:
> So we panic because we dereference a NULL pointer in strncmp(), which 
> happens because nprogtab = 13 but ef->progtab[12] has NULL pointers.
>
> It’s not clear to me why that happens, but it’s something to go 
> on. I do wonder if this isn’t a bit of a red herring too. It might 
> be an error in the error path (because we pass through 
> linker_file_unload()). link_elf_load_file() increments ef->nprogtab 
> for SHT_X86_64_UNWIND, so perhaps the error handling doesn’t cope 
> with that.
>
It looks like the root of the problem (failure to load) is in this line 
of link_elf_load_file():

	ef->progtab[pb].addr =
	    vnet_data_alloc(shdr[i].sh_size);

The allocation of the vnet data fails. Bumping VNET_MODMIN in 
sys/net/vnet.c makes the load of ipfilter and pf succeed.

I’m not too familiar with this part of the vnet code, but it looks to 
me like we’ve got more per-vnet variables that was originally 
anticipated, so we may need to just increase the allocated space.

Best regards,
Kristof
Received on Tue Oct 30 2018 - 11:23:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC