Bug 112171 - UBSAN: Undefined behaviour in drivers/usb/host/ehci-hub.c:873:47
Summary: UBSAN: Undefined behaviour in drivers/usb/host/ehci-hub.c:873:47
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-08 15:13 UTC by onorua
Modified: 2016-02-10 07:15 UTC (History)
0 users

See Also:
Kernel Version: 4.5.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
journal-b1 output (116.57 KB, application/octet-stream)
2016-02-08 15:13 UTC, onorua
Details

Description onorua 2016-02-08 15:13:07 UTC
Created attachment 203151 [details]
journal-b1 output

After upgrade I've got following stack trace, never seen that before:
================================================================================
Feb 08 22:58:56 x kernel: UBSAN: Undefined behaviour in drivers/usb/host/ehci-hub.c:873:47
Feb 08 22:58:56 x kernel: index -1 is out of range for type 'u32 [1]'
Feb 08 22:58:56 x kernel: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.5.0-rc3 #98
Feb 08 22:58:56 x kernel: Hardware name: LENOVO 20BSCTO1WW/20BSCTO1WW, BIOS N14ET32W (1.10 ) 08/13/2015
Feb 08 22:58:56 x kernel:  0000000000000000 0000000084b750fa ffff880224deb358 ffffffff81832ca4
Feb 08 22:58:56 x kernel:  ffffffffffffffff 0000000084b750fa ffff880224deb380 ffffffffffffffff
Feb 08 22:58:56 x kernel:  ffff880224deb370 ffffffff818a6360 ffffffff833ea920 ffff880224deb3c8
Feb 08 22:58:56 x kernel: Call Trace:
Feb 08 22:58:56 x kernel:  [<ffffffff81832ca4>] dump_stack+0xaf/0x10c
Feb 08 22:58:56 x kernel:  [<ffffffff818a6360>] ubsan_epilogue+0x14/0x56
Feb 08 22:58:56 x kernel:  [<ffffffff818a6c47>] __ubsan_handle_out_of_bounds+0x86/0xb3
Feb 08 22:58:56 x kernel:  [<ffffffff81e65a88>] ehci_hub_control+0xcf/0x141e
Feb 08 22:58:56 x kernel:  [<ffffffff81e35a24>] rh_call_control+0xaa6/0xcf1
Feb 08 22:58:56 x kernel:  [<ffffffff81180000>] ? hib_wait_io+0x64/0x132
Feb 08 22:58:56 x kernel:  [<ffffffff81d0207d>] ? dev_vprintk_emit+0x391/0x3be
Feb 08 22:58:56 x kernel:  [<ffffffff81e3701b>] usb_hcd_submit_urb+0x318/0x592
Feb 08 22:58:56 x kernel:  [<ffffffff81e3a0fc>] usb_submit_urb+0xc26/0xc50
Feb 08 22:58:56 x kernel:  [<ffffffff81e3c134>] usb_start_wait_urb+0xb1/0x198
Feb 08 22:58:56 x kernel:  [<ffffffff81e390f2>] ? usb_alloc_urb+0x21/0x6a
Feb 08 22:58:56 x kernel:  [<ffffffff81e3c714>] usb_control_msg+0x1c5/0x21d
Feb 08 22:58:56 x kernel:  [<ffffffff81e2f635>] hub_probe+0x8ed/0x18cb
Feb 08 22:58:56 x kernel:  [<ffffffff81129fbb>] ? get_parent_ip+0x14/0x6d
Feb 08 22:58:56 x kernel:  [<ffffffff81e43d0d>] usb_probe_interface+0x362/0x48e
Feb 08 22:58:56 x kernel:  [<ffffffff81d0aa47>] driver_probe_device+0x392/0x719
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b546>] __device_attach_driver+0x1bd/0x1cf
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b389>] ? device_release_driver+0x4c/0x4c
Feb 08 22:58:56 x kernel:  [<ffffffff81d06721>] bus_for_each_drv+0x136/0x165
Feb 08 22:58:56 x kernel:  [<ffffffff81d0a56b>] __device_attach+0x148/0x23a
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b572>] device_initial_probe+0x1a/0x23
Feb 08 22:58:56 x kernel:  [<ffffffff81d089e2>] bus_probe_device+0x98/0x1bc
Feb 08 22:58:56 x kernel:  [<ffffffff81d03f8e>] device_add+0x914/0xc99
Feb 08 22:58:56 x kernel:  [<ffffffff81e3eca0>] usb_set_configuration+0xee2/0xfc8
Feb 08 22:58:56 x kernel:  [<ffffffff81e55e40>] generic_probe+0x83/0xcf
Feb 08 22:58:56 x kernel:  [<ffffffff81e43edd>] usb_probe_device+0xa4/0xb0
Feb 08 22:58:56 x kernel:  [<ffffffff81d0aa47>] driver_probe_device+0x392/0x719
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b546>] __device_attach_driver+0x1bd/0x1cf
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b389>] ? device_release_driver+0x4c/0x4c
Feb 08 22:58:56 x kernel:  [<ffffffff81d06721>] bus_for_each_drv+0x136/0x165
Feb 08 22:58:56 x kernel:  [<ffffffff81d0a56b>] __device_attach+0x148/0x23a
Feb 08 22:58:56 x kernel:  [<ffffffff81d0b572>] device_initial_probe+0x1a/0x23
Feb 08 22:58:56 x kernel:  [<ffffffff81d089e2>] bus_probe_device+0x98/0x1bc
Feb 08 22:58:56 x kernel:  [<ffffffff81d03f8e>] device_add+0x914/0xc99
Feb 08 22:58:56 x kernel:  [<ffffffff81a885f4>] ? add_device_randomness+0x206/0x244
Feb 08 22:58:56 x kernel:  [<ffffffff81e2b27f>] usb_new_device+0xb8c/0xe1e
Feb 08 22:58:56 x kernel:  [<ffffffff81e34ad0>] usb_add_hcd+0xb2d/0xfbd
Feb 08 22:58:56 x kernel:  [<ffffffff81e5af29>] usb_hcd_pci_probe+0x754/0xab9
Feb 08 22:58:56 x kernel:  [<ffffffff823497a6>] ? _raw_spin_unlock_irqrestore+0x7d/0xbd
Feb 08 22:58:56 x kernel:  [<ffffffff81e744ef>] ehci_pci_probe+0x4e/0x5a
Feb 08 22:58:56 x kernel:  [<ffffffff818c9edf>] pci_device_probe+0x1a7/0x290
Feb 08 22:58:56 x kernel:  [<ffffffff81d0a9e1>] driver_probe_device+0x32c/0x719
Feb 08 22:58:56 x kernel:  [<ffffffff81d0af06>] __driver_attach+0x138/0x192
Feb 08 22:58:56 x kernel:  [<ffffffff81d0adce>] ? driver_probe_device+0x719/0x719
Feb 08 22:58:56 x kernel:  [<ffffffff81d06cf2>] bus_for_each_dev+0xf4/0x11e
Feb 08 22:58:56 x kernel:  [<ffffffff81d09482>] driver_attach+0x4a/0x54
Feb 08 22:58:56 x kernel:  [<ffffffff81d0907f>] bus_add_driver+0x23c/0x45f
Feb 08 22:58:56 x kernel:  [<ffffffff81d0ca3f>] driver_register+0x1f6/0x278
Feb 08 22:58:56 x kernel:  [<ffffffff818c655a>] __pci_register_driver+0x115/0x139
Feb 08 22:58:56 x kernel:  [<ffffffff83825961>] ? ehci_hcd_init+0x9f/0x9f
Feb 08 22:58:56 x kernel:  [<ffffffff838259e9>] ehci_pci_init+0x88/0x91
Feb 08 22:58:56 x kernel:  [<ffffffff81000563>] do_one_initcall+0x217/0x2ee
Feb 08 22:58:56 x kernel:  [<ffffffff837a5f00>] ? do_early_param+0xb1/0x124
Feb 08 22:58:56 x kernel:  [<ffffffff837a7443>] kernel_init_freeable+0x4b2/0x5e2
Feb 08 22:58:56 x kernel:  [<ffffffff82339df4>] ? rest_init+0xdb/0xdb
Feb 08 22:58:56 x kernel:  [<ffffffff82339e09>] kernel_init+0x15/0x16b
Feb 08 22:58:56 x kernel:  [<ffffffff8234a19f>] ret_from_fork+0x3f/0x70
Feb 08 22:58:56 x kernel:  [<ffffffff82339df4>] ? rest_init+0xdb/0xdb
Feb 08 22:58:56 x kernel: ================================================================================

Please let me know if you need any other information information
Comment 1 Greg Kroah-Hartman 2016-02-08 16:12:57 UTC
On Mon, Feb 08, 2016 at 03:13:07PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=112171
> 
>             Bug ID: 112171
>            Summary: UBSAN: Undefined behaviour in
>                     drivers/usb/host/ehci-hub.c:873:47

Please send this to the linux-usb@vger.kernel.org mailing list.
Comment 2 onorua 2016-02-09 04:42:39 UTC
done, sent to the linux-usb@vger.kernel.org mailing list.
Comment 3 onorua 2016-02-10 07:15:07 UTC
Got a reply:
==============
On Tue, Feb 09, 2016 at 12:41:37PM +0800, Yaroslav Molochko wrote:
> After upgrade to  4.5.0-rc3 I've got following stack trace, never seen
> that before:
>
> ================================================================================
> Feb 08 22:58:56 x kernel: UBSAN: Undefined behaviour in
> drivers/usb/host/ehci-hub.c:873:47

Try turning off ubsan if you aren't using it to try to find bugs in the
kernel.  If you do want to use it to find bugs, please send a patch to
resolve this reported issue, if it really is an issue...

thanks,

greg k-h
=============

CONFIG_UBSAN option was introduced in 4.5.0-rc1

Note You need to log in before you can comment on or make changes to this bug.