]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: Fix possible NULL ptr deref when getting the name of a socket
authorSasha Levin <levinsasha928@gmail.com>
Wed, 6 Jun 2012 21:02:55 +0000 (23:02 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Jun 2012 17:47:07 +0000 (13:47 -0400)
commitf89a118e9e1bb20e5ffcb0e07a5b892dc182bbac
tree6221c2536b5283fadc7f64bd3e2ae57dfa50dfbc
parentb312b150d12e3c36dfa1851d396acb44014c47cb
NFC: Fix possible NULL ptr deref when getting the name of a socket

llcp_sock_getname() might get called before the LLCP socket was created.
This condition isn't checked, and llcp_sock_getname will simply deref a
NULL ptr in that case.

This exists starting with 60692a4 ("NFC: Initial LLCP support").

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/nfc/llcp/sock.c