Re: [PATCH] ext4: Reject on-disk mount options with missing NUL-terminator

From: Kees Cook

Date: Tue Feb 10 2026 - 20:51:26 EST


On Tue, Feb 10, 2026 at 12:03:35PM +0300, Fedor Pchelkin wrote:
> If I understand the issue correctly, it's already being rejected with the
> existing check:
>
> if (strscpy_pad(s_mount_opts, sbi->s_es->s_mount_opts) < 0)
> return -E2BIG;
>
> If the source string is truncated at least by one symbol (which is the
> case for unterminated string), strscpy_pad() returns -E2BIG and the mount
> fails.

Agreed. Sorry for the noise! Things appear to be fine as-is. I had
missed the version tested in the original report.

--
Kees Cook