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:	Thu, 15 Nov 2007 15:23:53 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	haoki@...hat.com
Cc:	netdev@...r.kernel.org, satoshi.oshima.fk@...achi.com,
	herbert@...dor.apana.org.au, billfink@...dspring.com,
	andi@...stfloor.org, johnpol@....mipt.ru,
	shemminger@...ux-foundation.org, yoshfuji@...ux-ipv6.org,
	yumiko.sugita.yf@...achi.com
Subject: Re: [PATCH 4/5] udp: memory limitation by using udp_mem

From: Hideo AOKI <haoki@...hat.com>
Date: Thu, 15 Nov 2007 16:50:14 -0500

> +static inline int __ip_check_max_skb_pages(struct sock *sk, int size)
> +{
> +	switch(sk->sk_protocol) {
> +	case IPPROTO_UDP:
> +		if (atomic_read(sk->sk_prot->memory_allocated) + size
> +		    > sk->sk_prot->sysctl_mem[0])
> +			return -ENOBUFS;
> +		/* Fall through */	
> +	default:
> +		break;
> +	}
> +	return 0;
> +}
> +

This check misses UDPLITE, and this whole patch set is a designed in a
way that makes errors like this easy.

These special case checks are all over the place.

We don't have tests all over the place to see if a socket is TCP or
DCCP or SCTP in order to implement memory accounting there, because we
did it for connection oriented protocols cleanly, seperating things
via callbacks etc.

I would like to see the datagram memory accounting work similarly.
-
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