public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Andrey Konovalov <andreyknvl@gmail.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Erhard Furtner <erhard_f@mailbox.org>,
	Nico Pache <npache@redhat.com>, Marco Elver <elver@google.com>,
	Alexander Potapenko <glider@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Daniel Axtens <dja@axtens.net>,
	Dmitry Vyukov <dvyukov@google.com>,
	<linux-hardening@vger.kernel.org>, <oliver.sang@intel.com>
Subject: [linus:master] [kasan, fortify]  2e577732e8: BUG:KASAN:global-out-of-bounds_in_usb_copy_descriptors
Date: Tue, 23 Jul 2024 16:51:36 +0800	[thread overview]
Message-ID: <202407231547.389c0ad2-oliver.sang@intel.com> (raw)



Hello,

we noticed this is a fix commit, however, we don't have enough knowledge to
determine if new KASAN issue is expected actually after this fix.
so we just made this report FYI what we observed in our tests.


kernel test robot noticed "BUG:KASAN:global-out-of-bounds_in_usb_copy_descriptors" on:

commit: 2e577732e8d28b9183df701fb90cb7943aa4ed16 ("kasan, fortify: properly rename memintrinsics")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

[test failed on linus/master      2c9b3512402ed192d1f43f4531fb5da947e72bd0]
[test failed on linux-next/master 41c196e567fb1ea97f68a2ffb7faab451cd90854]

in testcase: boot

compiler: gcc-13
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+--------------------------------------------------------------------+------------+------------+
|                                                                    | a38568a0b4 | 2e577732e8 |
+--------------------------------------------------------------------+------------+------------+
| BUG:KASAN:global-out-of-bounds_in_usb_copy_descriptors             | 0          | 33         |
+--------------------------------------------------------------------+------------+------------+


If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202407231547.389c0ad2-oliver.sang@intel.com



[   25.773129][    T1] usbcore: registered new device driver usbip-host
[   25.774597][    T1] ==================================================================
[   25.775287][    T1] BUG: KASAN: global-out-of-bounds in usb_copy_descriptors+0x15f/0x370
[   25.776048][    T1] Read of size 192 at addr ffffffff90c3e4c0 by task swapper/0/1
[   25.776678][    T1] 
[   25.776874][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.9.0-11955-g2e577732e8d2 #1 fc5a69228220b3bda6c63ecfbdf264b31ed62f1e
[   25.777833][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[   25.777833][    T1] Call Trace:
[   25.777833][    T1]  <TASK>
[   25.777833][    T1]  dump_stack_lvl+0x62/0x90
[   25.777833][    T1]  print_address_description+0x55/0x370
[   25.777833][    T1]  ? usb_copy_descriptors+0x15f/0x370
[   25.777833][    T1]  print_report+0xb9/0x2b0
[   25.777833][    T1]  ? __virt_addr_valid+0x213/0x3e0
[   25.777833][    T1]  ? kasan_addr_to_slab+0x1d/0x60
[   25.777833][    T1]  ? usb_copy_descriptors+0x15f/0x370
[   25.777833][    T1]  kasan_report+0xa1/0xe0
[   25.777833][    T1]  ? usb_copy_descriptors+0x15f/0x370
[   25.777833][    T1]  kasan_check_range+0x101/0x1b0
[   25.777833][    T1]  __asan_memcpy+0x1f/0x60
[   25.777833][    T1]  usb_copy_descriptors+0x15f/0x370
[   25.777833][    T1]  usb_assign_descriptors+0xad/0x410
[   25.777833][    T1]  f_audio_bind+0xe25/0x24f0
[   25.785907][    T1]  usb_add_function+0x192/0x4e0
[   25.785907][    T1]  audio_do_config+0xf9/0x160
[   25.785907][    T1]  ? __pfx_audio_do_config+0x10/0x10
[   25.785907][    T1]  usb_add_config+0x38/0x460
[   25.785907][    T1]  audio_bind+0x315/0x540
[   25.785907][    T1]  ? composite_dev_prepare+0x22e/0x410
[   25.785907][    T1]  composite_bind+0x1a9/0x750
[   25.785907][    T1]  gadget_bind_driver+0x211/0xae0
[   25.785907][    T1]  really_probe+0x1c8/0x6a0
[   25.785907][    T1]  __driver_probe_device+0x24c/0x310
[   25.785907][    T1]  driver_probe_device+0x4e/0x210
[   25.785907][    T1]  __device_attach_driver+0x161/0x320
[   25.793935][    T1]  ? __pfx___device_attach_driver+0x10/0x10
[   25.793935][    T1]  bus_for_each_drv+0x114/0x1a0
[   25.793935][    T1]  ? __pfx_bus_for_each_drv+0x10/0x10
[   25.793935][    T1]  ? _raw_spin_unlock_irqrestore+0x3e/0x50
[   25.793935][    T1]  __device_attach+0x199/0x380
[   25.793935][    T1]  ? __pfx___device_attach+0x10/0x10
[   25.793935][    T1]  ? bus_to_subsys+0xd7/0x110
[   25.793935][    T1]  ? do_raw_spin_unlock+0x54/0x1f0
[   25.793935][    T1]  bus_probe_device+0x12f/0x180
[   25.793935][    T1]  device_add+0x98f/0x1010
[   25.793935][    T1]  ? __pfx_device_add+0x10/0x10
[   25.793935][    T1]  ? lockdep_hardirqs_on_prepare+0x275/0x3e0
[   25.793935][    T1]  usb_add_gadget+0x4b4/0x720
[   25.793935][    T1]  usb_add_gadget_udc+0x160/0x1e0
[   25.793935][    T1]  vudc_probe+0x15d/0x230
[   25.793935][    T1]  platform_probe+0x9e/0x140
[   25.793935][    T1]  really_probe+0x1c8/0x6a0
[   25.801841][    T1]  __driver_probe_device+0x24c/0x310
[   25.801841][    T1]  ? acpi_driver_match_device+0xac/0x100
[   25.801841][    T1]  driver_probe_device+0x4e/0x210
[   25.801841][    T1]  __device_attach_driver+0x161/0x320
[   25.801841][    T1]  ? __pfx___device_attach_driver+0x10/0x10
[   25.801841][    T1]  bus_for_each_drv+0x114/0x1a0
[   25.801841][    T1]  ? __pfx_bus_for_each_drv+0x10/0x10
[   25.801841][    T1]  ? _raw_spin_unlock_irqrestore+0x3e/0x50
[   25.801841][    T1]  __device_attach+0x199/0x380
[   25.801841][    T1]  ? __pfx___device_attach+0x10/0x10
[   25.801841][    T1]  ? bus_to_subsys+0xd7/0x110
[   25.801841][    T1]  ? do_raw_spin_unlock+0x54/0x1f0
[   25.801841][    T1]  bus_probe_device+0x12f/0x180
[   25.801841][    T1]  device_add+0x98f/0x1010
[   25.801841][    T1]  ? __pfx_device_add+0x10/0x10
[   25.801841][    T1]  ? __raw_spin_lock_init+0x3b/0x110
[   25.801841][    T1]  platform_device_add+0x376/0x5b0
[   25.809850][    T1]  ? platform_device_alloc+0xc9/0x260
[   25.809850][    T1]  vudc_init+0x7d/0x370
[   25.809850][    T1]  ? __pfx_vudc_init+0x10/0x10
[   25.809850][    T1]  do_one_initcall+0xdf/0x460
[   25.809850][    T1]  ? __pfx_do_one_initcall+0x10/0x10
[   25.809850][    T1]  ? __kmalloc_noprof+0x219/0x430
[   25.809850][    T1]  ? do_initcalls+0x2e/0x3d0
[   25.809850][    T1]  do_initcalls+0x1b6/0x3d0
[   25.809850][    T1]  kernel_init_freeable+0x230/0x3c0
[   25.809850][    T1]  ? __pfx_kernel_init+0x10/0x10
[   25.809850][    T1]  kernel_init+0x1b/0x1e0
[   25.809850][    T1]  ? _raw_spin_unlock_irq+0x24/0x40
[   25.809850][    T1]  ret_from_fork+0x30/0x70
[   25.809850][    T1]  ? __pfx_kernel_init+0x10/0x10
[   25.809850][    T1]  ret_from_fork_asm+0x1a/0x30
[   25.809850][    T1]  </TASK>
[   25.809850][    T1] 
[   25.809850][    T1] The buggy address belongs to the variable:
[   25.809850][    T1]  ac_header_desc+0x0/0x40
[   25.809850][    T1] 
[   25.817848][    T1] The buggy address belongs to the physical page:
[   25.817848][    T1] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c3e
[   25.817848][    T1] flags: 0x100000000002000(reserved|node=0|zone=1)
[   25.817848][    T1] raw: 0100000000002000 ffffea0000430f88 ffffea0000430f88 0000000000000000
[   25.817848][    T1] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   25.817848][    T1] page dumped because: kasan: bad access detected
[   25.817848][    T1] page_owner info is not present (never set?)
[   25.817848][    T1] 
[   25.817848][    T1] Memory state around the buggy address:
[   25.817848][    T1]  ffffffff90c3e380: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
[   25.817848][    T1]  ffffffff90c3e400: 00 00 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
[   25.817848][    T1] >ffffffff90c3e480: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
[   25.817848][    T1]                                               ^
[   25.825831][    T1]  ffffffff90c3e500: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
[   25.825831][    T1]  ffffffff90c3e580: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
[   25.825831][    T1] ==================================================================



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240723/202407231547.389c0ad2-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


             reply	other threads:[~2024-07-23  8:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  8:51 kernel test robot [this message]
2024-07-23 22:20 ` [linus:master] [kasan, fortify] 2e577732e8: BUG:KASAN:global-out-of-bounds_in_usb_copy_descriptors Andrey Konovalov
2024-07-23 23:35 ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202407231547.389c0ad2-oliver.sang@intel.com \
    --to=oliver.sang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=dja@axtens.net \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=erhard_f@mailbox.org \
    --cc=glider@google.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=npache@redhat.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=ryabinin.a.a@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox