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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200402153316.GF20730@hirez.programming.kicks-ass.net>
Date:   Thu, 2 Apr 2020 17:33:16 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     hejingxian <hejingxian@...wei.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "juri.lelli@...hat.com" <juri.lelli@...hat.com>,
        "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
        "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "bsegall@...gle.com" <bsegall@...gle.com>,
        "mgorman@...e.de" <mgorman@...e.de>,
        Hushiyuan <hushiyuan@...wei.com>,
        "hewenliang (C)" <hewenliang4@...wei.com>
Subject: Re: [PATCH] fair sched: Fix signed integer overflow problem in fair
 sched

On Thu, Apr 02, 2020 at 02:52:40PM +0000, hejingxian wrote:
> During execution applications in my arm64 virtual machine with UBSAN, the UBSAN error message is showed:
> UBSAN: Undefined behaviour in kernel/sched/fair.c
> signed integer overflow:
> 166982794708445 * 64885 cannot be represented in type 'long int'
> CPU: 40 PID: 4134072 Comm: stress-ng-sched Kdump: loaded Tainted: G    B   W  OE     4.19.95-vhulk2002.1.0.0041.eulerosv2r8.aarch64 #1
> Hardware name: Huawei TaiShan 2280 V2/BC82AMDD, BIOS 0.98 08/25/2019
> Call trace:
>         dump_backtrace+0x0/0x310
>         show_stack+0x28/0x38
>         dump_stack+0xd8/0x108
>         ubsan_epilogue+0x1c/0x94
>         handle_overflow+0x14c/0x19c
>         __ubsan_handle_mul_overflow+0x34/0x44
>         task_numa_find_cpu+0xdec/0x1058
>         task_numa_migrate+0x3ac/0x12d0
>         task_numa_fault+0x4f0/0x5f0
>         do_numa_page+0x480/0x848
>         __handle_mm_fault+0x8d8/0x9b0
>         handle_mm_fault+0x280/0x460
>         do_page_fault+0x3ec/0x890
>         do_translation_fault+0xe4/0x100
>         do_mem_abort+0xc0/0x1b0
>         el0_da+0x24/0x28
> 
> The multiplication of signed long integers in load_too_imbalanced may
> occur overflow, then we use unsigned long integers instead of signed integers.

NAK, UBSAN is smoking dope, and you patch is actively wrong.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ