public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2)
       [not found] <CAHpthZojFipy1QVY=61vbBD6s6QdJdoNmQdTo90a=JixHA-V5g@mail.gmail.com>
@ 2024-02-17 14:43 ` syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2024-02-17 14:43 UTC (permalink / raw)
  To: ryasuoka; +Cc: ryasuoka, syzkaller-bugs, linux-kernel

> #syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

want either no args or 2 args (repo, branch), got 1

> 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	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-17 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAHpthZojFipy1QVY=61vbBD6s6QdJdoNmQdTo90a=JixHA-V5g@mail.gmail.com>
2024-02-17 14:43 ` [PATCH] net: Fix kernel-infoleak in __skb_datagram_iter (2) syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox