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]
Message-ID: <c7780b528f80417bbac319767a2ecf65@usma1ex-dag1mb5.msg.corp.akamai.com>
Date:	Wed, 15 Jun 2016 15:13:15 +0000
From:	"Lubashev, Igor" <ilubashe@...mai.com>
To:	"Pai, Vishwanath" <vpai@...mai.com>,
	Pablo Neira Ayuso <pablo@...filter.org>
CC:	"kaber@...sh.net" <kaber@...sh.net>,
	"kadlec@...ckhole.kfki.hu" <kadlec@...ckhole.kfki.hu>,
	"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
	"coreteam@...filter.org" <coreteam@...filter.org>,
	"Hunt, Joshua" <johunt@...mai.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"pai.vishwain@...il.com" <pai.vishwain@...il.com>
Subject: RE: [PATCH] netfilter/nflog: nflog-range does not truncate packets

Vish, Pablo,

I wonder about the value of sending more data than a client is willing to consume (setting aside the important fact that the client code crashes due to the extra data).

It seems that we should either drop the nflog-range parameter from nflog altogether (and just use the len from the client) or allow nflog-range to further *restrict* the number of bytes sent to the client.

The "further restrict" logic would make it easier to build iptables rules that vary nflog-range based on some match conditions, so a single client would get different packet length depending on what rules matched.

Thoughts?

- Igor


-----Original Message-----
From: Vishwanath Pai [mailto:vpai@...mai.com] 
Sent: Wednesday, June 15, 2016 10:55 AM
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: kaber@...sh.net; kadlec@...ckhole.kfki.hu; netfilter-devel@...r.kernel.org; coreteam@...filter.org; Hunt, Joshua <johunt@...mai.com>; netdev@...r.kernel.org; pai.vishwain@...il.com; Lubashev, Igor <ilubashe@...mai.com>
Subject: Re: [PATCH] netfilter/nflog: nflog-range does not truncate packets

On 06/15/2016 08:39 AM, Pablo Neira Ayuso wrote:
> But nlmsg_len should match len in this.
> 
> If we're just sending a part of the packet to userspace, then we 
> should adjust nlmsg_len to indicate exactly the netlink message length 
> that we're sending to userspace.
> 
> Is your patch triggering this nlmsg_len != len?

The value of len here is how many bytes were returned by recv. We do send the entire nlmsg_len to userspace, but recv cannot copy the full packet because the buffer is not big enough to hold this. They only allocate the buffer assuming that the packet won't be bigger than their snap len, but we send more data than their snap len and they don't handle this condition well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ