]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix potential bad memory access with sysfs files
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Mar 2010 21:12:58 +0000 (14:12 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 21 Mar 2010 04:49:32 +0000 (05:49 +0100)
commita4de7fbb7ca9ce3465aff27275ba8720d8957a90
tree5b4254a64db65f1958a36ec6955dbba1b71031a7
parent1b8cf6215a5d81a6dc4bf703ce304567641982c1
Bluetooth: Fix potential bad memory access with sysfs files

When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.

Based on initial patches from Neil Brown and Linus Torvalds

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c