Re: [f2fs-dev] [PATCH] f2fs: fix information leak in f2fs_move_inline_dirents()

2023-01-25 Thread Alexander Potapenko via Linux-f2fs-devel
> > Out of curiosity, did you add any extra annotations to detect uninit > > writes to the disk? > > No. This is the report I got: > > [ 145.280969] = > [ 145.285368] BUG: KMSAN: uninit-value in virtqueue_add+0x1ba5/0x6ac0 Oh cool, nice to

Re: [f2fs-dev] [PATCH 4/5] fs: hfs: initialize fsdata in hfs_file_truncate()

2023-01-25 Thread Alexander Potapenko via Linux-f2fs-devel
On Tue, Jan 24, 2023 at 10:04 PM Andrew Morton wrote: > > On Tue, 24 Jan 2023 11:51:30 +0100 Alexander Potapenko > wrote: > > > On Mon, Nov 21, 2022 at 12:21 PM Alexander Potapenko > > wrote: > > > > > > When aops->write_begin() does not initialize fsdata, KMSAN may report > > > an error

Re: [f2fs-dev] [PATCH 4/5] fs: hfs: initialize fsdata in hfs_file_truncate()

2023-01-24 Thread Alexander Potapenko via Linux-f2fs-devel
On Mon, Nov 21, 2022 at 12:21 PM Alexander Potapenko wrote: > > When aops->write_begin() does not initialize fsdata, KMSAN may report > an error passing the latter to aops->write_end(). > > Fix this by unconditionally initializing fsdata. > > Suggested-by: Eric Biggers > Fixes: 1da177e4c3f4

Re: [f2fs-dev] [PATCH] f2fs: fix information leak in f2fs_move_inline_dirents()

2023-01-23 Thread Alexander Potapenko via Linux-f2fs-devel
On Mon, Jan 23, 2023 at 8:05 AM Eric Biggers wrote: > > From: Eric Biggers > > When converting an inline directory to a regular one, f2fs is leaking > uninitialized memory to disk because it doesn't initialize the entire > directory block. Fix this by zero-initializing the block. > > This bug

Re: [f2fs-dev] [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate()

2023-01-10 Thread Alexander Potapenko via Linux-f2fs-devel
On Tue, Nov 22, 2022 at 3:56 PM David Sterba wrote: > > On Mon, Nov 21, 2022 at 12:21:31PM +0100, Alexander Potapenko wrote: > > When aops->write_begin() does not initialize fsdata, KMSAN may report > > an error passing the latter to aops->write_end(). > > > > Fix this by unconditionally

Re: [f2fs-dev] [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate()

2022-11-22 Thread Alexander Potapenko via Linux-f2fs-devel
On Mon, Nov 21, 2022 at 8:46 PM Eric Biggers wrote: > > On Mon, Nov 21, 2022 at 12:21:31PM +0100, Alexander Potapenko wrote: > > When aops->write_begin() does not initialize fsdata, KMSAN may report > > an error passing the latter to aops->write_end(). > > > > Fix this by unconditionally

[f2fs-dev] [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN reports an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Cc: Eric Biggers Fixes: c93d8f885809 ("ext4: add basic fs-verity support") Reported-by:

[f2fs-dev] [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko --- fs/affs/file.c |

[f2fs-dev] [PATCH 5/5] fs: hfsplus: initialize fsdata in hfsplus_file_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko ---

[f2fs-dev] [PATCH 4/5] fs: hfs: initialize fsdata in hfs_file_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko --- fs/hfs/extent.c |

[f2fs-dev] [PATCH 3/5] fs: f2fs: initialize fsdata in pagecache_write()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 95ae251fe828 ("f2fs: add fs-verity support") Signed-off-by: Alexander Potapenko ---