lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000f7a62d0611683d4e@google.com>
Date: Thu, 15 Feb 2024 01:27:54 -0800
From: syzbot <syzbot+34ad5fab48f7bf510349@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
Author: ryasuoka@...hat.com

#syz test

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 27998f73183e..c7bf1c38b292 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2532,6 +2532,11 @@ static inline unsigned char
*skb_tail_pointer(const struct sk_buff *skb)
        return skb->head + skb->tail;
 }

+static inline unsigned int skb_tail_offset(const struct sk_buff *skb)
+{
+       return skb->tail;
+}
+
 static inline void skb_reset_tail_pointer(struct sk_buff *skb)
 {
        skb->tail = skb->data - skb->head;
@@ -2549,6 +2554,11 @@ static inline unsigned char
*skb_tail_pointer(const struct sk_buff *skb)
        return skb->tail;
 }

+static inline unsigned int skb_tail_offset(const struct sk_buff *skb)
+{
+       return skb->tail - skb->head;
+}
+
 static inline void skb_reset_tail_pointer(struct sk_buff *skb)
 {
        skb->tail = skb->data;
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index eb086b06d60d..f11bb308f1ed 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -167,7 +167,7 @@ static inline u32 netlink_group_mask(u32 group)
 static struct sk_buff *netlink_to_full_skb(const struct sk_buff *skb,
                                           gfp_t gfp_mask)
 {
-       unsigned int len = skb_end_offset(skb);
+       unsigned int len = skb_tail_offset(skb);
        struct sk_buff *new;

        new = alloc_skb(len, gfp_mask);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ