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]
Message-ID: <b44b2b4a-20e2-2d42-22b1-c1e44c6f999d@csgroup.eu>
Date:   Tue, 28 Jun 2022 08:16:23 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Aaron Tomlin <atomlin@...hat.com>
CC:     "mcgrof@...nel.org" <mcgrof@...nel.org>,
        "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] module: Show the last unloaded module's taint flag(s)



Le 28/06/2022 à 09:47, Aaron Tomlin a écrit :
> On Tue 2022-06-28 05:54 +0000, Christophe Leroy wrote:
>>> -	/* Store the name of the last unloaded module for diagnostic purposes */
>>>    	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
>>> +	strcat(last_unloaded_module, module_flags(mod, buf, false));
>>
>> You replace a bounded string copy by an unbounded strict contat.
>>
>> Should you use strlcat() instead ?
> 
> Hi Christophe,
> 
> Why? If I understand correctly, both the destination and source string are
> NULL-terminated (see module_flags()). So, strcat() should be sufficient.
> 

Are you sure you will never ever end up with a string longer than the 
length of last_unloaded_module ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ