Re: PROBLEM: oops when using socket()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 17, 2001 at 08:44:49PM -0400, list-kernel@xc.net wrote:
> oops when using socket()
> 
> When calling socket() with the type set to SOCK_STREAM + X, where X is >= 10, an oops occurs.  Happens when root or user.  Tested with 2.4.6 and 2.4.7-pre6.
> 
> networking, sockets, protocols

It got introduced with the new protocol switch stuff in 2.4.6.

Here is a patch.


--- net/socket.c-o	Thu Jul  5 18:46:50 2001
+++ net/socket.c	Wed Jul 18 03:09:19 2001
@@ -843,6 +843,9 @@
 	 */
 	if(family<0 || family>=NPROTO)
 		return -EAFNOSUPPORT;
+	if (type>=SOCK_MAX) 
+		return -EINVAL;
+	
 
 	/* Compatibility.
 


-Andi
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux