From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Remi Denis-Courmont <courmisch@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.4 47/67] phonet: properly unshare skbs in phonet_rcv()
Date: Wed, 27 Jan 2016 10:12:41 -0800 [thread overview]
Message-ID: <20160127180912.644680306@linuxfoundation.org> (raw)
In-Reply-To: <20160127180907.419868641@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 7aaed57c5c2890634cfadf725173c7c68ea4cb4f ]
Ivaylo Dimitrov reported a regression caused by commit 7866a621043f
("dev: add per net_device packet type chains").
skb->dev becomes NULL and we crash in __netif_receive_skb_core().
Before above commit, different kind of bugs or corruptions could happen
without major crash.
But the root cause is that phonet_rcv() can queue skb without checking
if skb is shared or not.
Many thanks to Ivaylo Dimitrov for his help, diagnosis and tests.
Reported-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Remi Denis-Courmont <courmisch@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/phonet/af_phonet.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -377,6 +377,10 @@ static int phonet_rcv(struct sk_buff *sk
struct sockaddr_pn sa;
u16 len;
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!skb)
+ return NET_RX_DROP;
+
/* check we have at least a full Phonet header */
if (!pskb_pull(skb, sizeof(struct phonethdr)))
goto out;
next prev parent reply other threads:[~2016-01-27 19:05 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 18:11 [PATCH 4.4 00/67] 4.4.1-stable review Greg Kroah-Hartman
2016-01-27 18:11 ` [PATCH 4.4 01/67] KEYS: Fix keyring ref leak in join_session_keyring() Greg Kroah-Hartman
2016-01-27 18:11 ` [PATCH 4.4 02/67] x86/xen: dont reset vcpu_info on a cancelled suspend Greg Kroah-Hartman
2016-01-27 18:11 ` [PATCH 4.4 03/67] KVM: x86: expose MSR_TSC_AUX to userspace Greg Kroah-Hartman
2016-01-27 18:11 ` [PATCH 4.4 04/67] KVM: x86: correctly print #AC in traces Greg Kroah-Hartman
2016-01-27 18:11 ` [PATCH 4.4 05/67] kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 06/67] x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 07/67] x86/boot: Double BOOT_HEAP_SIZE to 64KB Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 08/67] x86/mm: Add barriers and document switch_mm()-vs-flush synchronization Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 09/67] x86/mm: Improve switch_mm() barrier comments Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 10/67] ALSA: usb: Add native DSD support for Oppo HA-1 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 11/67] ALSA: hda - Fixup inverted internal mic for Lenovo E50-80 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 12/67] ALSA: seq: Fix missing NULL check at remove_events ioctl Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 13/67] ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 14/67] ALSA: seq: Fix race at timer setup and close Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 15/67] ALSA: hda - Fix white noise on Dell Latitude E5550 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 16/67] ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 17/67] ALSA: timer: Harden slave timer list handling Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 18/67] ALSA: hda - fix the headset mic detection problem for a Dell laptop Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 19/67] ALSA: timer: Fix race among timer ioctls Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 20/67] ALSA: timer: Fix double unlink of active_list Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 21/67] ALSA: hda - Add fixup for Dell Latitidue E6540 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 22/67] ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 23/67] ALSA: pcm: Fix snd_pcm_hw_params struct copy " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 24/67] ALSA: hrtimer: Fix stall by hrtimer_cancel() Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 25/67] ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 26/67] ALSA: hda - Fix bass pin fixup for ASUS N550JX Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 27/67] ALSA: hda - Fix missing module loading with model=generic option Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 28/67] ALSA: hda - Flush the pending probe work at remove Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 29/67] ALSA: timer: Handle disconnection more safely Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 30/67] ASoC: wm5110: Fix PGA clear when disabling DRE Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 31/67] ASoC: compress: Fix compress device direction check Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 32/67] rtlwifi: fix memory leak for USB device Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 33/67] USB: cp210x: add ID for ELV Marble Sound Board 1 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 34/67] usb: core: lpm: fix usb3_hardware_lpm sysfs node Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 35/67] xhci: refuse loading if nousb is used Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 36/67] unix: properly account for FDs passed over unix sockets Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 37/67] vxlan: fix test which detect duplicate vxlan iface Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 38/67] net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 39/67] ipv6: tcp: add rcu locking in tcp_v6_send_synack() Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 40/67] tcp_yeah: dont set ssthresh below 2 Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 41/67] sched,cls_flower: set key address type when present Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 42/67] net: pktgen: fix null ptr deref in skb allocation Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 43/67] udp: disallow UFO for sockets with SO_NO_CHECK option Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 44/67] net: preserve IP control block during GSO segmentation Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 45/67] bonding: Prevent IPv6 link local address on enslaved devices Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 46/67] dwc_eth_qos: Fix dma address for multi-fragment skbs Greg Kroah-Hartman
2016-01-27 18:12 ` Greg Kroah-Hartman [this message]
2016-01-27 18:12 ` [PATCH 4.4 48/67] net: bpf: reject invalid shifts Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 49/67] ipv6: update skb->csum when CE mark is propagated Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 50/67] bridge: fix lockdep addr_list_lock false positive splat Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 51/67] net/mlx5_core: Fix trimming down IRQ number Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 52/67] team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 53/67] batman-adv: Avoid recursive call_rcu for batadv_bla_claim Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 54/67] batman-adv: Avoid recursive call_rcu for batadv_nc_node Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 55/67] batman-adv: Drop immediate batadv_orig_ifinfo free function Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 56/67] batman-adv: Drop immediate batadv_neigh_node " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 57/67] batman-adv: Drop immediate neigh_ifinfo " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 58/67] batman-adv: Drop immediate batadv_hard_iface " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 59/67] batman-adv: Drop immediate orig_node " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 60/67] powerpc/tm: Check for already reclaimed tasks Greg Kroah-Hartman
2016-05-03 6:32 ` Jiri Slaby
2016-05-03 11:04 ` Michael Neuling
2016-05-03 18:19 ` Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 61/67] powerpc: Make value-returning atomics fully ordered Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 62/67] powerpc: Make {cmp}xchg* and their atomic_ versions " Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 63/67] scripts/recordmcount.pl: support data in text section on powerpc Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 64/67] powerpc/module: Handle R_PPC64_ENTRY relocations Greg Kroah-Hartman
2016-01-27 18:12 ` [PATCH 4.4 65/67] arm64: Clear out any singlestep state on a ptrace detach operation Greg Kroah-Hartman
2016-01-27 18:13 ` [PATCH 4.4 66/67] arm64: mm: ensure that the zero page is visible to the page table walker Greg Kroah-Hartman
2016-01-27 18:13 ` [PATCH 4.4 67/67] arm64: kernel: enforce pmuserenr_el0 initialization and restore Greg Kroah-Hartman
2016-01-27 23:28 ` [PATCH 4.4 00/67] 4.4.1-stable review Shuah Khan
2016-01-28 2:23 ` Guenter Roeck
2016-01-28 3:21 ` Guenter Roeck
2016-01-31 19:17 ` Greg Kroah-Hartman
2016-02-01 2:41 ` Guenter Roeck
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=20160127180912.644680306@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=courmisch@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=linux-kernel@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).