[Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-29 Thread Anmol Karn
AMP_MGR is getting derefernced in hci_phy_link_complete_evt(), when called from hci_event_packet() and there is a possibility, that hcon->amp_mgr may not be found when accessing after initialization of hcon. - net/bluetooth/hci_event.c:4945 The bug seems to get triggered in this line:

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-14 Thread Anmol Karn
Hello Sir, > > I have looked into the Bisected logs and the problem occurs from this > > commit: > > > > 941992d29447 ("ethernet: amd: use IS_ENABLED() instead of checking for > > built-in or module") > > > > That's just the patch which made the code testable by syzbot. It didn't >

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-14 Thread Dan Carpenter
On Sat, Sep 12, 2020 at 02:40:28PM +0530, Anmol Karn wrote: > On Thu, Sep 10, 2020 at 01:49:18PM +0300, Dan Carpenter wrote: > > On Thu, Sep 10, 2020 at 10:04:24AM +0530, Anmol Karn wrote: > > > Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' > > > as NULL. Fix it by adding

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-12 Thread Anmol Karn
On Thu, Sep 10, 2020 at 01:49:18PM +0300, Dan Carpenter wrote: > On Thu, Sep 10, 2020 at 10:04:24AM +0530, Anmol Karn wrote: > > Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' > > as NULL. Fix it by adding pointer check for it. > > > > Reported-and-tested-by: > >

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-10 Thread Anmol Karn
On Thu, Sep 10, 2020 at 01:49:18PM +0300, Dan Carpenter wrote: > On Thu, Sep 10, 2020 at 10:04:24AM +0530, Anmol Karn wrote: > > Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' > > as NULL. Fix it by adding pointer check for it. > > > > Reported-and-tested-by: > >

Re: [Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-10 Thread Dan Carpenter
On Thu, Sep 10, 2020 at 10:04:24AM +0530, Anmol Karn wrote: > Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' > as NULL. Fix it by adding pointer check for it. > > Reported-and-tested-by: syzbot+0bef568258653cff2...@syzkaller.appspotmail.com > Link:

[Linux-kernel-mentees] [PATCH] net: bluetooth: Fix null pointer dereference in hci_event_packet()

2020-09-09 Thread Anmol Karn
Prevent hci_phy_link_complete_evt() from dereferencing 'hcon->amp_mgr' as NULL. Fix it by adding pointer check for it. Reported-and-tested-by: syzbot+0bef568258653cff2...@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=0bef568258653cff272f Signed-off-by: Anmol Karn ---