[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.20.1603282214130.16241@nerf40.vanv.qr>
Date: Mon, 28 Mar 2016 22:20:39 +0200 (CEST)
From: Jan Engelhardt <jengelh@...i.de>
To: David Miller <davem@...emloft.net>
cc: kadlec@...ckhole.kfki.hu, sploving1@...il.com, pablo@...filter.org,
kaber@...sh.net, netfilter-devel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: BUG: net/netfilter: KASAN: stack-out-of-bounds in tcp_packet
On Monday 2016-03-28 21:29, David Miller wrote:
>>> > > @@ -3716,6 +3716,8 @@ void tcp_parse_options(const struct sk_buff *skb,
>>> > > length--;
>>> > > continue;
>>> > > default:
>>> > > + if (length < 2)
>>> > > + return;
>>> > > opsize = *ptr++;
>>> > > if (opsize < 2) /* "silly options" */
>>> > > return;
>
>I'm trying to figure out how this can even matter.
>If we are in the loop, length is at least one.
>That means it is legal to read the opsize byte.
Is that because the skbuff is always padded to a multiple of (at
least) two? Maybe such padding is explicitly foregone when ASAN is in
place. After all, glibc, in userspace, is likely to do padding as
well for malloc, and yet, ASAN catches these cases.
Powered by blists - more mailing lists