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: <fa61cd41-a0ec-4b01-aa2e-577a1b15cef3@gmail.com>
Date: Tue, 6 Feb 2024 18:05:52 -0700
From: David Ahern <dsahern@...il.com>
To: Denis Kirjanov <kirjanov@...il.com>, stephen@...workplumber.org
Cc: netdev@...r.kernel.org, Denis Kirjanov <dkirjanov@...e.de>
Subject: Re: [PATCH v2 iproute2] ifstat: convert sprintf to snprintf

On 2/2/24 2:35 AM, Denis Kirjanov wrote:
> @@ -893,7 +893,7 @@ int main(int argc, char *argv[])
>  
>  	sun.sun_family = AF_UNIX;
>  	sun.sun_path[0] = 0;
> -	sprintf(sun.sun_path+1, "ifstat%d", getuid());
> +	snprintf(sun.sun_path + 1, sizeof(sun.sun_path), "ifstat%d", getuid());

sizeof(sun.sun_path) - 1 since the start is +1?

and that is an odd path. Stephen do you know the origin of
"\0ifstat<uid>" for the path?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ