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]
Date: Mon, 13 Nov 2023 23:09:02 -0500
From: Jakub Kicinski <>
To: Gal Pressman <>
Cc: "David S. Miller" <>, <>, Vlad
 Buslov <>
Subject: Re: [PATCH net] net: Fix undefined behavior in netdev name

On Mon, 13 Nov 2023 10:35:44 +0200 Gal Pressman wrote:
> Cited commit removed the strscpy() call and kept the snprintf() only.
> When allocating a netdev, 'res' and 'name' pointers are equal, but
> according to POSIX, if copying takes place between objects that overlap
> as a result of a call to sprintf() or snprintf(), the results are
> undefined.
> Add back the strscpy() and use 'buf' as an intermediate buffer.

It may be worth mentioning that it is fairly common to put the format
in dev->name before device is registered, IOW this condition takes
place a lot? IIUC once we cross into 3-digit IDs we may crash?

With that and the right fixes tag:

Reviewed-by: Jakub Kicinski <>

pw-bot: cr

Powered by blists - more mailing lists