Re: [PATCH v2] bcachefs: fix null-ptr-deref in have_stripes()

2024-10-25 Thread Kent Overstreet
On Sat, Oct 26, 2024 at 01:05:50AM +0800, Alan Huang wrote: > On Oct 26, 2024, at 00:54, Kent Overstreet wrote: > > > > On Fri, Oct 25, 2024 at 08:56:18PM +0900, Jeongjun Park wrote: > >> c->btree_roots_known[i].b can be NULL. In this case, a NULL pointer > >> dereference > >> occurs, so you nee

Re: [PATCH v2] bcachefs: fix null-ptr-deref in have_stripes()

2024-10-25 Thread Alan Huang
On Oct 26, 2024, at 00:54, Kent Overstreet wrote: > > On Fri, Oct 25, 2024 at 08:56:18PM +0900, Jeongjun Park wrote: >> c->btree_roots_known[i].b can be NULL. In this case, a NULL pointer >> dereference >> occurs, so you need to add code to check the variable. >> >> Reported-by: syzbot+b468b9fe

Re: [PATCH v2] bcachefs: fix null-ptr-deref in have_stripes()

2024-10-25 Thread Kent Overstreet
On Fri, Oct 25, 2024 at 08:56:18PM +0900, Jeongjun Park wrote: > c->btree_roots_known[i].b can be NULL. In this case, a NULL pointer > dereference > occurs, so you need to add code to check the variable. > > Reported-by: syzbot+b468b9fef56949c3b...@syzkaller.appspotmail.com > Fixes: 7773df19c35f

[PATCH v2] bcachefs: fix null-ptr-deref in have_stripes()

2024-10-25 Thread Jeongjun Park
c->btree_roots_known[i].b can be NULL. In this case, a NULL pointer dereference occurs, so you need to add code to check the variable. Reported-by: syzbot+b468b9fef56949c3b...@syzkaller.appspotmail.com Fixes: 7773df19c35f ("bcachefs: metadata version bucket_stripe_sectors") Signed-off-by: Jeongjun