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]
Date: Fri, 17 May 2024 20:29:29 +0900
From: Krzysztof Wilczyński <kw@...ux.com>
To: Sergio Paracuellos <sergio.paracuellos@...il.com>
Cc: linux-pci@...r.kernel.org, bhelgaas@...gle.com, lpieralisi@...nel.org,
	robh@...nel.org, matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com,
	linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Bjorn Helgaas <helgaas@...nel.org>
Subject: Re: [PATCH] PCI: mt7621: Fix possible string truncation in snprintf

Hello,

> The following warning appears when driver is compiled with W=1.
> 
> CC      drivers/pci/controller/pcie-mt7621.o
> drivers/pci/controller/pcie-mt7621.c: In function ‘mt7621_pcie_probe’:
> drivers/pci/controller/pcie-mt7621.c:228:49: error: ‘snprintf’ output may
> be truncated before the last format character [-Werror=format-truncation=]
> 228 |         snprintf(name, sizeof(name), "pcie-phy%d", slot);
>     |                                                 ^
> drivers/pci/controller/pcie-mt7621.c:228:9: note: ‘snprintf’ output between
> 10 and 11 bytes into a destination of size 10
> 228 |         snprintf(name, sizeof(name), "pcie-phy%d", slot);
>     |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Clean this up increasing destination buffer one byte.

Applied to controller/mt7621, thank you!

[1/1] PCI: mt7621: Fix string truncation in mt7621_pcie_parse_port()
      https://git.kernel.org/pci/pci/c/fd6eb49a84a8

	Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ