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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1e9f9975-7be0-4abf-87c6-a8f54cd9d059@app.fastmail.com>
Date: Fri, 22 Aug 2025 13:03:50 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "schuster.simon@...mens-energy.com" <schuster.simon@...mens-energy.com>,
 "David Hildenbrand" <david@...hat.com>
Cc: "linux-mm@...ck.org" <linux-mm@...ck.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "Dinh Nguyen" <dinguyen@...nel.org>,
 "Christian Brauner" <brauner@...nel.org>,
 "Andrew Morton" <akpm@...ux-foundation.org>,
 "Lorenzo Stoakes" <lorenzo.stoakes@...cle.com>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>,
 "Vlastimil Babka" <vbabka@...e.cz>, "Mike Rapoport" <rppt@...nel.org>,
 "Suren Baghdasaryan" <surenb@...gle.com>, "Michal Hocko" <mhocko@...e.com>,
 "Ingo Molnar" <mingo@...hat.com>, "Peter Zijlstra" <peterz@...radead.org>,
 "Juri Lelli" <juri.lelli@...hat.com>,
 "Vincent Guittot" <vincent.guittot@...aro.org>,
 "Dietmar Eggemann" <dietmar.eggemann@....com>,
 "Steven Rostedt" <rostedt@...dmis.org>,
 "Benjamin Segall" <bsegall@...gle.com>, "Mel Gorman" <mgorman@...e.de>,
 "Valentin Schneider" <vschneid@...hat.com>, "Kees Cook" <kees@...nel.org>
Subject: Re: [PATCH 1/2] copy_process: Handle architectures where sizeof(unsigned long)
 < sizeof(u64)

On Fri, Aug 22, 2025, at 10:52, schuster.simon@...mens-energy.com wrote:
> On Thu, Aug 21, 2025 at 11:14:00PM +0200, David Hildenbrand wrote:
>> Sounds reasonable.
>>
>> But is this actually something that is already exposed before patch#2
>> on other architectures?
>
> I'm not sure, but I would assume so, as e.g., arch/arm seems to have
> support for clone3, but also seems to use 32bit unsigned longs as far as
> I can tell and, thus, should also be affected:

Correct. 'unsigned long' is always the native word size for an ISA
on architectures that Linux runs on, and the same size as a pointer,
so the bug affects all 32-bit architectures that have clone3:

arc, arm, csky, m68k, microblaze, mips32, openrisc, parisc32,
powerpc32, riscv32, x86-32 and xtensa.

However, since the ABI itself is fine and 64-bit kernels pass the
value as native words internally, the 'compat' mode support on
arm/mips/ parisc/powerpc/riscv/s390/x86 does not have the same
problem, and running the same 32-bit executable on a 64-bit kernel
should work fine. This may explain why nobody caught this so far,
even when they were testing the new flags with x86-32 or arm32
userland, but using 64-bit machines.

>> (I assume above output is with patch #2 but without patch #1)
>
> Yes, sorry, that one is on me; I've naturally first implemented support
> for clone3 on nios2 and then investigated the test failures, but somehow
> deemed it wise for whatever reason to switch the commit order in the
> patch submission...

The order you picked is fine: we generally want bug fixes before
new features to allow backporting them more easily. Please add

Fixes: b612e5df4587 ("clone3: add CLONE_CLEAR_SIGHAND")
Cc: stable@...r.kernel.org # linux-5.5+

above your Signed-off-by for this patch, to ensure the fix gets
picked up. I would also suggest changing the text to not mention
nios2 specifically but just say that it affects "all 32-bit kernels".

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ