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: <93ffea26-ab8e-4fc6-9aa9-9850a34d08d7@embeddedor.com>
Date: Tue, 29 Jul 2025 17:46:30 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Kees Cook <kees@...nel.org>, linux-hardening@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fortify: Fix incorrect reporting of read buffer size



On 29/07/25 17:18, Kees Cook wrote:
> When FORTIFY_SOURCE reports about a run-time buffer overread, the wrong
> buffer size was being shown in the error message. (The bounds checking
> was correct.)
> 
> Fixes: 3d965b33e40d ("fortify: Improve buffer overflow reporting")
> Signed-off-by: Kees Cook <kees@...nel.org>

Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>

Thanks!
-Gustavo

> ---
> Cc: <linux-hardening@...r.kernel.org>
> ---
>   include/linux/fortify-string.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/fortify-string.h b/include/linux/fortify-string.h
> index e4ce1cae03bf..b3b53f8c1b28 100644
> --- a/include/linux/fortify-string.h
> +++ b/include/linux/fortify-string.h
> @@ -596,7 +596,7 @@ __FORTIFY_INLINE bool fortify_memcpy_chk(__kernel_size_t size,
>   	if (p_size != SIZE_MAX && p_size < size)
>   		fortify_panic(func, FORTIFY_WRITE, p_size, size, true);
>   	else if (q_size != SIZE_MAX && q_size < size)
> -		fortify_panic(func, FORTIFY_READ, p_size, size, true);
> +		fortify_panic(func, FORTIFY_READ, q_size, size, true);
>   
>   	/*
>   	 * Warn when writing beyond destination field size.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ