Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535054
| From | David Miller <davem@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] ax25: Fix segfault when receiving an iframe with net2kiss loaded |
| Date | 2016-12-02 17:20 +0100 |
| Message-ID | <sJYJ4-69N-27@gated-at.bofh.it> (permalink) |
| References | <sJiJS-1JG-103@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Basil Gunn <basil@pacabunga.com> Date: Wed, 30 Nov 2016 11:15:25 -0800 > AX.25 uses sock_queue_rcv_skb() to queue an iframe received packet. > This routine writes NULL to the socket buffer device structure > pointer. The socket buffer is subsequently serviced by > __netif_receiv_skb_core() which dereferences the device structure > pointer & segfaults. > > The fix puts the ax25 device structure pointer back in the socket > buffer struct after sock_queue_rcv_skb() is called. You cannot do this. We have no reference count held on the device object, therefore once access to this SKB leaves the receive packet processing path and thus the RCU protected region, we must set skb->dev to NULL. Queueing the SKB to the socket causes the SKB to leave the receive processing path. You will have to find another way to propagate this device pointer to the code that needs it.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/1] ax25: Fix segfault when receiving an iframe with net2kiss loaded Basil Gunn <basil@pacabunga.com> - 2016-11-30 20:30 +0100 Re: [PATCH 1/1] ax25: Fix segfault when receiving an iframe with net2kiss loaded David Miller <davem@redhat.com> - 2016-12-02 17:20 +0100
csiph-web