Unverified Commit 88a24894 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15012 Bluetooth: L2CAP: fix CVE-2024-56605

Merge Pull Request from: @ci-robot 
 
PR sync from: Lin Ruifeng <linruifeng4@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/HT7PV65NN4NQVFCRECRF3N2VJ265KZ2G/ 
Bluetooth: L2CAP: fix CVE-2024-56605

Fedor Pchelkin (1):
  Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc

Ignat Korchagin (1):
  Bluetooth: L2CAP: do not leave dangling sk pointer on error in
    l2cap_sock_create()


-- 
2.22.0
 
https://gitee.com/src-openeuler/kernel/issues/IBEANO 
 
Link:https://gitee.com/openeuler/kernel/pulls/15012

 

Reviewed-by: default avatarLiu YongQiang <liuyongqiang13@huawei.com>
Reviewed-by: default avatarYuan Can <yuancan@huawei.com>
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
parents 45002b04 a85c8623
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1629,6 +1629,8 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
	chan = l2cap_chan_create();
	chan = l2cap_chan_create();
	if (!chan) {
	if (!chan) {
		sk_free(sk);
		sk_free(sk);
		if (sock)
			sock->sk = NULL;
		return NULL;
		return NULL;
	}
	}