lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 31 Oct 2012 22:22:07 +0100
From:	Paul Chavent <paul.chavent@...c.net>
To:	David Miller <davem@...emloft.net>
CC:	Paul.Chavent@...ra.fr, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] packet: tx_ring: allow the user to choose
 tx data offset

On 10/31/2012 06:14 PM, David Miller wrote:
> From: Paul Chavent <Paul.Chavent@...ra.fr>
> Date: Mon, 22 Oct 2012 08:56:54 +0200
>
>> +		if (unlikely((off < off_min) || (off_max < off))) {
>> +			pr_err("payload offset (%d) out of range [%d;%d]\n",
>> +				off, off_min, off_max);
>> +			return -EINVAL;
>> +		}
>
> Users should not be able to spam the kernel log with error messages
> by simply make setsockopt() calls.
>
> This error log is inappropriate.

This error log is thrown when the user call send, not setsockopt !

It seems that the user can already fire an error msg by simply pass a too long tp_len.

Though, should i remove it from the tpacket_fill_skb function and silently return -EINVAL ?


>> @@ -110,6 +110,7 @@ struct packet_sock {
>>   	unsigned int		tp_reserve;
>>   	unsigned int		tp_loss:1;
>>   	unsigned int		tp_tstamp;
>> +	unsigned int		tp_tx_has_off:1;
>>   	struct packet_type	prot_hook ____cacheline_aligned_in_smp;
>>   };
>
> Please put the new bit field next to other existing bit fields so that
> there is less wasted space in the struct.

OK.

> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ