[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140102.193155.570848830875823542.davem@davemloft.net>
Date: Thu, 02 Jan 2014 19:31:55 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: netdev@...r.kernel.org, stephen@...workplumber.org,
acme@...stprotocols.net
Subject: Re: [PATCH net] net: llc: fix use after free in llc_ui_recvmsg
From: Daniel Borkmann <dborkman@...hat.com>
Date: Mon, 30 Dec 2013 23:40:50 +0100
> While commit 30a584d944fb fixes datagram interface in LLC, a use
> after free bug has been introduced for SOCK_STREAM sockets that do
> not make use of MSG_PEEK.
>
> The flow is as follow ...
>
> if (!(flags & MSG_PEEK)) {
> ...
> sk_eat_skb(sk, skb, false);
> ...
> }
> ...
> if (used + offset < skb->len)
> continue;
>
> ... where sk_eat_skb() calls __kfree_skb(). Therefore, cache
> original length and work on skb_len to check partial reads.
>
> Fixes: 30a584d944fb ("[LLX]: SOCK_DGRAM interface fixes")
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
Applied and queued up for -stable, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists