Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Richard Weinberger
- Ursprüngliche Mail - >>Fix this by using strncpy() instead of strlcpy(). The superblock >>field is defined to be a fixed-size char array, and it is already >>marked using __nonstring in fs/ext4/ext4.h. The consumer of the field >>in e2fsprogs already assumes that in the

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Andreas Dilger
On Dec 17, 2020, at 11:27 AM, Theodore Y. Ts'o wrote: > > On Tue, Dec 01, 2020 at 04:13:01PM +0100, Richard Weinberger wrote: >> As soon the first file is opened, ext4 samples the mountpoint >> of the filesystem in 64 bytes of the super block. >> It does so using strlcpy(), this means that the

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Theodore Y. Ts'o
On Tue, Dec 01, 2020 at 04:13:01PM +0100, Richard Weinberger wrote: > As soon the first file is opened, ext4 samples the mountpoint > of the filesystem in 64 bytes of the super block. > It does so using strlcpy(), this means that the remaining bytes > in the super block string buffer are

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-09 Thread harshad shirwadkar
Thanks for the patch Richard, it looks good to me. Reviewed-by: Harshad Shirwadkar On Tue, Dec 1, 2020 at 7:29 AM Richard Weinberger wrote: > > As soon the first file is opened, ext4 samples the mountpoint > of the filesystem in 64 bytes of the super block. > It does so using strlcpy(), this

[PATCH] ext4: Don't leak old mountpoint samples

2020-12-01 Thread Richard Weinberger
As soon the first file is opened, ext4 samples the mountpoint of the filesystem in 64 bytes of the super block. It does so using strlcpy(), this means that the remaining bytes in the super block string buffer are untouched. If the mount point before had a longer path than the current one, it can