|
|
7a2c72 |
diff -ru firefox-78.3.0/security/sandbox/linux/SandboxFilter.cpp firefox-78.4.0/security/sandbox/linux/SandboxFilter.cpp
|
|
|
7a2c72 |
--- firefox-78.3.0/security/sandbox/linux/SandboxFilter.cpp 2020-09-14 21:21:02.000000000 +0200
|
|
|
7a2c72 |
+++ firefox-78.4.0/security/sandbox/linux/SandboxFilter.cpp 2020-10-14 11:34:48.000000000 +0200
|
|
|
7a2c72 |
@@ -243,14 +243,21 @@
|
|
|
7a2c72 |
auto path = reinterpret_cast<const char*>(aArgs.args[1]);
|
|
|
7a2c72 |
auto buf = reinterpret_cast<statstruct*>(aArgs.args[2]);
|
|
|
7a2c72 |
auto flags = static_cast<int>(aArgs.args[3]);
|
|
|
7a2c72 |
+
|
|
|
7a2c72 |
+ if (fd != AT_FDCWD && (flags & AT_EMPTY_PATH) != 0 &&
|
|
|
7a2c72 |
+ strcmp(path, "") == 0) {
|
|
|
7a2c72 |
+ return ConvertError(fstatsyscall(fd, buf));
|
|
|
7a2c72 |
+ }
|
|
|
7a2c72 |
+
|
|
|
7a2c72 |
if (fd != AT_FDCWD && path[0] != '/') {
|
|
|
7a2c72 |
SANDBOX_LOG_ERROR("unsupported fd-relative fstatat(%d, \"%s\", %p, %d)",
|
|
|
7a2c72 |
fd, path, buf, flags);
|
|
|
7a2c72 |
return BlockedSyscallTrap(aArgs, nullptr);
|
|
|
7a2c72 |
}
|
|
|
7a2c72 |
- if ((flags & ~AT_SYMLINK_NOFOLLOW) != 0) {
|
|
|
7a2c72 |
+ if ((flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) != 0) {
|
|
|
7a2c72 |
SANDBOX_LOG_ERROR("unsupported flags %d in fstatat(%d, \"%s\", %p, %d)",
|
|
|
7a2c72 |
- (flags & ~AT_SYMLINK_NOFOLLOW), fd, path, buf, flags);
|
|
|
7a2c72 |
+ (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)), fd,
|
|
|
7a2c72 |
+ path, buf, flags);
|
|
|
7a2c72 |
return BlockedSyscallTrap(aArgs, nullptr);
|
|
|
7a2c72 |
}
|
|
|
7a2c72 |
return (flags & AT_SYMLINK_NOFOLLOW) == 0 ? broker->Stat(path, buf)
|