-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setsockopt: socket{call,pair,} send{msg,to}: Convert docs to docparse
Signed-off-by: Petr Vorel <[email protected]>
- Loading branch information
Showing
8 changed files
with
72 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (C) 2020 SUSE LLC <[email protected]> | ||
*/ | ||
|
||
/*\ | ||
* [Description] | ||
* | ||
* CVE-2017-17712 | ||
* | ||
* Test for race condition vulnerability in sendmsg() on SOCK_RAW sockets. | ||
* Changing the value of IP_HDRINCL socket option in parallel with sendmsg() | ||
* call may lead to uninitialized stack pointer usage, allowing arbitrary code | ||
* execution or privilege escalation. Fixed in: | ||
* execution or privilege escalation. | ||
* | ||
* commit 8f659a03a0ba9289b9aeb9b4470e6fb263d6f483 | ||
* Author: Mohamed Ghannam <[email protected]> | ||
* Date: Sun Dec 10 03:50:58 2017 +0000 | ||
* | ||
* net: ipv4: fix for a race condition in raw_sendmsg | ||
* Fixed in 4.15 | ||
* 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") | ||
*/ | ||
|
||
#include <sys/types.h> | ||
#include <sys/socket.h> | ||
#include <netinet/in.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,18 @@ | |
/* | ||
* Copyright(c) 2016 Fujitsu Ltd. | ||
* Author: Xiao Yang <[email protected]> | ||
* Copyright (c) Linux Test Project, 2017-2019 | ||
*/ | ||
|
||
/* | ||
* Test Name: sendto02 | ||
/*\ | ||
* [Description] | ||
* | ||
* Description: | ||
* When sctp protocol is selected in socket(2) and buffer is invalid, | ||
* When SCTP protocol created wih socket(2) and buffer is invalid, | ||
* sendto(2) should fail and set errno to EFAULT, but it sets errno | ||
* to ENOMEM. | ||
* | ||
* This is a regression test and has been fixed by kernel commit: | ||
* 6e51fe7572590d8d86e93b547fab6693d305fd0d (sctp: fix -ENOMEM result | ||
* with invalid user space pointer in sendto() syscall) | ||
* This is a regression test fixed by kernel 3.7 | ||
* 6e51fe757259 (sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall) | ||
*/ | ||
|
||
#include <errno.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,17 @@ | |
* Copyright (c) 2019 SUSE LLC <[email protected]> | ||
*/ | ||
|
||
/* | ||
/*\ | ||
* [Description] | ||
* | ||
* CVE-2020-14386 | ||
* | ||
* Check for vulnerability in tpacket_rcv() which allows an unprivileged user | ||
* to write arbitrary data to a memory area outside the allocated packet | ||
* buffer. Kernel crash fixed in: | ||
* | ||
* commit acf69c946233259ab4d64f8869d4037a198c7f06 | ||
* Author: Or Cohen <[email protected]> | ||
* Date: Thu Sep 3 21:05:28 2020 -0700 | ||
* buffer. | ||
* | ||
* net/packet: fix overflow in tpacket_rcv | ||
* Kernel crash fixed in 5.9 | ||
* acf69c946233 ("net/packet: fix overflow in tpacket_rcv") | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,14 @@ | |
/* | ||
* Copyright (c) Ulrich Drepper <[email protected]> | ||
* Copyright (c) International Business Machines Corp., 2009 | ||
* Copyright (c) Linux Test Project, 2010-2022 | ||
*/ | ||
|
||
/* | ||
* Test Name: socket02 | ||
* | ||
* Description: | ||
* This program tests the new flag SOCK_CLOEXEC and SOCK_NONBLOCK introduced | ||
* in socket() in kernel 2.6.27. | ||
*/ | ||
/*\ | ||
* [Description] | ||
* | ||
* Test socket() with SOCK_CLOEXEC and SOCK_NONBLOCK flags. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <unistd.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,14 @@ | |
* Copyright (c) 2016 Cyril Hrubis <[email protected]> | ||
* Copyright (c) Linux Test Project, 2017-2020 | ||
* Author: Sowmya Adiga <[email protected]> | ||
*/ | ||
|
||
/*\ | ||
* [Description] | ||
* | ||
* Basic test for the socketcall(2) raw syscall. | ||
* | ||
* This is a basic test for the socketcall(2) system call. | ||
* Test creating TCP, UDP, raw socket and unix domain dgram. | ||
*/ | ||
|
||
#include <unistd.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,14 @@ | |
/* | ||
* Copyright (c) Ulrich Drepper <[email protected]> | ||
* Copyright (c) International Business Machines Corp., 2009 | ||
* Copyright (c) Linux Test Project, 2010-2022 | ||
*/ | ||
|
||
/* | ||
* Test Name: socketpair02 | ||
* | ||
* Description: | ||
* This Program tests the new flag SOCK_CLOEXEC and SOCK_NONBLOCK introduced | ||
* in socketpair() in kernel 2.6.27. | ||
*/ | ||
/*\ | ||
* [Description] | ||
* | ||
* Test socket() with SOCK_CLOEXEC and SOCK_NONBLOCK flags. | ||
*/ | ||
|
||
#include <errno.h> | ||
#include <pthread.h> | ||
|