Re: UBSAN: Undefined behaviour in drivers/acpi/sysfs.c:849:33

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Linux folks,


On 12/13/17 14:13, Paul Menzel wrote:

I enabled the undefined behavior sanitizer, and built Linus’ master branch under Ubuntu 17.10 with gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0.

```
$ grep UBSAN /boot/config-4.15.0-rc3+
CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set
CONFIG_UBSAN=y
CONFIG_UBSAN_SANITIZE_ALL=y
# CONFIG_UBSAN_ALIGNMENT is not set
CONFIG_UBSAN_NULL=y
```

Starting the system the messages below are printed.

```
[    0.758899] ================================================================================
[    0.758960] UBSAN: Undefined behaviour in drivers/acpi/sysfs.c:849:33
[    0.759008] shift exponent 64 is too large for 64-bit type 'long long unsigned int'
[    0.759064] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc3+ #12
[    0.759076] Hardware name: Notebook N24_25BU/N24_25BU, BIOS 5.12 07/07/2017
[    0.759088] Call Trace:
[    0.759118]  ? ftrace_graph_caller+0x98/0x98
[    0.759133]  dump_stack+0x70/0xae
[    0.759167]  ubsan_epilogue+0x9/0x40
[    0.759188]  __ubsan_handle_shift_out_of_bounds+0x12b/0x170
[    0.759214]  ? ftrace_graph_caller+0x68/0x98
[    0.759293]  ? acpi_gpe_apply_masked_gpes+0x50/0xa9
[    0.759314]  acpi_gpe_apply_masked_gpes+0x50/0xa9
[    0.759348]  ? ftrace_graph_caller+0x98/0x98
[    0.759363]  acpi_scan_init+0x145/0x2e4
[    0.759385]  ? acpi_sleep_proc_init+0x24/0x24
[    0.759413]  ? acpi_sleep_proc_init+0x24/0x24
[    0.759429]  ? ftrace_graph_caller+0x98/0x98
[    0.759444]  acpi_init+0x340/0x3a0
[    0.759500]  ? ftrace_graph_caller+0x98/0x98
[    0.759515]  do_one_initcall+0x173/0x200
[    0.759553]  ? acpi_sleep_proc_init+0x24/0x24
[    0.759573]  ? do_one_initcall+0x5/0x200
[    0.759612]  ? ftrace_graph_caller+0x98/0x98
[    0.759628]  kernel_init_freeable+0x305/0x395
[    0.759653]  ? rest_init+0xd0/0xd0
[    0.759689]  kernel_init+0xb/0x119
[    0.759705]  ? rest_init+0xd0/0xd0
[    0.759721]  ret_from_fork+0x1f/0x30
[    0.759815] ================================================================================
```

Please tell me, if you need anything else to address this.

I created bug #198481 [1], so this is not forgotten about.


Kind regards,

Paul


[1] https://bugzilla.kernel.org/show_bug.cgi?id=198481

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux