]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
uwb: hwa-rc: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:47:52 +0000 (13:47 +0100)
committerJiri Slaby <jslaby@suse.cz>
Fri, 7 Apr 2017 08:38:26 +0000 (10:38 +0200)
commit1fe7318745dda650279f960b0a36dd5376b5ca4b
treee4ff3be0dc999d3ab53b668d5f28340466526d0f
parentddb8485185c162279c36e393dbdef452bc0257b1
uwb: hwa-rc: fix NULL-deref at probe

commit daf229b15907fbfdb6ee183aac8ca428cb57e361 upstream.

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.

Note that the dereference happens in the start callback which is called
during probe.

Fixes: de520b8bd552 ("uwb: add HWA radio controller driver")
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/uwb/hwa-rc.c