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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60b8a0da-7f82-41dc-9746-657d89e88b69@kernel.org>
Date: Sun, 21 Dec 2025 10:01:03 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Li Wang <liwang@...hat.com>, akpm@...ux-foundation.org,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org
Cc: Mark Brown <broonie@...nel.org>, Shuah Khan <shuah@...nel.org>,
 Waiman Long <longman@...hat.com>
Subject: Re: [PATCH v2 1/3] selftests/mm/write_to_hugetlbfs: parse -s as
 size_t

On 12/21/25 09:58, Li Wang wrote:
> write_to_hugetlbfs currently parses the -s size argument with atoi()
> into an int. This silently accepts malformed input, cannot report overflow,
> and can truncate large sizes.
> 
> --- Error log ---
>   # uname -r
>   6.12.0-xxx.el10.aarch64+64k
> 
>   # ls /sys/kernel/mm/hugepages/hugepages-*
>   hugepages-16777216kB/  hugepages-2048kB/  hugepages-524288kB/
> 
>   #./charge_reserved_hugetlb.sh -cgroup-v2
>   # -----------------------------------------
>   ...
>   # nr hugepages = 10
>   # writing cgroup limit: 5368709120
>   # writing reseravation limit: 5368709120
>   ...
>   # Writing to this path: /mnt/huge/test
>   # Writing this size: -1610612736        <--------


I mean, whoever does that should not expect anything reasonable to 
happen with these selftests ... so I don't think Fixes: should be added.

Acked-by: David Hildenbrand (Red Hat) <david@...nel.org>

-- 
Cheers

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ