In the Linux kernel, the following vulnerability has been resolved:
clk: samsung: Fix UBSAN panic in samsungclkinit()
With UBSANARRAYBOUNDS=y, I'm hitting the below panic due to
dereferencing ctx->clk_data.hws
before setting
ctx->clk_data.num = nr_clks
. Move that up to fix the crash.
UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP <snip> Call trace: samsungclkinit+0x110/0x124 (P) samsungclkinit+0x48/0x124 (L) samsungcmuregisterone+0x3c/0xa0 exynosarm64registercmu+0x54/0x64 _gs101cmutopofclkinit_declare+0x28/0x60 ...