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] [thread-next>] [day] [month] [year] [list]
Date: Fri, 31 May 2024 11:05:54 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Masahiro Yamada" <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org, Linux-Arch <linux-arch@...r.kernel.org>,
 linux-kernel@...r.kernel.org, "Kees Cook" <keescook@...omium.org>
Subject: Re: [PATCH 1/3] kbuild: provide reasonable defaults for tool coverage

On Fri, May 31, 2024, at 10:52, Masahiro Yamada wrote:
> On Tue, May 28, 2024 at 8:36 PM Arnd Bergmann <arnd@...db.de> wrote:

>> I don't understand the nature of this warning, but I see
>> that your patch ended up dropping -fsanitize=kernel-address
>> from the compiler flags because the lib/test_fortify/*.c files
>> don't match the $(is-kernel-object) rule. Adding back
>> -fsanitize=kernel-address shuts up these warnings.
>
>
> In my understanding, fortify-string is independent of KASAN.
>
> I do not understand why -fsanitize=kernel-address matters.

Right, this is something I've failed to understand as well
so far.

>> I've applied a local workaround in my randconfig tree
>>
>> diff --git a/lib/Makefile b/lib/Makefile
>> index ddcb76b294b5..d7b8fab64068 100644
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -425,5 +425,7 @@ $(obj)/$(TEST_FORTIFY_LOG): $(addprefix $(obj)/, $(TEST_FORTIFY_LOGS)) FORCE
>>
>>  # Fake dependency to trigger the fortify tests.
>>  ifeq ($(CONFIG_FORTIFY_SOURCE),y)
>> +ifndef CONFIG_KASAN
>>  $(obj)/string.o: $(obj)/$(TEST_FORTIFY_LOG)
>> +endif
>>  endif
>>
>>
>> which I don't think we want upstream. Can you and Kees come
>> up with a proper fix instead?
>
> I set CONFIG_FORTIFY_SOURCE=y and CONFIG_KASAN=y,
> but I did not observe such warnings.
> Is this arch or compiler-specific?
>
>
> Could you provide me with the steps to reproduce it?

This is a randconfig .config file that shows it, but
I've seen it in a lot of others:
https://pastebin.com/raw/ESVzUeth

If this doesn't reproduce it for you, I can try to narrow
it down further.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ