[f2fs-dev] [PATCH] mkfs.f2fs: Fix out-of-bounds read in f2fs_prepare_super_block

2024-07-26 Thread Peter Collingbourne via Linux-f2fs-devel
The path field in c.devices[i] is a pointer and is normally filled in using strdup. This makes it invalid to copy MAX_PATH_LEN bytes from it because the string may be shorter than that. Therefore, fix the code to use strncpy to copy the string instead. Signed-off-by: Peter Collingbourne --- mkfs

Re: [f2fs-dev] [PATCH 10/31] Verify structure sizes at compile time

2022-06-09 Thread Peter Collingbourne via Linux-f2fs-devel
Hi Bart, On Thu, Apr 21, 2022 at 03:18:15PM -0700, Bart Van Assche wrote: > +static_assert(sizeof(struct f2fs_dentry_block) == 4096, ""); I noticed that this static_assert fails when PAGE_SIZE is defined to a value other than 4096. I have to admit to being unfamiliar with f2fs. Is this an on-dis

Re: [f2fs-dev] [PATCH v2 1/5] Fix the struct f2fs_dentry_block definition

2022-06-23 Thread Peter Collingbourne via Linux-f2fs-devel
On Thu, Jun 23, 2022 at 11:12 AM Bart Van Assche wrote: > > Fix the struct f2fs_dentry_block definition on systems for which > PAGE_SIZE != 4096. This patch does not change the struct f2fs_dentry_block > definition if PAGE_SIZE == 4096. > > Cc: Peter Collingbourne > Reported-by: Peter Collingbour