Subject: Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

From: Daniel Borkmann <[email-masked]>
Date: Wed, 19 Aug 2015 16:29:32 +0200

On 08/17/2015 11:02 PM, David Miller wrote:
> From: Daniel Borkmann <[email-masked]>
> Date: Fri, 14 Aug 2015 12:38:21 +0200
>
>> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
>> index 67d2104..4307446 100644
>> --- a/net/netlink/af_netlink.c
>> +++ b/net/netlink/af_netlink.c
>> @@ -238,6 +238,13 @@ static void __netlink_deliver_tap(struct sk_buff
>> *skb)
>>
>>   static void netlink_deliver_tap(struct sk_buff *skb)
>>   {
>> +	/* Netlink mmaped skbs must not access shared info, and thus
>> +	 * are not allowed to be cloned. For now, just don't allow
>> +	 * them to get inspected by taps.
>> +	 */
>> +	if (netlink_skb_is_mmaped(skb))
>> +		return;
>> +
>
> I would seriously rather see us do an expensive full copy of the SKB
> than to have traffic which is unexpectedly invisible to taps.

Do you mean generically as we do in TX path, or only in this
particular scenario?

Thanks,
Daniel