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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202308311123.EF07499@keescook>
Date:   Thu, 31 Aug 2023 11:30:12 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Jiri Slaby <jirislaby@...nel.org>
Cc:     Azeem Shaikh <azeemshaikh38@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-serial@...r.kernel.org,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] vt: Fix potential read overflow of kernel memory

On Thu, Aug 31, 2023 at 07:32:18AM +0200, Jiri Slaby wrote:
> On 30. 08. 23, 23:28, Kees Cook wrote:
> >                  len = strlcpy(kbs, func_table[kb_func] ? : "", len);
> > 
> > This is the anti-pattern (take the length of the _source_) we need to
> > remove.
> 
> But len is the length of kbs, i.e. the destination. Or what am I missing?

strlcpy() returns the length of the _source_ string (i.e. it could be
greater than the input argument len). But there is no current flaw here
(since all sources are very short). We're just trying to remove strlcpy()
since it leads to unexpected results.

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ