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: <934992e6-9a2d-426d-8bd7-895062966214@infradead.org>
Date: Sat, 19 Jul 2025 11:20:12 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Shankari Anand <shankari.ak0208@...il.com>, linux-kernel@...r.kernel.org,
 linux-kbuild@...r.kernel.org
Cc: Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH] kconfig: nconf: Fix uncleared lines on help screens



On 7/19/25 7:32 AM, Shankari Anand wrote:
> commit 1b92b18ec419 ("kconfig: nconf: Ensure null termination where
> strncpy is used")
> introduced a regression where help screens (F1, F2, F3) no longer properly 
> clear short lines of text,
> resulting in duplicated or trailing content when lines are overwritten.
> 
> Revert the null-termination change to match
> the actual length of the copied string.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Fixes: 1b92b18ec419 ("kconfig: nconf: Ensure null termination where strncpy is used")
> Signed-off-by: Shankari Anand <shankari.ak0208@...il.com>

Acked-by: Randy Dunlap <rdunlap@...radead.org>
Tested-by: Randy Dunlap <rdunlap@...radead.org>

Thanks.


> ---
> I apologise for the overlook from my side. This should set it right.
> Link of the report : 
> https://lore.kernel.org/lkml/CAK7LNAT54nvwYmTy20Ep8U2kr4thn68yYWXi9R-d3Yx3iXs=Bg@mail.gmail.com/T/#

This link should be used after Reported-by: like so:

Closes: https://lore.kernel.org/lkml/CAK7LNAT54nvwYmTy20Ep8U2kr4thn68yYWXi9R-d3Yx3iXs=Bg@mail.gmail.com/T/#


> ---
>  scripts/kconfig/nconf.gui.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
> index 475a403ab8ba..7206437e784a 100644
> --- a/scripts/kconfig/nconf.gui.c
> +++ b/scripts/kconfig/nconf.gui.c
> @@ -177,7 +177,7 @@ void fill_window(WINDOW *win, const char *text)
>  		const char *line = get_line(text, i);
>  		int len = get_line_length(line);
>  		strncpy(tmp, line, min(len, x));
> -		tmp[sizeof(tmp) - 1] = '\0';
> +		tmp[len] = '\0';
>  		mvwprintw(win, i, 0, "%s", tmp);
>  	}
>  }
> 
> base-commit: d086c886ceb9f59dea6c3a9dae7eb89e780a20c9

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ