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] [day] [month] [year] [list]
Message-ID: <202310141930.F1F809230@keescook>
Date:   Sat, 14 Oct 2023 19:31:37 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Nick Terrell <nickrterrell@...il.com>
Cc:     linux-kernel@...r.kernel.org, Nick Terrell <terrelln@...a.com>,
        Kernel Team <Kernel-team@...com>,
        Nick Terrell <terrelln@...com>,
        syzbot+1f2eb3e8cd123ffce499@...kaller.appspotmail.com,
        Eric Biggers <ebiggers@...nel.org>
Subject: Re: [PATCH] zstd: Fix array-index-out-of-bounds UBSAN warning

On Thu, Oct 12, 2023 at 02:34:28PM -0700, Nick Terrell wrote:
> From: Nick Terrell <terrelln@...com>
> 
> Zstd used an array of length 1 to mean a flexible array for C89
> compatibility. Switch to a C99 flexible array to fix the UBSAN warning.
> 
> Tested locally by booting the kernel and writing to and reading from a
> BtrFS filesystem with zstd compression enabled. I was unable to reproduce
> the issue before the fix, however it is a trivial change.
> 
> Reported-by: syzbot+1f2eb3e8cd123ffce499@...kaller.appspotmail.com
> Reported-by: Eric Biggers <ebiggers@...nel.org>
> Reported-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Nick Terrell <terrelln@...a.com>

Thanks! This 1-element conversion doesn't appear to need any sizeof()
related changes, so AFAICT this header change is sufficient.

Reviewed-by: Kees Cook <keescook@...omium.org>


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ