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: <640538cd-d1b6-46aa-9ef8-76aaa0e05609@hartkopp.net>
Date: Tue, 6 May 2025 08:49:37 +0200
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org
Cc: Davide Caratti <dcaratti@...hat.com>,
 Oleksij Rempel <o.rempel@...gutronix.de>,
 Marc Kleine-Budde <mkl@...gutronix.de>, robin@...tonic.nl,
 linux-can@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 6.14 624/642] can: fix missing decrement of
 j1939_proto.inuse_idx

Hi Sasha,

this fix is needed for this commit

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/can?id=6bffe88452dbe284747442f10a7ac8249d6495d7

6bffe88452db ("can: add protocol counter for AF_CAN sockets")

which has been introduced in 6.15

It must not be applied to 6.14-stable.

Best regards,
Oliver


On 06.05.25 00:14, Sasha Levin wrote:
> From: Davide Caratti <dcaratti@...hat.com>
> 
> [ Upstream commit 8b1879491472c145c58c3cbbaf0e05ea93ee5ddf ]
> 
> Like other protocols on top of AF_CAN family, also j1939_proto.inuse_idx
> needs to be decremented on socket dismantle.
> 
> Fixes: 6bffe88452db ("can: add protocol counter for AF_CAN sockets")
> Reported-by: Oliver Hartkopp <socketcan@...tkopp.net>
> Closes: https://lore.kernel.org/linux-can/7e35b13f-bbc4-491e-9081-fb939e1b8df0@hartkopp.net/
> Signed-off-by: Davide Caratti <dcaratti@...hat.com>
> Acked-by: Oleksij Rempel <o.rempel@...gutronix.de>
> Link: https://patch.msgid.link/09ce71f281b9e27d1e3d1104430bf3fceb8c7321.1742292636.git.dcaratti@redhat.com
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>   net/can/j1939/socket.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
> index 17226b2341d03..6fefe7a687611 100644
> --- a/net/can/j1939/socket.c
> +++ b/net/can/j1939/socket.c
> @@ -655,6 +655,7 @@ static int j1939_sk_release(struct socket *sock)
>   	sock->sk = NULL;
>   
>   	release_sock(sk);
> +	sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
>   	sock_put(sk);
>   
>   	return 0;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ