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: <56196c13-954f-4185-a17b-d52e337cb4f8@linux.alibaba.com>
Date: Wed, 7 May 2025 17:56:57 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Hongbo Li <lihongbo22@...wei.com>, xiang@...nel.org, chao@...nel.org,
 huyue2@...lpad.com, jefflexu@...ux.alibaba.com
Cc: linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] erofs: fix file handle encoding for 64-bit NIDs



On 2025/5/7 17:40, Hongbo Li wrote:
> EROFS uses NID to indicate the on-disk inode offset, which can
> exceed 32 bits. However, the default encode_fh uses the ino32,
> thus it doesn't work if the image is larger than 128GiB.
> 
> Let's introduce our own helpers to encode file handles.
> 
> It's easy to reproduce:
>    1. prepare an erofs image with nid bigger than U32_MAX
>    2. mount -t erofs foo.img /mnt/erofs
>    3. set exportfs with configuration: /mnt/erofs *(rw,sync,
>       no_root_squash)
>    4. mount -t nfs $IP:/mnt/erofs /mnt/nfs
>    5. md5sum /mnt/nfs/foo # foo is the file which nid bigger
>       than U32_MAX.  # you will get ESTALE error.
> 
> In the case of overlayfs, the underlying filesystem's file
> handle is encoded in ovl_fb.fid, which is similar to NFS's
> case. If the NID of file is larger than U32_MAX, the overlay
> will get -ESTALE error when calls exportfs_decode_fh.
> 
> Fixes: 3e917cc305c6 ("erofs: make filesystem exportable")
> Signed-off-by: Hongbo Li <lihongbo22@...wei.com>

Reviewed-by: Gao Xiang <hsiangkao@...ux.alibaba.com>

Thanks,
Gao Xiang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ