lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Jun 2019 22:27:06 -0400
From:   Stephen Suryaputra <ssuryaextr@...il.com>
To:     Pablo Neira Ayuso <pablo@...filter.org>
Cc:     netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH nf-next] netfilter: add support for matching IPv4 options

On Mon, Jun 03, 2019 at 02:30:06PM +0200, Pablo Neira Ayuso wrote:
> > I developed this patchset to suit my employer needs and there is no plan
> > for a follow up patchset, however I think non-zero offset might be useful
> > in the future for tunneled packets.
> 
> For tunneled traffic, we can store the network offset in the
> nft_pktinfo object. Then, add a new extension to update this network
> offset to point to the network offset inside the tunnel header, and
> use this pkt->network_offset everywhere.

OK. I'm changing so that offset isn't being used as input. But, it's
still being passed as reference for output. See further response
below...

> I think this new IPv4 options extension should use priv->offset to
> match fields inside the IPv4 option specifically, just like in the
> IPv6 extensions and TCP options do. If you look on how the
> priv->offset is used in the existing code, this offset points to
> values that the specific option field conveys.

I believe that's what I have coded:

	err = ipv4_find_option(nft_net(pkt), skb, &offset, priv->type, NULL, NULL);
	if (priv->flags & NFT_EXTHDR_F_PRESENT) {
		*dest = (err >= 0);
		return;
	} else if (err < 0) {
		goto err;
	}
	offset += priv->offset;

offset is returned as the offset where it matches the sought priv->type
then priv->offset is added to get to the right field between the offset.

If this is satisfactory, I can submit v2 of the kernel patch.

Thanks,

Stephen.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ