ntfs3g-2016.2.22-CVE-2017-0358.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
  2. index 0bb38f97..c6d1dad3 100644
  3. --- a/src/lowntfs-3g.c
  4. +++ b/src/lowntfs-3g.c
  5. @@ -3827,13 +3827,14 @@ static fuse_fstype load_fuse_module(void)
  6. struct stat st;
  7. pid_t pid;
  8. const char *cmd = "/sbin/modprobe";
  9. + char *env = (char*)NULL;
  10. struct timespec req = { 0, 100000000 }; /* 100 msec */
  11. fuse_fstype fstype;
  12. if (!stat(cmd, &st) && !geteuid()) {
  13. pid = fork();
  14. if (!pid) {
  15. - execl(cmd, cmd, "fuse", NULL);
  16. + execle(cmd, cmd, "fuse", NULL, &env);
  17. _exit(1);
  18. } else if (pid != -1)
  19. waitpid(pid, NULL, 0);
  20. diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
  21. index 268b0569..945fc0be 100644
  22. --- a/src/ntfs-3g.c
  23. +++ b/src/ntfs-3g.c
  24. @@ -3612,13 +3612,14 @@ static fuse_fstype load_fuse_module(void)
  25. struct stat st;
  26. pid_t pid;
  27. const char *cmd = "/sbin/modprobe";
  28. + char *env = (char*)NULL;
  29. struct timespec req = { 0, 100000000 }; /* 100 msec */
  30. fuse_fstype fstype;
  31. if (!stat(cmd, &st) && !geteuid()) {
  32. pid = fork();
  33. if (!pid) {
  34. - execl(cmd, cmd, "fuse", NULL);
  35. + execle(cmd, cmd, "fuse", NULL, &env);
  36. _exit(1);
  37. } else if (pid != -1)
  38. waitpid(pid, NULL, 0);