forked from ports/contrib
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
http://seclists.org/oss-sec/2017/q1/259
|
|
CVE-2017-0358 ntfs-3g: modprobe influence vulnerability via environment variables
|
|
--- ntfs-3g/src/lowntfs-3g.c 2016-12-31 08:56:59.011749600 +0100
|
|
+++ ntfs-3g/src/lowntfs-3g.c 2017-01-05 14:41:52.041473700 +0100
|
|
@@ -3827,13 +3827,14 @@
|
|
struct stat st;
|
|
pid_t pid;
|
|
const char *cmd = "/sbin/modprobe";
|
|
+ char *env = (char*)NULL;
|
|
struct timespec req = { 0, 100000000 }; /* 100 msec */
|
|
fuse_fstype fstype;
|
|
|
|
if (!stat(cmd, &st) && !geteuid()) {
|
|
pid = fork();
|
|
if (!pid) {
|
|
- execl(cmd, cmd, "fuse", NULL);
|
|
+ execle(cmd, cmd, "fuse", NULL, &env);
|
|
_exit(1);
|
|
} else if (pid != -1)
|
|
waitpid(pid, NULL, 0);
|
|
--- ntfs-3g/src/ntfs-3g.c 2017-02-04 23:30:23.825889593 +0100
|
|
+++ ntfs-3g/src/nfts-3g.c 2017-02-04 23:30:42.572542756 +0100
|
|
@@ -3612,13 +3612,14 @@
|
|
struct stat st;
|
|
pid_t pid;
|
|
const char *cmd = "/sbin/modprobe";
|
|
+ char *env = (char*)NULL;
|
|
struct timespec req = { 0, 100000000 }; /* 100 msec */
|
|
fuse_fstype fstype;
|
|
|
|
if (!stat(cmd, &st) && !geteuid()) {
|
|
pid = fork();
|
|
if (!pid) {
|
|
- execl(cmd, cmd, "fuse", NULL);
|
|
+ execle(cmd, cmd, "fuse", NULL, &env);
|
|
_exit(1);
|
|
} else if (pid != -1)
|
|
waitpid(pid, NULL, 0);
|