lkml.org 
[lkml]   [2006]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Some socket syscalls fail to return an error on bad file-descriptor# argument
Date
This has been fixed in 2.6.17. 

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tony
> Griffiths
> Sent: Wednesday, May 31, 2006 8:39 PM
> To: linux-kernel@vger.kernel.org
> Subject: Some socket syscalls fail to return an error on bad
> file-descriptor# argument
>
> Description:
>
> The sockfd_lookup_light() function does not set the return
> error status on a particular failure mode when the passed-in
> fd# is erroneous.
>
> Environment:
>
> 2.6.16 kernel with the -mm2 patch-set applied. Linux 2.6.17
> kernels are also affected. Without the fix, a number of
> tests in LTP fail! Any program calling one of the syscalls
> listed below with a bad fd# will not get an error return
> indicating that the syscall failed.
>
> Fix:
>
> The attached patch correctly sets *err = -EBADF if the
> attempt to map the fd# to a file pointer returns NULL. The
> following syscalls are
> affected-
>
> bind()
> listen()
> accept()
> connect()
> getsockname()
> getpeername()
> setsockopt()
> setsockopt()
> shutdown()
> sendmsg()
> recvmsg()
>
>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-01 06:36    [W:0.039 / U:4.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site