Increase max number of input pins to 22 - #64
Conversation
|
I see that your commit increases the AUTO_CFG_MAX_INS value from 18 --> 22 -#define AUTO_CFG_MAX_INS 18 On my system, I never received any "UBSAN: array-index-out-of-bounds in ....index 21 is out of range for type....'auto_pin_cfg_item [18]'" error messages. **I'm runing Fedora 44 w/ kernel 7.1.9-200.fc44.x86_64 (MacBook 9,1) When I apply your PR, system sound (ie speaker + headphone audio) stops working for me. I can't approve a PR that breaks the functionality this project was meant to fix. Perhaps you can find out why your system requires the value of AUTO_CFG_MAX_INS to be set to 22. |
Driver crashing on Ubuntu 26.04 Kernel 7.0.
The driver compiles correctly but when loaded, the input pin auto config reports 22 pins but the maximum allowable number is 18 causing an out of bounds stack trace upon access when UBSAN (UndefinedBehaviorSanitizer) is enabled like in Ubuntu 26.04.
Patch modifies hda_auto_parser.h to increase AUTO_CFG_MAX_INS to 22 to allow for the additional pins. AUTO_CFG_MAX_INS is 8 for kernel 5.0 - 5.12, and 18 for kernel 5.13+. The sed edit will work for either value and allows driver to load.
Example error before modification:
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in /build/linux-zi5WOl/linux-7.0.0/sound/hda/codecs/generic.c:1510:24
index 21 is out of range for type 'auto_pin_cfg_item [18]'
CPU: 3 UID: 0 PID: 1300 Comm: modprobe Tainted: G OE 7.0.0-29-generic #29-Ubuntu PREEMPT(lazy)
Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: Apple Inc. MacBook10,1/Mac-EE2EBD4B90B839A8, BIOS 529.140.2.0.0 06/23/2024
Call Trace:
show_stack+0x49/0x60
dump_stack_lvl+0x5f/0x90
dump_stack+0x10/0x18
ubsan_epilogue+0x9/0x39
etc.