]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix NULL pointer dereference in smp_conn_security
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 20 Jul 2015 17:31:25 +0000 (20:31 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 23 Jul 2015 14:41:24 +0000 (16:41 +0200)
commit605abadc365cad9dab6dc06bc56a52398f2e9a15
treec8b2d2203008ca2a55d261b0e9bdcb645a38f66a
parent2c63b5e2e6b744aa837f7e62a7134250e523d3c2
Bluetooth: Fix NULL pointer dereference in smp_conn_security

The l2cap_conn->smp pointer may be NULL for various valid reasons where SMP has
failed to initialize properly. One such scenario is when crypto support is
missing, another when the adapter has been powered on through a legacy method.
The smp_conn_security() function should have the appropriate check for this
situation to avoid NULL pointer dereferences.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 4.0+
net/bluetooth/smp.c