From: Harish Jenny K N <hidden> Date: 2015-03-19 08:20:00
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 5 +++++
1 file changed, 5 insertions(+)
From: Johan Hedberg <hidden> Date: 2015-03-19 08:25:39
Hi,
On Thu, Mar 19, 2015, Harish Jenny K N wrote:
quoted hunk
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 5 +++++
1 file changed, 5 insertions(+)
Looks quite ok to me, except for a minor issue: we generally don't use
{} for single-line branches.
Do you have some simple way to reproduce this? It'd be nice if we could
add a test case for it to our user space l2cap-tester tool.
Johan
On Thursday 19 March 2015 01:55 PM, Johan Hedberg wrote:
Hi,
On Thu, Mar 19, 2015, Harish Jenny K N wrote:
quoted
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 5 +++++
1 file changed, 5 insertions(+)
Looks quite ok to me, except for a minor issue: we generally don't use
{} for single-line branches.
Do you have some simple way to reproduce this? It'd be nice if we could
add a test case for it to our user space l2cap-tester tool.
Johan
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 4 ++++
1 file changed, 4 insertions(+)
On Thursday 19 March 2015 01:55 PM, Johan Hedberg wrote:
Hi,
On Thu, Mar 19, 2015, Harish Jenny K N wrote:
quoted
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 5 +++++
1 file changed, 5 insertions(+)
Looks quite ok to me, except for a minor issue: we generally don't use
{} for single-line branches.
Do you have some simple way to reproduce this? It'd be nice if we could
add a test case for it to our user space l2cap-tester tool.
Johan
Unfortunately no. The crash happened only once in automated test set-up.
Have given only the proposed solution based on the code flow.
Please check from protocol perspective if this patch is correct and useful.
From: Sergei Shtylyov <hidden> Date: 2015-03-19 14:59:22
Hello.
On 3/19/2015 11:19 AM, Harish Jenny K N wrote:
There is a potential use after free in bt_sock_poll when a
socket gets killed without getting unlinked from accept_q.
Hence added code to unlink from accpept_q by calling teardown
before freeing the socket for channel type L2CAP_CHAN_CONN_ORIENTED.
Signed-off-by: Harish Jenny K N <redacted>
---
net/bluetooth/l2cap_core.c | 5 +++++
1 file changed, 5 insertions(+)