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: <aMhX-VnXkYDpKd9V@google.com>
Date: Mon, 15 Sep 2025 18:16:25 +0000
From: Andrei Vagin <avagin@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
	eric.dumazet@...il.com,
	syzbot+50603c05bbdf4dfdaffa@...kaller.appspotmail.com,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Kuniyuki Iwashima <kuniyu@...gle.com>
Subject: Re: [PATCH net] net: lockless sock_i_ino()

On Tue, Sep 02, 2025 at 06:36:03PM +0000, Eric Dumazet wrote:
> @@ -2056,6 +2058,10 @@ static inline int sk_rx_queue_get(const struct sock *sk)
>  static inline void sk_set_socket(struct sock *sk, struct socket *sock)
>  {
>  	sk->sk_socket = sock;
> +	if (sock) {
> +		WRITE_ONCE(sk->sk_uid, SOCK_INODE(sock)->i_uid);
> +		WRITE_ONCE(sk->sk_ino, SOCK_INODE(sock)->i_ino);
> +	}

Hi Eric.

This change breaks CRIU [1]. The issue is that socket_diag reports two
sockets with the same inode number. It seems inet_csk_clone_lock copies
sk->sk_ino to child sockets, but sk_set_socket doesn’t reset it to zero
when sock is NULL.

[1] https://github.com/checkpoint-restore/criu/issues/2744

Thanks,
Andrei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ