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: <e5e10808-5cca-243b-304f-4aa8db1d30b6@linux-m68k.org>
Date: Fri, 7 Mar 2025 10:24:22 +1100 (AEDT)
From: Finn Thain <fthain@...ux-m68k.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
cc: Thorsten Blum <thorsten.blum@...ux.dev>, 
    Jean-Michel Hautbois <jeanmichel.hautbois@...eli.org>, 
    linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: mm: Remove size argument when calling strscpy()


On Thu, 6 Mar 2025, Geert Uytterhoeven wrote:

> On Mon, 3 Mar 2025 at 00:07, Thorsten Blum <thorsten.blum@...ux.dev> wrote:
> > The size parameter of strscpy() is optional and specifying the size of
> > the destination buffer is unnecessary. Remove it to simplify the code.
> >
> > Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> 
> Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> i.e. will queue in the m68k tree for v6.15.
> 

The commit message says "simplify the code" which is only true if you 
never scratch the surface (i.e. it's simple code if the reader is simple 
too...)

Commit 30035e45753b ("string: provide strscpy()") was a good idea. It was 
easily auditable. But that's not what we have now.

Patches like this one (which appear across the whole tree) need reviewers 
(lots of them) that know what kind of a bounds check you end up with when 
you ask an arbitary compiler to evaluate this:

sizeof(dst) + __must_be_array(dst) + __must_be_cstr(dst) + __must_be_cstr(src)

Frankly, I can't be sure. But it's a serious question, and not what I'd 
call a "simple" one.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ