Re: [PATCH] hwmon: (nct6775-core) Fix number of temperature registers for NCT6116
Guenter Roeck <[email protected]>
| Newsgroups | org.kernel.vger.linux-hwmon |
|---|---|
| Message-ID | <[email protected]> |
On 7/22/26 14:06, Florian Bezdeka wrote: > On Wed, 2026-07-22 at 07:28 -0700, Guenter Roeck wrote: >> Unlike NCT6106, NCT6116 only has three temperature registers, and with >> it only three temperature source and temperature source configuration >> registers. The register addresses match those of NCT6106 and can be >> re-used. >> >> The code used a separate array to list the temperature source registers >> for NCT6116, but used the size of the NCT6106 register array to set >> the number of registers. The NCT6106 register array provides six addresses, >> while the temperature source register array for NCT6116 only provides three >> addresses. This causes a KASAN report. >> >> BUG: KASAN: global-out-of-bounds in nct6775_probe+0x936/0x46f0 [nct6775] >> Read of size 2 at addr ffffffffc19561a6 by task modprobe/954 >> ... >> Call Trace: >> dump_stack+0x7d/0xa7 >> print_address_description.constprop.0+0x1c/0x220 >> ? __kasan_kmalloc.constprop.0+0xc9/0xd0 >> ? __kmalloc_node_track_caller+0x194/0x5b0 >> ? nct6775_probe+0x936/0x46f0 [nct6775] >> ? nct6775_probe+0x936/0x46f0 [nct6775] >> ... >> >> Fix the problem by hard-coding the number of temperature and temperature >> configuration registers to three for NCT6116. Drop the unnecessary >> NCT6116_REG_TEMP_SOURCE array and re-use NCT6106_REG_TEMP_SOURCE. > > Thanks a lot for taking over and the super fast response/fix. Highly > appreciated! > > Have you checked how far we get with the auto-stable apply process? I'm > expecting that 5.10 (and maybe 5.15 in addition) will need some manual > backporting. Happy to help there, just let me know. > Is anyone still using those old releases with that driver ? I'd assume that would either be industrial systems or PC style systems. For such systems, I would not want to be responsible for all the unfixed security issues in them. A problem like this one is really like trying to take care of a small broken leaf in a forest of problems. So, no, I don't plan to do any explicit backports to older kernels. I would strongly suggest that anyone still on 5.10 or 5.15 based kernels should consider switching to the most recent LTS kernel. But, sure, please feel free to submit a backport to older kernels. Thanks, Guenter