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]
Message-ID: <47158A50.90905@redhat.com>
Date:	Wed, 17 Oct 2007 00:06:40 -0400
From:	Hideo AOKI <haoki@...hat.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	Satoshi OSHIMA <satoshi.oshima.fk@...achi.com>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Hideo AOKI <hideo.aoki.tk@...achi.com>,
	Yumiko SUGITA <yumiko.sugita.yf@...achi.com>,
	Andi Kleen <andi@...stfloor.org>,
	Evgeniy Polyakov <johnpol@....mipt.ru>,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH 4/4] UDP memory accounting and limitation(take 5): memory
 limitation

Herbert Xu wrote:
> On Fri, Oct 12, 2007 at 09:11:27PM +0900, Satoshi OSHIMA wrote:
>> +static inline int __ip_check_max_skb_pages(struct sock *sk, int size)
>> +{
>> +	switch(sk->sk_protocol) {
>> +	case IPPROTO_UDP:
>> +		if (sk->sk_prot->sysctl_mem[0] > UDP_MIN_SKB_PAGES)
>> +			if (atomic_read(sk->sk_prot->memory_allocated)+size
>> +			    >= sk->sk_prot->sysctl_mem[0])
>> +				return -ENOBUFS;
>> +		/* Fall through */	
>> +	default:
>> +		break;
>> +	}
>> +	return 0;
>> +}
> 
> Since you're not doing a per-user limit, you must give each
> socket a minimum even when the total exceeds your threshold.
> 
> Otherwise any local user can trivially DoS the whole system.
> 
>> +UDP variables:
>> +
>> +udp_mem - INTERGER
>> +	Number of pages allowed for queueing by all UDP sockets.
>> +	Minimal value is 4096. If 4096 is set, UDP memory will not
>> +	be limited.
>> +	Default: 4096
> 
> This seems to be a rather confusing setup.  We don't set a
> minimum for TCP so is this really necessary?

Hello Herbert,

Thank you so much for your comments.

I'm going to fix them in next take patch set.

Regards,
Hideo

--
Hitachi Computer Products (America) Inc.
-
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