Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207262

Re: [PATCH] net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code
Date 2015-08-14 02:20 +0200
Message-ID <pXaT1-2nu-31@gated-at.bofh.it> (permalink)
References <pWS01-tB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Thu, 13 Aug 2015 05:54:07 +0200

> The recent refactoring of the IGMP and MLD parsing code into
> ipv6_mc_check_mld() / ip_mc_check_igmp() introduced a potential crash /
> BUG() invocation for bridges:
> 
> I wrongly assumed that skb_get() could be used as a simple reference
> counter for an skb which is not the case. skb_get() bears additional
> semantics, a user count. This leads to a BUG() invocation in
> pskb_expand_head() / kernel panic if pskb_may_pull() is called on an skb
> with a user count greater than one - unfortunately the refactoring did
> just that.
> 
> Fixing this by removing the skb_get() call and changing the API: The
> caller of ipv6_mc_check_mld() / ip_mc_check_igmp() now needs to
> additionally check whether the returned skb_trimmed is a clone.
> 
> Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code")
> Reported-by: Brenden Blanco <bblanco@plumgrid.com>
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net: fix wrong skb_get() usage / crash in IGMP/MLD parsing  code Linus Lüssing <linus.luessing@c0d3.blue> - 2015-08-13 06:10 +0200
  Re: [PATCH] net: fix wrong skb_get() usage / crash in IGMP/MLD  parsing code Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-08-13 07:00 +0200
  Re: [PATCH] net: fix wrong skb_get() usage / crash in IGMP/MLD  parsing code David Miller <davem@davemloft.net> - 2015-08-14 02:20 +0200

csiph-web