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: <20201102161107.1293263f@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Mon, 2 Nov 2020 16:11:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: driver: hamradio: Fix potential
 unterminated string

On Sat, 31 Oct 2020 19:17:00 +0100 Andrew Lunn wrote:
> With W=1 the following error is reported:
> 
> In function ‘strncpy’,
>     inlined from ‘hdlcdrv_ioctl’ at drivers/net/hamradio/hdlcdrv.c:600:4:
> ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
>   297 | #define __underlying_strncpy __builtin_strncpy
>       |                              ^
> ./include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’
>   307 |  return __underlying_strncpy(p, q, size);
> 
> Replace strncpy with strlcpy to guarantee the string is terminated.
> 
> Signed-off-by: Andrew Lunn <andrew@...n.ch>

Looks like the longest name in tree is 14, so there should be no
truncation and therefore uAPI change.

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ