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>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <VI1PR02MB395224C3D5F37DEDA794AED09C84A@VI1PR02MB3952.eurprd02.prod.outlook.com>
Date: Wed, 7 Jan 2026 14:32:05 +0000
From: David Binderman <dcb314@...mail.com>
To: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>, "bhe@...hat.com"
	<bhe@...hat.com>, "kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: linux-6.19-rc4/kernel/kexec_core.c:425: Possible loss of data ?

Hello there,

Static analyser cppcheck says:

linux-6.19-rc4/kernel/kexec_core.c:425:7: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]

Source code is

    size = (1 << order) << PAGE_SHIFT;

I have no idea how large order gets, but if it gets over about
30 or so, then IMHO there will be a loss of bits.

Perhaps some sanity check on the value of order would
be a good idea ? Either that or

    size = (1UL << order) << PAGE_SHIFT;

might be better code.

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ