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: <20240212085358.22be1db6@hermes.local>
Date: Mon, 12 Feb 2024 08:53:58 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com
Subject: Re: [PATCH iproute2] tc: u32: check return value from snprintf

On Mon, 12 Feb 2024 15:24:49 +0800
Hangbin Liu <liuhangbin@...il.com> wrote:

> On Sat, Feb 10, 2024 at 05:04:23PM -0800, Stephen Hemminger wrote:
> > Add assertion to check for case of snprintf failing (bad format?)
> > or buffer getting full.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>  
> 
> Hi Stephen,
> 
> Is there a bug report or something else that we only do the assertion
> for tc/f_u32.c?
> 
> Thanks
> Hangbin

No bug, it is not possible to trigger with current code.
Return of < 0 only happens with improper format string,
and the overrun would only happen if buffer was not big enough
The bsize is SPRINT_BUF() which is 64 bytes.

It is more a way to avoid some code checker complaining in future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ