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] [day] [month] [year] [list]
Message-ID: <aefadd4b-0a72-4125-af3c-a3454d535ad7@maowtm.org>
Date: Mon, 9 Feb 2026 19:53:34 +0000
From: Tingmao Wang <m@...wtm.org>
To: Mickaël Salaün <mic@...ikod.net>,
 Justin Suess <utilityemal77@...il.com>, Günther Noack
 <gnoack3000@...il.com>
Cc: John Johansen <john.johansen@...onical.com>,
 Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
 "Serge E . Hallyn" <serge@...lyn.com>,
 linux-security-module@...r.kernel.org,
 Samasth Norway Ananda <samasth.norway.ananda@...cle.com>,
 Matthieu Buffet <matthieu@...fet.re>,
 Mikhail Ivanov <ivanov.mikhail1@...wei-partners.com>,
 konstantin.meskhidze@...wei.com, Demi Marie Obenour <demiobenour@...il.com>,
 Alyssa Ross <hi@...ssa.is>, Jann Horn <jannh@...gle.com>,
 Tahera Fahimi <fahimitahera@...il.com>, Simon Horman <horms@...nel.org>,
 netdev@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk>,
 Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v4 1/6] lsm: Add LSM hook security_unix_find

On 2/9/26 18:33, Tingmao Wang wrote:
> On 2/9/26 17:51, Mickaël Salaün wrote:
>> On Mon, Feb 09, 2026 at 12:10:11AM +0100, Günther Noack wrote:
>>> [...]
>>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>>> index d0511225799b..db9d279b3883 100644
>>> --- a/net/unix/af_unix.c
>>> +++ b/net/unix/af_unix.c
>>> @@ -1226,10 +1226,19 @@ static struct sock *unix_find_bsd(struct sockaddr_un *sunaddr, int addr_len,
>>>  	if (!S_ISSOCK(inode->i_mode))
>>>  		goto path_put;
>>>  
>>> +	err = -ECONNREFUSED;
>>
>> We don't see it in this patch but err is already set to -ECONNREFUSED.
>> This line might be confusing, and unrelated to the goal of this patch,
>> so we should remove it.
> 
> I will confess that in a side conversation with Justin previously I
> suggested that for blocks like these it might be better to always assign
> to err, and let the compiler optimize it away, so that when this block is
> moved there is less chances of mistake.  (This was relevant in the
> previous context where a move of this hook caused err to be reset,
> resulting in a NULL deference from syzbot)
> 
> But of course if the convention in this file is to not do it, or if I have
> missed some reason against doing this, then that's also fine (even though,
> IMHO, personally I think this is better).
> 

Actually, looking at this more carefully, Mickaël is right that this
single line addition doesn't have anything to do with the patch itself
(unlike in the diff in the other thread [1] where it is part of a moved
block), so I guess it makes sense to not add this in this patch.

Apologies for any conversation derailment caused here :)

[1]: https://lore.kernel.org/all/e6b6b069-384c-4c45-a56b-fa54b26bc72a@maowtm.org/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ