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] [day] [month] [year] [list]
Message-ID: <36c6c8f3-d7fb-42b8-bafe-4eae9b02f4ec@bareminimum.eu>
Date: Sat, 22 Mar 2025 11:15:19 +0100
From: Johannes Kimmel <kernel@...eminimum.eu>
To: dsterba@...e.cz
Cc: linux-btrfs@...r.kernel.org, clm@...com, josef@...icpanda.com,
 dsterba@...e.com, linux-kernel@...r.kernel.org,
 Calvin Walton <calvin.walton@...stin.ca>
Subject: Re: [PATCH] btrfs: correctly escape subvol in btrfs_show_options

On 20.03.25 00:52, David Sterba wrote:
> On Wed, Mar 19, 2025 at 10:49:00PM +0100, Johannes Kimmel wrote:
>> Currently, displaying the btrfs subvol mount option doesn't escape `,`.
>> This makes parsing /proc/self/mounts and /proc/self/mountinfo
>> ambigious for subvolume names that contain commas. The text after the
>> comma could be mistaken for another option (think "subvol=foo,ro", where
>> ro is actually part of the subvolumes name).
> 
> The subvol= option was intentionally last so the path does not mix with
> other options but yeah it still can be confused if it's parsed in a
> generic way and not assuming anything about the ordering.
> 
> I've checked util-linux/libmount, seems that it understands the "\," as
> part of the option value so it should not break anything.
> 
>> This patch replaces the manual escape characters list with a call to
>> seq_show_option. Thanks to Calvin Walton for suggesting this approach.
>>
>> Fixes: c8d3fe028f64 ("Btrfs: show subvol= and subvolid= in /proc/mounts")
>> Suggested-by: Calvin Walton <calvin.walton@...stin.ca>
>> Signed-off-by: Johannes Kimmel <kernel@...eminimum.eu>
> 
> Added to for-next, thanks.

Thank you for taking care of this so quickly.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ