From: <gregkh@linuxfoundation.org>
To: john.fastabend@gmail.com, davem@davemloft.net,
gregkh@linuxfoundation.org, john.r.fastabend@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "net: pktgen: fix null ptr deref in skb allocation" has been added to the 4.3-stable tree
Date: Tue, 26 Jan 2016 22:29:16 -0800 [thread overview]
Message-ID: <1453876156150203@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
net: pktgen: fix null ptr deref in skb allocation
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-pktgen-fix-null-ptr-deref-in-skb-allocation.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Tue Jan 26 21:35:03 PST 2016
From: John Fastabend <john.fastabend@gmail.com>
Date: Sun, 10 Jan 2016 21:38:44 -0800
Subject: net: pktgen: fix null ptr deref in skb allocation
From: John Fastabend <john.fastabend@gmail.com>
[ Upstream commit 3de03596dfeee48bc803c1d1a6daf60a459929f3 ]
Fix possible null pointer dereference that may occur when calling
skb_reserve() on a null skb.
Fixes: 879c7220e82 ("net: pktgen: Observe needed_headroom of the device")
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/pktgen.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2787,7 +2787,9 @@ static struct sk_buff *pktgen_alloc_skb(
} else {
skb = __netdev_alloc_skb(dev, size, GFP_NOWAIT);
}
- skb_reserve(skb, LL_RESERVED_SPACE(dev));
+
+ if (likely(skb))
+ skb_reserve(skb, LL_RESERVED_SPACE(dev));
return skb;
}
Patches currently in stable-queue which might be from john.fastabend@gmail.com are
queue-4.3/net-sched-fix-missing-free-per-cpu-on-qstats.patch
queue-4.3/net-pktgen-fix-null-ptr-deref-in-skb-allocation.patch
reply other threads:[~2016-01-27 6:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1453876156150203@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=john.r.fastabend@intel.com \
--cc=stable-commits@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).