Skip to content

Commit

Permalink
Bluetooth: hci_sync: fix double mgmt_pending_free() in remove_adv_mon…
Browse files Browse the repository at this point in the history
…itor()

syzbot is reporting double kfree() at remove_adv_monitor() [1], for
commit 7cf5c29 ("Bluetooth: hci_sync: Refactor remove Adv
Monitor") forgot to remove duplicated mgmt_pending_remove() when
merging "if (err) {" path and "if (!pending) {" path.

Link: https://syzkaller.appspot.com/bug?extid=915a8416bf15895b8e07 [1]
Reported-by: syzbot <syzbot+915a8416bf15895b8e07@syzkaller.appspotmail.com>
Fixes: 7cf5c29 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Tetsuo Handa authored and Luiz Augusto von Dentz committed Aug 25, 2022
1 parent 529d449 commit 029bde7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -5066,7 +5066,6 @@ static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
else
status = MGMT_STATUS_FAILED;

mgmt_pending_remove(cmd);
goto unlock;
}

Expand Down

0 comments on commit 029bde7

Please sign in to comment.