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: <3533360.G9yuKbSBSH@ripper>
Date:   Thu, 28 Oct 2021 09:34:22 +0200
From:   Sven Eckelmann <sven@...fation.org>
To:     mareklindner@...mailbox.ch, sw@...onwunderlich.de, a@...table.cc,
        Yajun Deng <yajun.deng@...ux.dev>
Cc:     b.a.t.m.a.n@...ts.open-mesh.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yajun Deng <yajun.deng@...ux.dev>
Subject: Re: [PATCH net-next] batman-adv: Fix the wrong definition

On Thursday, 28 October 2021 09:23:06 CEST Yajun Deng wrote:
> There are three variables that are required at most,
> no need to define four variables.

NAck. This is absolutely wrong - the last one is the "STOP" info. With your 
patch, it would sometimes (action != BATADV_UEV_DEL) not have the stop NULL.
See also the second parameter in this for loop on line
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/kobject_uevent.c?id=1fc596a56b334f4d593a2b49e5ff55af6aaa0816#n548

We can discuss that this can be written in a better way. See 
https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/1403982781.9064.33.camel@joe-AO725/ 
(also the remark from Antonio).

> 
> Fixes: 0fa4c30d710d ("batman-adv: Make sysfs support optional")

Even this Fixes would be wrong. The code is there since commit
c6bda689c2c9 ("batman-adv: add wrapper function to throw uevent in 
userspace").

But even then, this would not fix anything but just be a cleanup.

> Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
> ---
>  net/batman-adv/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
> index 3ddd66e4c29e..758035b3796d 100644
> --- a/net/batman-adv/main.c
> +++ b/net/batman-adv/main.c
> @@ -656,7 +656,7 @@ int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type,
>  {
>  	int ret = -ENOMEM;
>  	struct kobject *bat_kobj;
> -	char *uevent_env[4] = { NULL, NULL, NULL, NULL };
> +	char *uevent_env[3] = {};
>  
>  	bat_kobj = &bat_priv->soft_iface->dev.kobj;
>  
> 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ