[Toybox] [PATCH] cpio: fix misaligned header if readlink() returns unexpected value
Rob Landley
rob at landley.net
Sat Feb 13 13:59:28 PST 2021
On 2/13/21 1:35 AM, Yi-yo Chiang wrote:
> Just found out this block of text from fscrypt manual
> (https://elixir.bootlin.com/linux/v5.11-rc7/source/Documentation/filesystems/fscrypt.rst#L1066):
>
>> The st_size of an encrypted symlink will not necessarily give the
>> length of the symlink target as required by POSIX. It will actually
>> give the length of the ciphertext, which will be slightly longer
>> than the plaintext due to NUL-padding and an extra 2-byte overhead.
>
> Looks like this is intentional :(
Oh it was pretty clear it was intentional. Still wrong though.
Rob
More information about the Toybox
mailing list