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: <5185d9b2-c203-4fdd-b7f1-4d8f35c25906@mojatatu.com>
Date: Mon, 22 Jan 2024 22:16:02 -0300
From: Pedro Tammela <pctammela@...atatu.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/2] color: use empty format string instead of
 NULL in vfprintf

On 22/01/2024 21:43, Stephen Hemminger wrote:
> On Mon, 22 Jan 2024 18:05:45 -0300
> Pedro Tammela <pctammela@...atatu.com> wrote:
> 
>> NULL is passed in the format string when nothing is to be printed.
>> This is commonly done in the print_bool function when a flag is false.
>> Glibc seems to handle this case nicely but for musl it will cause a
>> segmentation fault.
>>
>> The following is an example of one crash in musl based systems/containers:
>>     tc qdisc add dev dummy0 handle 1: root choke limit 1000 bandwidth 10000
>>     tc qdisc replace dev dummy0 handle 1: root choke limit 1000 bandwidth 10000 min 100
>>     tc qdisc show dev dummy0
>>
>> Signed-off-by: Pedro Tammela <pctammela@...atatu.com>
>> ---
>>   lib/color.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Wouldn't it be simpler to just add a short circuit check.

Agreed

> This would fix the color case as well.
I missed that one, thanks for catching it!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ