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: <20241118180133.54735-1-kuniyu@amazon.com>
Date: Mon, 18 Nov 2024 10:01:33 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <donald.hunter@...il.com>
CC: <davem@...emloft.net>, <donald.hunter@...hat.com>, <edumazet@...gle.com>,
	<horms@...nel.org>, <kuba@...nel.org>, <kuniyu@...zon.com>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next v1] net: af_unix: clean up spurious drop reasons

From: Donald Hunter <donald.hunter@...il.com>
Date: Sat, 16 Nov 2024 09:42:36 +0000
> Use consume_skb() instead of kfree_skb() in the happy paths to clean up

Both are the unhappy paths and kfree_skb() should be used.

I have some local patches for drop reasons for AF_UNIX and
can post them after net-next is open if needed.


> spurious NOT_SPECIFIED drop reasons.
> 
> Signed-off-by: Donald Hunter <donald.hunter@...il.com>
> ---
>  net/unix/af_unix.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 001ccc55ef0f..90bb8556ea04 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -1705,7 +1705,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
>  		unix_state_unlock(other);
>  
>  out:
> -	kfree_skb(skb);
> +	consume_skb(skb);
>  	if (newsk)
>  		unix_release_sock(newsk, 0);
>  	if (other)
> @@ -2174,7 +2174,7 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
>  		unix_state_unlock(sk);
>  	unix_state_unlock(other);
>  out_free:
> -	kfree_skb(skb);
> +	consume_skb(skb);
>  out:
>  	if (other)
>  		sock_put(other);
> -- 
> 2.47.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ