[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1121535: UBSAN: array-index-out-of-bounds in [...]sound/pci/ctxfi/ctamixer.c:347:48



On Fri, 26 Dec 2025 18:21:03 +0100,
Karsten Hohmeier wrote:
> 
> Hello. I am another affected user.
> I applied the suggested patch by Takeshi on top of 6.18.2 (in case it got already fixed).
> 
> But this just gives
> 
> > Dez 26 17:24:13: dtest kernel: UBSAN: array-index-out-of-bounds in sound/pci/ctxfi/ctamixer.c:344:48
> > Dez 26 17:24:13: dtest kernel: index 10 is out of range for type 'unsigned char [9]'
> 
> as the error. Making the struct even larger gives
> 
> > Dez 26 17:39:35 dtest kernel: UBSAN: array-index-out-of-bounds in sound/pci/ctxfi/ctamixer.c:344:48
> > Dez 26 17:39:35 dtest kernel: index 32 is out of range for type 'unsigned char [32]'
> 
> Could you take another look?

OK, then we seem scratching a wrong surface.
How about the changes below?


Takashi

-- 8< --
--- a/sound/pci/ctxfi/ctamixer.c
+++ b/sound/pci/ctxfi/ctamixer.c
@@ -205,6 +205,7 @@ static int amixer_rsc_init(struct amixer *amixer,
 
 	/* Set amixer specific operations */
 	amixer->rsc.ops = &amixer_basic_rsc_ops;
+	amixer->rsc.conj = 0;
 	amixer->ops = &amixer_ops;
 	amixer->input = NULL;
 	amixer->sum = NULL;
@@ -367,6 +368,7 @@ static int sum_rsc_init(struct sum *sum,
 		return err;
 
 	sum->rsc.ops = &sum_basic_rsc_ops;
+	sum->rsc.conj = 0;
 
 	return 0;
 }


Reply to: