Messages in this thread | | | From | Sungwoo Kim <> | Date | Sat, 27 Apr 2024 23:47:53 -0400 | Subject | Re: [PATCH] Bluetooth: msft: fix slab-use-after-free in msft_do_close() |
| |
Hello,
Could you not apply this? I found an error.
On Sat, Apr 27, 2024 at 1:19 AM Sungwoo Kim <iam@sung-woo.kim> wrote: > > + > +static struct msft_data *msft_data_hold_unless_zero(struct msft_data *msft) > +{ > + BT_DBG("msft %p orig refcnt %u", msft, kref_read(&msft->kref));
Here, msft could be NULL. &msft->kref causes a null-ptr-deref error. I already sent a v2 patch fixing this.
> + > + if (!msft) > + return NULL; > + > + if (!kref_get_unless_zero(&msft->kref)) > + return NULL; > + > + return msft; > +} > +
Thanks, Sungwoo.
| |