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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 15 Nov 2023 12:03:27 -0600 From: "Gustavo A. R. Silva" <gustavo@...eddedor.com> To: Guenter Roeck <linux@...ck-us.net>, "Gustavo A. R. Silva" <gustavoars@...nel.org> Cc: Jean Delvare <jdelvare@...e.com>, Joel Stanley <joel@....id.au>, Andrew Jeffery <andrew@...econstruct.com.au>, linux-hwmon@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org Subject: Re: [PATCH v2][next] hwmon: (aspeed-pwm-tacho) Fix -Wstringop-overflow warning in aspeed_create_fan_tach_channel() On 11/15/23 07:12, Guenter Roeck wrote: > On Tue, Nov 14, 2023 at 01:53:08PM -0600, Gustavo A. R. Silva wrote: >> Based on the documentation below, the maximum number of Fan tach >> channels is 16: >> >> Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt:45: >> 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. >> 46 integer value in the range 0 through 15, with 0 indicating >> 47 Fan tach channel 0 and 15 indicating Fan tach channel 15. >> 48 At least one Fan tach input channel is required. >> >> However, the compiler doesn't know that, and legitimaly warns about a potential >> overwrite in array `u8 fan_tach_ch_source[16]` in `struct aspeed_pwm_tacho_data`, >> in case `index` takes a value outside the boundaries of the array: >> > > Still messes the point. This isn't about "the compiler doesn't know that", > it is a real bug which may result in out-of-bounds accesses. Oh, I mentioned that in anticipation of people saying something in the tone of 'that's never going to happen.' :p However, if this is a real bug, it should probably be tagged for -stable. > > Oh, never mind, I'll just apply it. Thank you! -- Gustavo
Powered by blists - more mailing lists