Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
20f37034
Commit
20f37034
authored
Jan 14, 2009
by
Heiko Carstens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CVE-2009-0029] System call wrappers part 21
Signed-off-by:
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
parent
3cdad428
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
fs/readdir.c
fs/readdir.c
+4
-2
net/socket.c
net/socket.c
+15
-15
No files found.
fs/readdir.c
View file @
20f37034
...
@@ -187,7 +187,8 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
...
@@ -187,7 +187,8 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
asmlinkage
long
sys_getdents
(
unsigned
int
fd
,
struct
linux_dirent
__user
*
dirent
,
unsigned
int
count
)
SYSCALL_DEFINE3
(
getdents
,
unsigned
int
,
fd
,
struct
linux_dirent
__user
*
,
dirent
,
unsigned
int
,
count
)
{
{
struct
file
*
file
;
struct
file
*
file
;
struct
linux_dirent
__user
*
lastdirent
;
struct
linux_dirent
__user
*
lastdirent
;
...
@@ -268,7 +269,8 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
...
@@ -268,7 +269,8 @@ static int filldir64(void * __buf, const char * name, int namlen, loff_t offset,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
asmlinkage
long
sys_getdents64
(
unsigned
int
fd
,
struct
linux_dirent64
__user
*
dirent
,
unsigned
int
count
)
SYSCALL_DEFINE3
(
getdents64
,
unsigned
int
,
fd
,
struct
linux_dirent64
__user
*
,
dirent
,
unsigned
int
,
count
)
{
{
struct
file
*
file
;
struct
file
*
file
;
struct
linux_dirent64
__user
*
lastdirent
;
struct
linux_dirent64
__user
*
lastdirent
;
...
...
net/socket.c
View file @
20f37034
...
@@ -1356,7 +1356,7 @@ asmlinkage long sys_socketpair(int family, int type, int protocol,
...
@@ -1356,7 +1356,7 @@ asmlinkage long sys_socketpair(int family, int type, int protocol,
* the protocol layer (having also checked the address is ok).
* the protocol layer (having also checked the address is ok).
*/
*/
asmlinkage
long
sys_bind
(
int
fd
,
struct
sockaddr
__user
*
umyaddr
,
int
addrlen
)
SYSCALL_DEFINE3
(
bind
,
int
,
fd
,
struct
sockaddr
__user
*
,
umyaddr
,
int
,
addrlen
)
{
{
struct
socket
*
sock
;
struct
socket
*
sock
;
struct
sockaddr_storage
address
;
struct
sockaddr_storage
address
;
...
@@ -1418,8 +1418,8 @@ asmlinkage long sys_listen(int fd, int backlog)
...
@@ -1418,8 +1418,8 @@ asmlinkage long sys_listen(int fd, int backlog)
* clean when we restucture accept also.
* clean when we restucture accept also.
*/
*/
asmlinkage
long
sys_accept4
(
int
fd
,
struct
sockaddr
__user
*
upeer_sockaddr
,
SYSCALL_DEFINE4
(
accept4
,
int
,
fd
,
struct
sockaddr
__user
*
,
upeer_sockaddr
,
int
__user
*
upeer_addrlen
,
int
flags
)
int
__user
*
,
upeer_addrlen
,
int
,
flags
)
{
{
struct
socket
*
sock
,
*
newsock
;
struct
socket
*
sock
,
*
newsock
;
struct
file
*
newfile
;
struct
file
*
newfile
;
...
@@ -1502,8 +1502,8 @@ asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
...
@@ -1502,8 +1502,8 @@ asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
goto
out_put
;
goto
out_put
;
}
}
asmlinkage
long
sys_accept
(
int
fd
,
struct
sockaddr
__user
*
upeer_sockaddr
,
SYSCALL_DEFINE3
(
accept
,
int
,
fd
,
struct
sockaddr
__user
*
,
upeer_sockaddr
,
int
__user
*
upeer_addrlen
)
int
__user
*
,
upeer_addrlen
)
{
{
return
sys_accept4
(
fd
,
upeer_sockaddr
,
upeer_addrlen
,
0
);
return
sys_accept4
(
fd
,
upeer_sockaddr
,
upeer_addrlen
,
0
);
}
}
...
@@ -1520,8 +1520,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
...
@@ -1520,8 +1520,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
* include the -EINPROGRESS status for such sockets.
* include the -EINPROGRESS status for such sockets.
*/
*/
asmlinkage
long
sys_connect
(
int
fd
,
struct
sockaddr
__user
*
uservaddr
,
SYSCALL_DEFINE3
(
connect
,
int
,
fd
,
struct
sockaddr
__user
*
,
uservaddr
,
int
addrlen
)
int
,
addrlen
)
{
{
struct
socket
*
sock
;
struct
socket
*
sock
;
struct
sockaddr_storage
address
;
struct
sockaddr_storage
address
;
...
@@ -1552,8 +1552,8 @@ asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr,
...
@@ -1552,8 +1552,8 @@ asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr,
* name to user space.
* name to user space.
*/
*/
asmlinkage
long
sys_getsockname
(
int
fd
,
struct
sockaddr
__user
*
usockaddr
,
SYSCALL_DEFINE3
(
getsockname
,
int
,
fd
,
struct
sockaddr
__user
*
,
usockaddr
,
int
__user
*
usockaddr_len
)
int
__user
*
,
usockaddr_len
)
{
{
struct
socket
*
sock
;
struct
socket
*
sock
;
struct
sockaddr_storage
address
;
struct
sockaddr_storage
address
;
...
@@ -1583,8 +1583,8 @@ asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr,
...
@@ -1583,8 +1583,8 @@ asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr,
* name to user space.
* name to user space.
*/
*/
asmlinkage
long
sys_getpeername
(
int
fd
,
struct
sockaddr
__user
*
usockaddr
,
SYSCALL_DEFINE3
(
getpeername
,
int
,
fd
,
struct
sockaddr
__user
*
,
usockaddr
,
int
__user
*
usockaddr_len
)
int
__user
*
,
usockaddr_len
)
{
{
struct
socket
*
sock
;
struct
socket
*
sock
;
struct
sockaddr_storage
address
;
struct
sockaddr_storage
address
;
...
@@ -1725,8 +1725,8 @@ asmlinkage long sys_recv(int fd, void __user *ubuf, size_t size,
...
@@ -1725,8 +1725,8 @@ asmlinkage long sys_recv(int fd, void __user *ubuf, size_t size,
* to pass the user mode parameter for the protocols to sort out.
* to pass the user mode parameter for the protocols to sort out.
*/
*/
asmlinkage
long
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
SYSCALL_DEFINE5
(
setsockopt
,
int
,
fd
,
int
,
level
,
int
,
optname
,
char
__user
*
optval
,
int
optlen
)
char
__user
*
,
optval
,
int
,
optlen
)
{
{
int
err
,
fput_needed
;
int
err
,
fput_needed
;
struct
socket
*
sock
;
struct
socket
*
sock
;
...
@@ -1759,8 +1759,8 @@ asmlinkage long sys_setsockopt(int fd, int level, int optname,
...
@@ -1759,8 +1759,8 @@ asmlinkage long sys_setsockopt(int fd, int level, int optname,
* to pass a user mode parameter for the protocols to sort out.
* to pass a user mode parameter for the protocols to sort out.
*/
*/
asmlinkage
long
sys_getsockopt
(
int
fd
,
int
level
,
int
optname
,
SYSCALL_DEFINE5
(
getsockopt
,
int
,
fd
,
int
,
level
,
int
,
optname
,
char
__user
*
optval
,
int
__user
*
optlen
)
char
__user
*
,
optval
,
int
__user
*
,
optlen
)
{
{
int
err
,
fput_needed
;
int
err
,
fput_needed
;
struct
socket
*
sock
;
struct
socket
*
sock
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment