lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABBYNZ+BwrGdL0HYh3cmQ39RFwEqjzreJSyYhFkkhSWxeoorNg@mail.gmail.com>
Date: Thu, 3 Oct 2024 12:54:13 -0400
From: Luiz Augusto von Dentz <luiz.dentz@...il.com>
To: Qianqiang Liu <qianqiang.liu@....com>
Cc: syzbot <syzbot+03d6270b6425df1605bf@...kaller.appspotmail.com>, 
	johan.hedberg@...il.com, linux-bluetooth@...r.kernel.org, 
	linux-kernel@...r.kernel.org, marcel@...tmann.org, 
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in set_powered_sync

Hi Qianqiang,

On Thu, Oct 3, 2024 at 12:46 PM Qianqiang Liu <qianqiang.liu@....com> wrote:
>
> #syz test
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index 5533e6f561b3..20d0793d3832 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -325,9 +325,11 @@ static void hci_cmd_sync_work(struct work_struct *work)
>                         int err;
>
>                         hci_req_sync_lock(hdev);
> -                       err = entry->func(hdev, entry->data);
> -                       if (entry->destroy)
> -                               entry->destroy(hdev, entry->data, err);
> +                       if (entry->data) {
> +                               err = entry->func(hdev, entry->data);
> +                               if (entry->destroy)
> +                                       entry->destroy(hdev, entry->data, err);
> +                       }
>                         hci_req_sync_unlock(hdev);
>                 }
>
> diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c
> index 0115f783bde8..eccc51bfaf2e 100644
> --- a/net/bluetooth/mgmt_util.c
> +++ b/net/bluetooth/mgmt_util.c
> @@ -307,6 +307,7 @@ void mgmt_pending_free(struct mgmt_pending_cmd *cmd)
>         sock_put(cmd->sk);
>         kfree(cmd->param);
>         kfree(cmd);
> +       cmd = NULL;
>  }
>
>  void mgmt_pending_remove(struct mgmt_pending_cmd *cmd)
>
> --
> Best,
> Qianqiang Liu

Are you sure this hasn't been already fixed by Bluetooth: MGMT: Fix
possible crash on mgmt_index_removed?

-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ