mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Joas Antonio dos Santos <joasantonio108@gmail.com>,
	netdev@vger.kernel.org, osmocom-net-gprs@lists.osmocom.org,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Harald Welte <laforge@gnumonks.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Paolo Abeni <pabeni@redhat.com>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] gtp: free the skb after handling an echo response
Date: Tue, 10 Nov 2026 14:08:33 +0100	[thread overview]
Message-ID: <265240b9-c9d9-4dcf-aea3-b31c460a0e3a@web.de> (raw)
In-Reply-To: <20261110-gtp-echo-rsp-leak-v1-1-192c032f3dfa@gmail.com>

…
> +++ b/drivers/net/gtp.c
> @@ -561,16 +561,19 @@ static int gtp0_handle_echo_resp(struct gtp_dev *gtp, struct sk_buff *skb)
…
> -	return genlmsg_multicast_netns(&gtp_genl_family, dev_net(gtp->dev),
> -				       msg, 0, GTP_GENL_MCGRP, GFP_ATOMIC);
> +	genlmsg_multicast_netns(&gtp_genl_family, dev_net(gtp->dev),
> +				msg, 0, GTP_GENL_MCGRP, GFP_ATOMIC);
> +	consume_skb(skb);
> +
> +	return 0;
>  }
…

I suggest to reconsider the error detection a bit more.
https://elixir.bootlin.com/linux/v7.3.1/source/drivers/net/gtp.c#L541-L573
https://cwe.mitre.org/data/definitions/252.html

Regards,
Markus

      reply	other threads:[~2026-11-10 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  9:03 Joas Antonio dos Santos via B4 Relay
2026-11-10 13:08 ` Markus Elfring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=265240b9-c9d9-4dcf-aea3-b31c460a0e3a@web.de \
    --to=markus.elfring@web.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=joasantonio108@gmail.com \
    --cc=kuba@kernel.org \
    --cc=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=osmocom-net-gprs@lists.osmocom.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®