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]
Date:   Mon, 23 May 2022 21:50:01 +0200
From:   Michal Kubecek <mkubecek@...e.cz>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Steffen Klassert <steffen.klassert@...unet.com>,
        netdev@...r.kernel.org, Jiasheng Jiang <jiasheng@...as.ac.cn>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH ipsec] Revert "net: af_key: add check for pfkey_broadcast
 in function pfkey_process"

On Mon, May 23, 2022 at 10:23:22AM -0700, Florian Fainelli wrote:
> On 5/23/22 09:01, Michal Kubecek wrote:
> > This reverts commit 4dc2a5a8f6754492180741facf2a8787f2c415d7.
> > 
> > A non-zero return value from pfkey_broadcast() does not necessarily mean
> > an error occurred as this function returns -ESRCH when no registered
> > listener received the message. In particular, a call with
> > BROADCAST_PROMISC_ONLY flag and null one_sk argument can never return
> > zero so that this commit in fact prevents processing any PF_KEY message.
> > One visible effect is that racoon daemon fails to find encryption
> > algorithms like aes and refuses to start.
> > 
> > Excluding -ESRCH return value would fix this but it's not obvious that
> > we really want to bail out here and most other callers of
> > pfkey_broadcast() also ignore the return value. Also, as pointed out by
> > Steffen Klassert, PF_KEY is kind of deprecated and newer userspace code
> > should use netlink instead so that we should only disturb the code for
> > really important fixes.
> > 
> > Signed-off-by: Michal Kubecek <mkubecek@...e.cz>
> 
> Maybe you can add a comment above the call such that future tool-based
> patches submissions to give the author a chance to read the comment above
> and ask oneself twice whether this is relevant or not?

Good point, I'll send a v2 with a warning comment in a moment.

Micha

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ