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 16:01:23 +0200
From: Gal Pressman <>
To: Simon Horman <>
Cc: "David S. Miller" <>, Jakub Kicinski
 <>,, Vlad Buslov <>
Subject: Re: [PATCH net] net: Fix undefined behavior in netdev name allocation

On 13/11/2023 11:53, Simon Horman wrote:
> On Mon, Nov 13, 2023 at 10:35:44AM +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.
>> Fixes: 9a810468126c ("net: reduce indentation of __dev_alloc_name()")
> Hi Gal,
> perhaps my eyes are deceiving me, but I wonder if this fixes the following:
>   7ad17b04dc7b ("net: trust the bitmap in __dev_alloc_name()")

Thanks Simon, you're right.

Should I resubmit?

Powered by blists - more mailing lists