projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f68ba0
)
Bluetooth: RFCOMM - Fix info leak in getsockopt(BT_SECURITY)
author
Mathias Krause
<
[email protected]
>
Wed, 15 Aug 2012 11:31:48 +0000
(11:31 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 16 Aug 2012 04:36:30 +0000
(21:36 -0700)
The RFCOMM code fails to initialize the key_size member of struct
bt_security before copying it to userland -- that for leaking one
byte kernel stack. Initialize key_size with 0 to avoid the info
leak.
Signed-off-by: Mathias Krause <
[email protected]
>
Cc: Marcel Holtmann <
[email protected]
>
Cc: Gustavo Padovan <
[email protected]
>
Cc: Johan Hedberg <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/bluetooth/rfcomm/sock.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/rfcomm/sock.c
b/net/bluetooth/rfcomm/sock.c
index 7e1e59645c056f71400ad9ed4dc0444548c41951..64f55ca614722f1d3933a7d00239c7d4bee8efa3 100644
(file)
--- a/
net/bluetooth/rfcomm/sock.c
+++ b/
net/bluetooth/rfcomm/sock.c
@@
-822,6
+822,7
@@
static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c
}
sec.level = rfcomm_pi(sk)->sec_level;
+ sec.key_size = 0;
len = min_t(unsigned int, len, sizeof(sec));
if (copy_to_user(optval, (char *) &sec, len))