]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
NFC: pn533: fix use-after-free and memleaks
authorJohan Hovold <johan@kernel.org>
Mon, 7 Oct 2019 16:40:59 +0000 (18:40 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 13 Nov 2019 23:47:34 +0000 (18:47 -0500)
commit6d3a33eeb2d5f4a382c804872841bc6453f91eb3
tree2ce6691e305c5feef8de74b21daf961e64b94a1e
parentd7c957e3d3e2a1b08d9fb3a9fe1591946ed5147c
NFC: pn533: fix use-after-free and memleaks

BugLink: https://bugs.launchpad.net/bugs/1852492
commit 6af3aa57a0984e061f61308fe181a9a12359fecc upstream.

The driver would fail to deregister and its class device and free
related resources on late probe errors.

Reported-by: syzbot+cb035c75c03dbe34b796@syzkaller.appspotmail.com
Fixes: 32ecc75ded72 ("NFC: pn533: change order operations in dev registation")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nfc/pn533/usb.c