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: <02e13783-1f87-46a7-9396-96bf17e36a9f@redhat.com>
Date: Thu, 27 Feb 2025 11:19:33 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Peter Seiderer <ps.report@....net>, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
 Thomas Gleixner <tglx@...utronix.de>,
 Artem Chernyshev <artem.chernyshev@...-soft.ru>,
 Frederic Weisbecker <frederic@...nel.org>, Nam Cao <namcao@...utronix.de>
Subject: Re: [PATCH net-next v7 6/8] net: pktgen: fix mpls reset parsing

On 2/24/25 10:22 AM, Peter Seiderer wrote:
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> index ae5e81e62733..bb13a4591709 100644
> --- a/net/core/pktgen.c
> +++ b/net/core/pktgen.c
> @@ -915,8 +915,13 @@ static ssize_t get_labels(const char __user *buffer,
>  
>  		max = min(8, maxlen - i);
>  		len = hex32_arg(&buffer[i], max, &tmp);
> -		if (len <= 0)
> +		if (len < 0)
>  			return len;
> +
> +		// return empty list in case of invalid input and/or zero value

I'm sorry for nit picking, but C-99 comments should be avoided

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ