]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/bluetooth/l2cap_sock.c
bluetooth: Properly clone LSM attributes to newly created child connections
[mirror_ubuntu-jammy-kernel.git] / net / bluetooth / l2cap_sock.c
index 61f1f623091dbcd89992a64a635fc8de62963795..e8292369cdcf68981b4a59969b2c4af41b703f90 100644 (file)
@@ -26,6 +26,8 @@
 
 /* Bluetooth L2CAP sockets. */
 
+#include <linux/security.h>
+
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/l2cap.h>
@@ -933,6 +935,8 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
                chan->force_reliable = pchan->force_reliable;
                chan->flushable = pchan->flushable;
                chan->force_active = pchan->force_active;
+
+               security_sk_clone(parent, sk);
        } else {
 
                switch (sk->sk_type) {