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] [day] [month] [year] [list]
Message-ID: <20250703151226.GW31241@suse.cz>
Date: Thu, 3 Jul 2025 17:12:26 +0200
From: David Sterba <dsterba@...e.cz>
To: Brahmajit Das <listout@...tout.xyz>
Cc: Nathan Chancellor <nathan@...nel.org>, linux-hardening@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org,
	clm@...com, josef@...icpanda.com, dsterba@...e.com, kees@...nel.org,
	ailiop@...e.com, mark@...mstone.com, Brahmajit Das <bdas@...e.de>
Subject: Re: [PATCH v4] btrfs: replace deprecated strcpy with strscpy

On Thu, Jul 03, 2025 at 06:08:24AM +0530, Brahmajit Das wrote:
> On 02.07.2025 11:27, Nathan Chancellor wrote:
> > Hi Brahmajit,
> > 
> > On Fri, Jun 20, 2025 at 10:19:57PM +0530, Brahmajit Das wrote:
> ...
> > 
> > This change is now in -next as commit d282edfe8850 ("btrfs: replace
> > strcpy() with strscpy()"), where this hunk appears to causes a slew of
> > warnings on my arm64 systems along the lines of:
> > 
> ...
> > 
> > It looks like the offset_in_page(buf) part of the WARN() in
> > sysfs_emit() gets triggered with this, presumably because kmalloc()
> > returns something that is not page aligned like sysfs_emit() requires?
>
> Nathan, can you help me with providing a bit more info to debug this. I
> set up qemu aarch64 env with btrfs but couldn't reproduce this issue by
> boot test. Basically trying to understand what workflow triggered this.
> 
> You can find my kernel config, dmesg log and boot logs here:
> https://gist.github.com/listout/de8b6efa6ddb02805b5886f35c3f73d4

sysfs_emit() is wrapper for scnprintf with implicit buffer length, so
we can use that instead. I'll fix it in for-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ