Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1271209 > unrolled thread
| Started by | Jochen Sprickerhof <jspricke@debian.org> |
|---|---|
| First post | 2025-11-22 19:30 +0100 |
| Last post | 2025-11-23 21:40 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.debian.bugs.dist
Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 Jochen Sprickerhof <jspricke@debian.org> - 2025-11-22 19:30 +0100
Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 Salvatore Bonaccorso <carnil@debian.org> - 2025-11-22 21:10 +0100
Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 Nathan Chancellor <nathan@kernel.org> - 2025-11-22 21:50 +0100
Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 Salvatore Bonaccorso <carnil@debian.org> - 2025-11-23 09:00 +0100
Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 Jochen Sprickerhof <jspricke@debian.org> - 2025-11-23 21:40 +0100
| From | Jochen Sprickerhof <jspricke@debian.org> |
|---|---|
| Date | 2025-11-22 19:30 +0100 |
| Subject | Bug#1121211: UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 |
| Message-ID | <LU0wV-eXpM-3@gated-at.bofh.it> |
Package: src:linux
Version: 6.17.8-1
Severity: normal
First time booting into 6.17.8-1 and first time I see UBSAN in my logs:
[Nov21 08:31] Booting Linux on physical CPU 0x100
[ +0,012977] ------------[ cut here ]------------
[ +0,000017] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18
[ +0,000038] index 0 is out of range for type 'clk_hw *[*]'
[ +0,000025] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
[ +0,000018] Hardware name: Samsung Exynos (Flattened Device Tree)
[ +0,000007] Call trace:
[ +0,000009] unwind_backtrace from show_stack+0x18/0x1c
[ +0,000042] show_stack from dump_stack_lvl+0x54/0x68
[ +0,000036] dump_stack_lvl from ubsan_epilogue+0x8/0x34
[ +0,000025] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
[ +0,000024] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x38c/0x428
[ +0,000029] exynos_clkout_probe from platform_probe+0x64/0x98
[ +0,000034] platform_probe from really_probe+0xd8/0x3ac
[ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
[ +0,000027] __driver_probe_device from driver_probe_device+0x3c/0xd8
[ +0,000027] driver_probe_device from __driver_attach+0xd8/0x1d8
[ +0,000028] __driver_attach from bus_for_each_dev+0x84/0xd4
[ +0,000026] bus_for_each_dev from bus_add_driver+0xf4/0x218
[ +0,000023] bus_add_driver from driver_register+0x8c/0x140
[ +0,000027] driver_register from do_one_initcall+0x50/0x24c
[ +0,000023] do_one_initcall from kernel_init_freeable+0x288/0x2fc
[ +0,000022] kernel_init_freeable from kernel_init+0x24/0x140
[ +0,000022] kernel_init from ret_from_fork+0x14/0x28
[ +0,000015] Exception stack(0xf0835fb0 to 0xf0835ff8)
[ +0,000012] 5fa0: 00000000 00000000 00000000 00000000
[ +0,000011] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ +0,000007] ---[ end trace ]---
[ +0,000226] ------------[ cut here ]------------
[ +0,000012] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:183:29
[ +0,000032] index 0 is out of range for type 'clk_hw *[*]'
[ +0,000021] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
[ +0,000014] Hardware name: Samsung Exynos (Flattened Device Tree)
[ +0,000006] Call trace:
[ +0,000006] unwind_backtrace from show_stack+0x18/0x1c
[ +0,000032] show_stack from dump_stack_lvl+0x54/0x68
[ +0,000033] dump_stack_lvl from ubsan_epilogue+0x8/0x34
[ +0,000023] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
[ +0,000020] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x354/0x428
[ +0,000024] exynos_clkout_probe from platform_probe+0x64/0x98
[ +0,000031] platform_probe from really_probe+0xd8/0x3ac
[ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
[ +0,000031] __driver_probe_device from driver_probe_device+0x3c/0xd8
[ +0,000028] driver_probe_device from __driver_attach+0xd8/0x1d8
[ +0,000027] __driver_attach from bus_for_each_dev+0x84/0xd4
[ +0,000025] bus_for_each_dev from bus_add_driver+0xf4/0x218
[ +0,000023] bus_add_driver from driver_register+0x8c/0x140
[ +0,000027] driver_register from do_one_initcall+0x50/0x24c
[ +0,000022] do_one_initcall from kernel_init_freeable+0x288/0x2fc
[ +0,000019] kernel_init_freeable from kernel_init+0x24/0x140
[ +0,000020] kernel_init from ret_from_fork+0x14/0x28
[ +0,000016] Exception stack(0xf0835fb0 to 0xf0835ff8)
[ +0,000010] 5fa0: 00000000 00000000 00000000 00000000
[ +0,000009] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ +0,000098] ---[ end trace ]---
-- Package-specific info:
** Version:
Linux version 6.17.8+deb14-armmp (debian-kernel@lists.debian.org) (arm-linux-gnueabihf-gcc-15 (Debian 15.2.0-8) 15.2.0, GNU ld (GNU Binutils for Debian) 2.45) #1 SMP Debian 6.17.8-1 (2025-11-15)
** Command line:
root=LABEL=mmcroot rw quiet
** Not tainted
** Kernel log:
Unable to read kernel log; any relevant messages should be attached
** Model information
Hardware : Samsung Exynos (Flattened Device Tree)
Revision : 0000
Device Tree model: Hardkernel Odroid XU4
** Configuration for modprobe:
blacklist arkfb
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist kyrofb
blacklist matroxfb_base
blacklist mb862xxfb
blacklist neofb
blacklist pm2fb
blacklist pm3fb
blacklist s3fb
blacklist savagefb
blacklist sisfb
blacklist tdfxfb
blacklist tridentfb
blacklist vt8623fb
options snd_pcsp index=-2
options cx88_alsa index=-2
options snd_atiixp_modem index=-2
options snd_intel8x0m index=-2
options snd_via82xx_modem index=-2
options bonding max_bonds=0
options dummy numdummies=0
options ifb numifbs=0
** Loaded modules:
tls
aes_arm_bs
aes_arm
dm_crypt
dm_mod
r8153_ecm
cdc_ether
usbnet
snd_soc_hdmi_codec
snd_soc_core
snd_compress
snd_pcm_dmaengine
snd_pcm
snd_timer
snd
r8152
soundcore
mii
exynosdrm
libphy
analogix_dp
mdio_bus
samsung_dsim
drm_display_helper
cec
rc_core
drm_client_lib
exynos_adc
industrialio
panfrost
gpu_sched
drm_shmem_helper
drm_kms_helper
exynos_trng
leds_pwm
cpufreq_dt
evdev
cfg80211
rfkill
binfmt_misc
drm
configfs
nfnetlink
ext4
crc16
mbcache
jbd2
crc32c_cryptoapi
xhci_plat_hcd
xhci_hcd
dwc3
roles
udc_core
s2mps11
clk_s2mps11
dwc3_exynos
ehci_exynos
ohci_exynos
ehci_hcd
ohci_hcd
dw_mmc_exynos
i2c_exynos5
pwm_samsung
phy_exynos5_usbdrd
dw_mmc_pltfm
usbcore
dw_mmc
typec
phy_exynos_usb2
phy_exynos_mipi_video
s3c2410_wdt
phy_exynos_dp_video
pwm_fan
autofs4
** Network status:
*** IP interfaces and addresses:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enx001e0639b0c6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:1e:06:39:b0:c6 brd ff:ff:ff:ff:ff:ff
inet 192.168.178.33/24 metric 1024 brd 192.168.178.255 scope global dynamic enx001e0639b0c6
valid_lft 739060sec preferred_lft 739060sec
inet6 2a02:8206:a55f:6100:21e:6ff:fe39:b0c6/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 6907sec preferred_lft 3307sec
inet6 fe80::21e:6ff:fe39:b0c6/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
*** Device statistics:
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 3425427 29960 0 0 0 0 0 0 3425427 29960 0 0 0 0 0 0
enx001e0639b0c6: 264609869 1811976 0 21 0 0 0 0 3601957328 2746857 0 0 0 0 0 0
** PCI devices:
not available
** USB devices:
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
-- System Information:
Debian Release: forky/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: armhf (armv7l)
Kernel: Linux 6.17.8+deb14-armmp (SMP w/8 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages linux-image-6.17.8+deb14-armmp depends on:
ii dracut [linux-initramfs-tool] 109-2
ii kmod 34.2-2
ii linux-base 4.14
Versions of packages linux-image-6.17.8+deb14-armmp recommends:
ii apparmor 4.1.0-1
Versions of packages linux-image-6.17.8+deb14-armmp suggests:
pn debian-kernel-handbook <none>
pn firmware-linux-free <none>
pn linux-doc-6.17 <none>
Versions of packages linux-image-6.17.8+deb14-armmp is related to:
pn firmware-amd-graphics <none>
pn firmware-atheros <none>
pn firmware-bnx2 <none>
pn firmware-bnx2x <none>
pn firmware-brcm80211 <none>
pn firmware-cavium <none>
pn firmware-cirrus <none>
pn firmware-intel-graphics <none>
pn firmware-intel-misc <none>
pn firmware-intel-sound <none>
pn firmware-ipw2x00 <none>
pn firmware-ivtv <none>
pn firmware-iwlwifi <none>
pn firmware-libertas <none>
pn firmware-marvell-prestera <none>
pn firmware-mediatek <none>
pn firmware-misc-nonfree <none>
pn firmware-myricom <none>
pn firmware-netronome <none>
pn firmware-netxen <none>
pn firmware-nvidia-graphics <none>
pn firmware-qcom-soc <none>
pn firmware-qlogic <none>
ii firmware-realtek 20251021-1
pn firmware-samsung <none>
pn firmware-siano <none>
pn firmware-ti-connectivity <none>
pn xen-hypervisor <none>
-- no debconf information
[toc] | [next] | [standalone]
| From | Salvatore Bonaccorso <carnil@debian.org> |
|---|---|
| Date | 2025-11-22 21:10 +0100 |
| Message-ID | <LU25H-eYxs-3@gated-at.bofh.it> |
| In reply to | #1271209 |
Hi, Jochen reported the folowing while booting 6.17.8 based kernel in Debian: On Sat, Nov 22, 2025 at 07:19:06PM +0100, Jochen Sprickerhof wrote: > Package: src:linux > Version: 6.17.8-1 > Severity: normal > > First time booting into 6.17.8-1 and first time I see UBSAN in my logs: > > [Nov21 08:31] Booting Linux on physical CPU 0x100 > [ +0,012977] ------------[ cut here ]------------ > [ +0,000017] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18 > [ +0,000038] index 0 is out of range for type 'clk_hw *[*]' > [ +0,000025] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1 > [ +0,000018] Hardware name: Samsung Exynos (Flattened Device Tree) > [ +0,000007] Call trace: > [ +0,000009] unwind_backtrace from show_stack+0x18/0x1c > [ +0,000042] show_stack from dump_stack_lvl+0x54/0x68 > [ +0,000036] dump_stack_lvl from ubsan_epilogue+0x8/0x34 > [ +0,000025] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c > [ +0,000024] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x38c/0x428 > [ +0,000029] exynos_clkout_probe from platform_probe+0x64/0x98 > [ +0,000034] platform_probe from really_probe+0xd8/0x3ac > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc > [ +0,000027] __driver_probe_device from driver_probe_device+0x3c/0xd8 > [ +0,000027] driver_probe_device from __driver_attach+0xd8/0x1d8 > [ +0,000028] __driver_attach from bus_for_each_dev+0x84/0xd4 > [ +0,000026] bus_for_each_dev from bus_add_driver+0xf4/0x218 > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140 > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c > [ +0,000023] do_one_initcall from kernel_init_freeable+0x288/0x2fc > [ +0,000022] kernel_init_freeable from kernel_init+0x24/0x140 > [ +0,000022] kernel_init from ret_from_fork+0x14/0x28 > [ +0,000015] Exception stack(0xf0835fb0 to 0xf0835ff8) > [ +0,000012] 5fa0: 00000000 00000000 00000000 00000000 > [ +0,000011] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 > [ +0,000007] ---[ end trace ]--- > [ +0,000226] ------------[ cut here ]------------ > [ +0,000012] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:183:29 > [ +0,000032] index 0 is out of range for type 'clk_hw *[*]' > [ +0,000021] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1 > [ +0,000014] Hardware name: Samsung Exynos (Flattened Device Tree) > [ +0,000006] Call trace: > [ +0,000006] unwind_backtrace from show_stack+0x18/0x1c > [ +0,000032] show_stack from dump_stack_lvl+0x54/0x68 > [ +0,000033] dump_stack_lvl from ubsan_epilogue+0x8/0x34 > [ +0,000023] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c > [ +0,000020] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x354/0x428 > [ +0,000024] exynos_clkout_probe from platform_probe+0x64/0x98 > [ +0,000031] platform_probe from really_probe+0xd8/0x3ac > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc > [ +0,000031] __driver_probe_device from driver_probe_device+0x3c/0xd8 > [ +0,000028] driver_probe_device from __driver_attach+0xd8/0x1d8 > [ +0,000027] __driver_attach from bus_for_each_dev+0x84/0xd4 > [ +0,000025] bus_for_each_dev from bus_add_driver+0xf4/0x218 > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140 > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c > [ +0,000022] do_one_initcall from kernel_init_freeable+0x288/0x2fc > [ +0,000019] kernel_init_freeable from kernel_init+0x24/0x140 > [ +0,000020] kernel_init from ret_from_fork+0x14/0x28 > [ +0,000016] Exception stack(0xf0835fb0 to 0xf0835ff8) > [ +0,000010] 5fa0: 00000000 00000000 00000000 00000000 > [ +0,000009] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 > [ +0,000098] ---[ end trace ]--- Can you have a look into it? The downstream report is at https://bugs.debian.org/1121211 Regards, Salvatore
[toc] | [prev] | [next] | [standalone]
| From | Nathan Chancellor <nathan@kernel.org> |
|---|---|
| Date | 2025-11-22 21:50 +0100 |
| Message-ID | <LU2Ip-eYLC-1@gated-at.bofh.it> |
| In reply to | #1271222 |
On Sat, Nov 22, 2025 at 09:07:40PM +0100, Salvatore Bonaccorso wrote:
> Hi,
>
> Jochen reported the folowing while booting 6.17.8 based kernel in
> Debian:
>
> On Sat, Nov 22, 2025 at 07:19:06PM +0100, Jochen Sprickerhof wrote:
> > Package: src:linux
> > Version: 6.17.8-1
> > Severity: normal
> >
> > First time booting into 6.17.8-1 and first time I see UBSAN in my logs:
> >
> > [Nov21 08:31] Booting Linux on physical CPU 0x100
> > [ +0,012977] ------------[ cut here ]------------
> > [ +0,000017] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18
> > [ +0,000038] index 0 is out of range for type 'clk_hw *[*]'
> > [ +0,000025] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
> > [ +0,000018] Hardware name: Samsung Exynos (Flattened Device Tree)
> > [ +0,000007] Call trace:
> > [ +0,000009] unwind_backtrace from show_stack+0x18/0x1c
> > [ +0,000042] show_stack from dump_stack_lvl+0x54/0x68
> > [ +0,000036] dump_stack_lvl from ubsan_epilogue+0x8/0x34
> > [ +0,000025] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
> > [ +0,000024] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x38c/0x428
> > [ +0,000029] exynos_clkout_probe from platform_probe+0x64/0x98
> > [ +0,000034] platform_probe from really_probe+0xd8/0x3ac
> > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
> > [ +0,000027] __driver_probe_device from driver_probe_device+0x3c/0xd8
> > [ +0,000027] driver_probe_device from __driver_attach+0xd8/0x1d8
> > [ +0,000028] __driver_attach from bus_for_each_dev+0x84/0xd4
> > [ +0,000026] bus_for_each_dev from bus_add_driver+0xf4/0x218
> > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140
> > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c
> > [ +0,000023] do_one_initcall from kernel_init_freeable+0x288/0x2fc
> > [ +0,000022] kernel_init_freeable from kernel_init+0x24/0x140
> > [ +0,000022] kernel_init from ret_from_fork+0x14/0x28
> > [ +0,000015] Exception stack(0xf0835fb0 to 0xf0835ff8)
> > [ +0,000012] 5fa0: 00000000 00000000 00000000 00000000
> > [ +0,000011] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> > [ +0,000007] ---[ end trace ]---
> > [ +0,000226] ------------[ cut here ]------------
> > [ +0,000012] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:183:29
> > [ +0,000032] index 0 is out of range for type 'clk_hw *[*]'
> > [ +0,000021] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
> > [ +0,000014] Hardware name: Samsung Exynos (Flattened Device Tree)
> > [ +0,000006] Call trace:
> > [ +0,000006] unwind_backtrace from show_stack+0x18/0x1c
> > [ +0,000032] show_stack from dump_stack_lvl+0x54/0x68
> > [ +0,000033] dump_stack_lvl from ubsan_epilogue+0x8/0x34
> > [ +0,000023] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
> > [ +0,000020] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x354/0x428
> > [ +0,000024] exynos_clkout_probe from platform_probe+0x64/0x98
> > [ +0,000031] platform_probe from really_probe+0xd8/0x3ac
> > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
> > [ +0,000031] __driver_probe_device from driver_probe_device+0x3c/0xd8
> > [ +0,000028] driver_probe_device from __driver_attach+0xd8/0x1d8
> > [ +0,000027] __driver_attach from bus_for_each_dev+0x84/0xd4
> > [ +0,000025] bus_for_each_dev from bus_add_driver+0xf4/0x218
> > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140
> > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c
> > [ +0,000022] do_one_initcall from kernel_init_freeable+0x288/0x2fc
> > [ +0,000019] kernel_init_freeable from kernel_init+0x24/0x140
> > [ +0,000020] kernel_init from ret_from_fork+0x14/0x28
> > [ +0,000016] Exception stack(0xf0835fb0 to 0xf0835ff8)
> > [ +0,000010] 5fa0: 00000000 00000000 00000000 00000000
> > [ +0,000009] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> > [ +0,000098] ---[ end trace ]---
>
> Can you have a look into it? The downstream report is at
> https://bugs.debian.org/1121211
I bet it is the same problem as the ones I fixed in
6dc445c19050 ("clk: bcm: rpi: Assign ->num before accessing ->hws")
9368cdf90f52 ("clk: bcm: dvp: Assign ->num before accessing ->hws")
So something like this?
Cheers,
Nathan
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 5f1a4f5e2e59..5b21025338bd 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -175,6 +175,7 @@ static int exynos_clkout_probe(struct platform_device *pdev)
clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
clkout->mux.lock = &clkout->slock;
+ clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout",
parent_names, parent_count, &clkout->mux.hw,
&clk_mux_ops, NULL, NULL, &clkout->gate.hw,
@@ -185,7 +186,6 @@ static int exynos_clkout_probe(struct platform_device *pdev)
goto err_unmap;
}
- clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
ret = of_clk_add_hw_provider(clkout->np, of_clk_hw_onecell_get, &clkout->data);
if (ret)
goto err_clk_unreg;
[toc] | [prev] | [next] | [standalone]
| From | Salvatore Bonaccorso <carnil@debian.org> |
|---|---|
| Date | 2025-11-23 09:00 +0100 |
| Message-ID | <LUdaN-f6c4-1@gated-at.bofh.it> |
| In reply to | #1271228 |
Hi Nathan,
On Sat, Nov 22, 2025 at 01:38:56PM -0700, Nathan Chancellor wrote:
> On Sat, Nov 22, 2025 at 09:07:40PM +0100, Salvatore Bonaccorso wrote:
> > Hi,
> >
> > Jochen reported the folowing while booting 6.17.8 based kernel in
> > Debian:
> >
> > On Sat, Nov 22, 2025 at 07:19:06PM +0100, Jochen Sprickerhof wrote:
> > > Package: src:linux
> > > Version: 6.17.8-1
> > > Severity: normal
> > >
> > > First time booting into 6.17.8-1 and first time I see UBSAN in my logs:
> > >
> > > [Nov21 08:31] Booting Linux on physical CPU 0x100
> > > [ +0,012977] ------------[ cut here ]------------
> > > [ +0,000017] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:178:18
> > > [ +0,000038] index 0 is out of range for type 'clk_hw *[*]'
> > > [ +0,000025] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
> > > [ +0,000018] Hardware name: Samsung Exynos (Flattened Device Tree)
> > > [ +0,000007] Call trace:
> > > [ +0,000009] unwind_backtrace from show_stack+0x18/0x1c
> > > [ +0,000042] show_stack from dump_stack_lvl+0x54/0x68
> > > [ +0,000036] dump_stack_lvl from ubsan_epilogue+0x8/0x34
> > > [ +0,000025] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
> > > [ +0,000024] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x38c/0x428
> > > [ +0,000029] exynos_clkout_probe from platform_probe+0x64/0x98
> > > [ +0,000034] platform_probe from really_probe+0xd8/0x3ac
> > > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
> > > [ +0,000027] __driver_probe_device from driver_probe_device+0x3c/0xd8
> > > [ +0,000027] driver_probe_device from __driver_attach+0xd8/0x1d8
> > > [ +0,000028] __driver_attach from bus_for_each_dev+0x84/0xd4
> > > [ +0,000026] bus_for_each_dev from bus_add_driver+0xf4/0x218
> > > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140
> > > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c
> > > [ +0,000023] do_one_initcall from kernel_init_freeable+0x288/0x2fc
> > > [ +0,000022] kernel_init_freeable from kernel_init+0x24/0x140
> > > [ +0,000022] kernel_init from ret_from_fork+0x14/0x28
> > > [ +0,000015] Exception stack(0xf0835fb0 to 0xf0835ff8)
> > > [ +0,000012] 5fa0: 00000000 00000000 00000000 00000000
> > > [ +0,000011] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> > > [ +0,000007] ---[ end trace ]---
> > > [ +0,000226] ------------[ cut here ]------------
> > > [ +0,000012] UBSAN: array-index-out-of-bounds in /build/reproducible-path/linux-6.17.8/drivers/clk/samsung/clk-exynos-clkout.c:183:29
> > > [ +0,000032] index 0 is out of range for type 'clk_hw *[*]'
> > > [ +0,000021] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.8+deb14-armmp #1 NONE Debian 6.17.8-1
> > > [ +0,000014] Hardware name: Samsung Exynos (Flattened Device Tree)
> > > [ +0,000006] Call trace:
> > > [ +0,000006] unwind_backtrace from show_stack+0x18/0x1c
> > > [ +0,000032] show_stack from dump_stack_lvl+0x54/0x68
> > > [ +0,000033] dump_stack_lvl from ubsan_epilogue+0x8/0x34
> > > [ +0,000023] ubsan_epilogue from __ubsan_handle_out_of_bounds+0x88/0x8c
> > > [ +0,000020] __ubsan_handle_out_of_bounds from exynos_clkout_probe+0x354/0x428
> > > [ +0,000024] exynos_clkout_probe from platform_probe+0x64/0x98
> > > [ +0,000031] platform_probe from really_probe+0xd8/0x3ac
> > > [ +0,000031] really_probe from __driver_probe_device+0x94/0x1dc
> > > [ +0,000031] __driver_probe_device from driver_probe_device+0x3c/0xd8
> > > [ +0,000028] driver_probe_device from __driver_attach+0xd8/0x1d8
> > > [ +0,000027] __driver_attach from bus_for_each_dev+0x84/0xd4
> > > [ +0,000025] bus_for_each_dev from bus_add_driver+0xf4/0x218
> > > [ +0,000023] bus_add_driver from driver_register+0x8c/0x140
> > > [ +0,000027] driver_register from do_one_initcall+0x50/0x24c
> > > [ +0,000022] do_one_initcall from kernel_init_freeable+0x288/0x2fc
> > > [ +0,000019] kernel_init_freeable from kernel_init+0x24/0x140
> > > [ +0,000020] kernel_init from ret_from_fork+0x14/0x28
> > > [ +0,000016] Exception stack(0xf0835fb0 to 0xf0835ff8)
> > > [ +0,000010] 5fa0: 00000000 00000000 00000000 00000000
> > > [ +0,000009] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > > [ +0,000009] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> > > [ +0,000098] ---[ end trace ]---
> >
> > Can you have a look into it? The downstream report is at
> > https://bugs.debian.org/1121211
>
> I bet it is the same problem as the ones I fixed in
>
> 6dc445c19050 ("clk: bcm: rpi: Assign ->num before accessing ->hws")
> 9368cdf90f52 ("clk: bcm: dvp: Assign ->num before accessing ->hws")
>
> So something like this?
>
> Cheers,
> Nathan
>
> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
> index 5f1a4f5e2e59..5b21025338bd 100644
> --- a/drivers/clk/samsung/clk-exynos-clkout.c
> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
> @@ -175,6 +175,7 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
> clkout->mux.lock = &clkout->slock;
>
> + clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout",
> parent_names, parent_count, &clkout->mux.hw,
> &clk_mux_ops, NULL, NULL, &clkout->gate.hw,
> @@ -185,7 +186,6 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> goto err_unmap;
> }
>
> - clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> ret = of_clk_add_hw_provider(clkout->np, of_clk_hw_onecell_get, &clkout->data);
> if (ret)
> goto err_clk_unreg;
Thank you very much. Jochen, can you test the patch and report back?
Regards,
Salvatore
[toc] | [prev] | [next] | [standalone]
| From | Jochen Sprickerhof <jspricke@debian.org> |
|---|---|
| Date | 2025-11-23 21:40 +0100 |
| Message-ID | <LUp2h-fejN-1@gated-at.bofh.it> |
| In reply to | #1271228 |
[Multipart message — attachments visible in raw view] — view raw
Hi Nathan,
* Nathan Chancellor <nathan@kernel.org> [2025-11-22 13:38]:
>I bet it is the same problem as the ones I fixed in
>
> 6dc445c19050 ("clk: bcm: rpi: Assign ->num before accessing ->hws")
> 9368cdf90f52 ("clk: bcm: dvp: Assign ->num before accessing ->hws")
>
>So something like this?
>
>Cheers,
>Nathan
>
>diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
>index 5f1a4f5e2e59..5b21025338bd 100644
>--- a/drivers/clk/samsung/clk-exynos-clkout.c
>+++ b/drivers/clk/samsung/clk-exynos-clkout.c
>@@ -175,6 +175,7 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> clkout->mux.shift = EXYNOS_CLKOUT_MUX_SHIFT;
> clkout->mux.lock = &clkout->slock;
>
>+ clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> clkout->data.hws[0] = clk_hw_register_composite(NULL, "clkout",
> parent_names, parent_count, &clkout->mux.hw,
> &clk_mux_ops, NULL, NULL, &clkout->gate.hw,
>@@ -185,7 +186,6 @@ static int exynos_clkout_probe(struct platform_device *pdev)
> goto err_unmap;
> }
>
>- clkout->data.num = EXYNOS_CLKOUT_NR_CLKS;
> ret = of_clk_add_hw_provider(clkout->np, of_clk_hw_onecell_get, &clkout->data);
> if (ret)
> goto err_clk_unreg;
>
This fixes it for me, feel free to add a
Tested-by: Jochen Sprickerhof <jochen@sprickerhof.de>
Thanks!
Jochen
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.bugs.dist
csiph-web