[Devel] [PATCH hci-8.1 2/2] ms/unicode: free the map after a grace period
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Nov 17 08:59:46 MSK 2026
> From: Christian Brauner <brauner at kernel.org>
>
> commit a96c5299bd7305eb984377681eb3222a57376405 upstream.
>
> generic_ci_d_hash() and generic_ci_d_compare() read sb->s_encoding and
> dereference the unicode map while a pathwalk in rcu mode holds nothing
> but rcu_read_lock(). The filesystems that use them, ext4, f2fs and
> tmpfs, drop the map with utf8_unload() from ->put_super(), which runs
> when the last reference to the mount goes away. A lookup that is still
> inside such a filesystem at that point reads a freed map.
>
> With a pathwalk held up in utf8_casefold_hash() while the last reference
> to a casefolded tmpfs goes away:
>
> BUG: KASAN: slab-use-after-free in utf8nlookup+0x74c/0x950
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155414
> Feature: fix ms/fs
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117055330.810827-1-eva.kurchatova@virtuozzo.com?part=2
More information about the Devel
mailing list