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:	Tue, 06 Nov 2012 03:34:02 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Eric Leblond <eric@...it.org>
Cc:	netdev <netdev@...r.kernel.org>, stable@...r.kernel.org
Subject: Re: [PATCH 1/1] af-packet: fix oops when socket is not present

On Tue, 2012-11-06 at 11:24 +0100, Eric Leblond wrote:
> When skb->sk is NULL and when packet fanout is used, there is a
> crash in match_fanout_group where skb->sk is accessed.
> This patch fixes the issue by returning false as soon as the
> socket is NULL: this correspond to the wanted behavior because
> the kernel as to resend the skb to all the listening socket in
> this case.
> 
> Signed-off-by: Eric Leblond <eric@...it.org>
> ---
>  net/core/dev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b4978e2..c7b5293 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1666,7 +1666,7 @@ static inline int deliver_skb(struct sk_buff *skb,
>  
>  static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb)
>  {
> -	if (ptype->af_packet_priv == NULL)
> +	if ((ptype->af_packet_priv == NULL) || (skb->sk == NULL))

Why adding these parentheses  ?

if (!ptype->af_packet_priv || !skb->sk)


>  		return false;
>  
>  	if (ptype->id_match)

Your patch is technically correct, but misses extra information to ease
stable team work.

Your previous mail with this useful information wont be part of the
patch.

Please add this information in the changelog ?

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ