lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301051008.a8468257-yujie.liu@intel.com>
Date:   Thu, 5 Jan 2023 13:54:35 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Niklas Schnelle <schnelle@...ux.ibm.com>
CC:     <oe-lkp@...ts.linux.dev>, <lkp@...el.com>,
        Arnd Bergmann <arnd@...nel.org>,
        <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>
Subject: [niks:has_ioport_v3] [tty] aa0652d7f1:
 BUG:kernel_NULL_pointer_dereference,address

Greeting,

FYI, we noticed BUG:kernel_NULL_pointer_dereference,address due to commit (built with clang-14):

commit: aa0652d7f1b311e55232a8153522fdaaba0f197a ("tty: serial: handle HAS_IOPORT dependencies")
https://git.kernel.org/cgit/linux/kernel/git/niks/linux.git has_ioport_v3

in testcase: boot

on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


[    2.166733][    T0] calling  univ8250_console_init+0x0/0x30 @ 0
[    2.167555][    T0] BUG: kernel NULL pointer dereference, address: 00000000
[    2.168429][    T0] #PF: supervisor read access in kernel mode
[    2.169188][    T0] #PF: error_code(0x0000) - not-present page
[    2.169909][    T0] *pde = 00000000 
[    2.170361][    T0] Oops: 0000 [#1]
[    2.170799][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 6.2.0-rc2-00034-gaa0652d7f1b3 #1 06b22a6623100bbcf5eb4bbd76b0938141d59f7b
[    2.172282][    T0] EIP: 0x0
[    2.172633][    T0] Code: Unable to access opcode bytes at 0xffffffd6.
[    2.173392][    T0] EAX: c3b6e098 EBX: 00000000 ECX: 00000000 EDX: 00000001
[    2.174255][    T0] ESI: c3b6e098 EDI: 00000000 EBP: c2c3de7c ESP: c2c3de50
[    2.175138][    T0] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00210046
[    2.176087][    T0] CR0: 80050033 CR2: ffffffd6 CR3: 0341f000 CR4: 00040690
[    2.176967][    T0] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[    2.177850][    T0] DR6: fffe0ff0 DR7: 00000400
[    2.178422][    T0] Call Trace:
[    2.178805][    T0]  serial8250_do_set_termios+0x311/0x540
[    2.179477][    T0]  serial8250_set_termios+0x17/0x20
[    2.180120][    T0]  ? serial8250_shutdown+0x20/0x20
[    2.180729][    T0]  uart_set_options+0x153/0x180
[    2.181310][    T0]  serial8250_console_setup+0x128/0x160
[    2.181985][    T0]  univ8250_console_setup+0x52/0x70
[    2.182625][    T0]  ? univ8250_console_exit+0x40/0x40
[    2.183253][    T0]  try_enable_preferred_console+0xab/0xe0
[    2.183931][    T0]  register_console+0xe2/0x470
[    2.184501][    T0]  ? serial8250_isa_init_ports+0xa1/0x1a0
[    2.185199][    T0]  ? earlycon_print_info+0x90/0x90
[    2.185836][    T0]  univ8250_console_init+0x22/0x30
[    2.186462][    T0]  console_init+0xb7/0x1b0
[    2.187002][    T0]  start_kernel+0x1f6/0x380
[    2.187562][    T0]  i386_start_kernel+0x218/0x220
[    2.188155][    T0]  startup_32_smp+0x151/0x160
[    2.188714][    T0] Modules linked in:
[    2.189185][    T0] CR2: 0000000000000000
[    2.189667][    T0] ---[ end trace 0000000000000000 ]---
[    2.190352][    T0] EIP: 0x0
[    2.190737][    T0] Code: Unable to access opcode bytes at 0xffffffd6.
[    2.191577][    T0] EAX: c3b6e098 EBX: 00000000 ECX: 00000000 EDX: 00000001
[    2.192461][    T0] ESI: c3b6e098 EDI: 00000000 EBP: c2c3de7c ESP: c2c3de50
[    2.193341][    T0] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00210046
[    2.194285][    T0] CR0: 80050033 CR2: ffffffd6 CR3: 0341f000 CR4: 00040690
[    2.195170][    T0] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[    2.196100][    T0] DR6: fffe0ff0 DR7: 00000400
[    2.196652][    T0] Kernel panic - not syncing: Fatal exception


If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <yujie.liu@...el.com>
| Link: https://lore.kernel.org/oe-lkp/202301051008.a8468257-yujie.liu@intel.com


To reproduce:

        # build kernel
	cd linux
	cp config-6.2.0-rc2-00034-gaa0652d7f1b3 .config
	make HOSTCC=clang-14 CC=clang-14 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
	make HOSTCC=clang-14 CC=clang-14 ARCH=i386 INSTALL_MOD_PATH=<mod-install-dir> modules_install
	cd <mod-install-dir>
	find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz


        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email

        # if come across any failure that blocks the test,
        # please remove ~/.lkp and /lkp dir to run from a clean state.


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

View attachment "config-6.2.0-rc2-00034-gaa0652d7f1b3" of type "text/plain" (164986 bytes)

View attachment "job-script" of type "text/plain" (4699 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (4320 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ