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: <Z7y2IdBJbIWOpz8r@blossom>
Date: Mon, 24 Feb 2025 13:10:41 -0500
From: Alyssa Rosenzweig <alyssa@...enzweig.io>
To: sven@...npeter.dev
Cc: Janne Grunau <j@...nau.net>, asahi@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] soc: apple: rtkit: Cut syslog messages after the
 first '\0'

Reviewed-by: Alyssa Rosenzweig <alyssa@...enzweig.io>

Le Sat , Feb 22, 2025 at 04:56:49PM +0000, Sven Peter via B4 Relay a écrit :
> From: Janne Grunau <j@...nau.net>
> 
> Certain messages from DCP contain NUL bytes in the random data after the
> NUL terminated syslog message. Since the syslog message ends with '\n'
> this results in a dev_info() message terminated with two newlines and an
> empty printed line in the kernel log.
> 
> Signed-off-by: Janne Grunau <j@...nau.net>
> Signed-off-by: Sven Peter <sven@...npeter.dev>
> ---
>  drivers/soc/apple/rtkit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
> index b7f4654c3341..595efce265ce 100644
> --- a/drivers/soc/apple/rtkit.c
> +++ b/drivers/soc/apple/rtkit.c
> @@ -476,7 +476,7 @@ static void apple_rtkit_syslog_rx_log(struct apple_rtkit *rtk, u64 msg)
>  
>  	log_context[sizeof(log_context) - 1] = 0;
>  
> -	msglen = rtk->syslog_msg_size - 1;
> +	msglen = strnlen(rtk->syslog_msg_buffer, rtk->syslog_msg_size - 1);
>  	while (msglen > 0 &&
>  		   should_crop_syslog_char(rtk->syslog_msg_buffer[msglen - 1]))
>  		msglen--;
> 
> -- 
> 2.34.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ