* Re: [syzbot] [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
@ 2024-02-15 9:27 ` syzbot
2024-02-17 12:40 ` [syzbot] " syzbot
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-15 9:27 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
Author: ryasuoka@redhat.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);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] Re: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
2024-02-15 9:27 ` [syzbot] [PATCH] net: Fix " syzbot
@ 2024-02-17 12:40 ` syzbot
2024-02-17 14:51 ` syzbot
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-17 12:40 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
Author: ryasuoka@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2dde34c29203..540df9a6a9b3 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2542,6 +2542,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;
@@ -2559,6 +2564,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 9c962347cf85..d1b8e02c7e44 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);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] Re: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
2024-02-15 9:27 ` [syzbot] [PATCH] net: Fix " syzbot
2024-02-17 12:40 ` [syzbot] " syzbot
@ 2024-02-17 14:51 ` syzbot
2024-02-20 2:42 ` [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter() syzbot
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-17 14:51 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
Author: ryasuoka@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
9f8413c4a66f
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);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
` (2 preceding siblings ...)
2024-02-17 14:51 ` syzbot
@ 2024-02-20 2:42 ` syzbot
2024-02-20 4:49 ` syzbot
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-20 2:42 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
Author: ryasuoka@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5bd7ef53ffe5
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index eb086b06d60d..8277399d19b3 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->len;
struct sk_buff *new;
new = alloc_skb(len, gfp_mask);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
` (3 preceding siblings ...)
2024-02-20 2:42 ` [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter() syzbot
@ 2024-02-20 4:49 ` syzbot
2024-02-20 7:16 ` [syzbot] Test for 34ad5fab48f7bf510349 syzbot
2024-02-20 12:00 ` [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter() syzbot
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-20 4:49 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
Author: ryasuoka@redhat.com
#syz test
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 9c962347cf85..ff315351269f 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->len;
struct sk_buff *new;
new = alloc_skb(len, gfp_mask);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] Test for 34ad5fab48f7bf510349
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
` (4 preceding siblings ...)
2024-02-20 4:49 ` syzbot
@ 2024-02-20 7:16 ` syzbot
2024-02-20 12:00 ` [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter() syzbot
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-20 7:16 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Test for 34ad5fab48f7bf510349
Author: syoshida@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 9c962347cf85..c9ad41bce426 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -167,7 +167,8 @@ 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_end_offset(skb);
+ unsigned int len = skb->len;
struct sk_buff *new;
new = alloc_skb(len, gfp_mask);
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [syzbot] [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
2024-02-02 13:26 [syzbot] [net?] KMSAN: kernel-infoleak in __skb_datagram_iter (2) syzbot
` (5 preceding siblings ...)
2024-02-20 7:16 ` [syzbot] Test for 34ad5fab48f7bf510349 syzbot
@ 2024-02-20 12:00 ` syzbot
6 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2024-02-20 12:00 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH net] netlink: Fix kernel-infoleak in __skb_datagram_iter()
Author: ryasuoka@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index eb086b06d60d..8277399d19b3 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->len;
struct sk_buff *new;
new = alloc_skb(len, gfp_mask);
^ permalink raw reply related [flat|nested] 8+ messages in thread