]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
appletalk: Fix potential NULL pointer dereference in unregister_snap_client
authorYueHaibing <yuehaibing@huawei.com>
Thu, 14 Mar 2019 05:47:59 +0000 (13:47 +0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:30 +0000 (14:22 -0300)
commitecf1bef94d99b83c3152cfe2e6b91109a508ff59
treecbf3e082d11a1095dcce81cc4132062f990bb5bd
parent507759ca95aa78e598a6febbb98caf799134c87b
appletalk: Fix potential NULL pointer dereference in unregister_snap_client

BugLink: https://bugs.launchpad.net/bugs/1857158
commit 9804501fa1228048857910a6bf23e085aade37cc upstream.

register_snap_client may return NULL, all the callers
check it, but only print a warning. This will result in
NULL pointer dereference in unregister_snap_client and other
places.

It has always been used like this since v2.6

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to <4.15: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/atalk.h
net/appletalk/aarp.c
net/appletalk/ddp.c