1 Star 0 Fork 55

wangjunqiang/firefox

forked from src-openEuler/firefox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Bug-1660901-ignore-AT_NO_AUTOMOUNT-in-fstatat-system-call.patch 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
lingsheng 提交于 2021-07-08 15:18 +08:00 . Fix firefox video tab crash with rust 1.51
# HG changeset patch
# User Julien Cristau <jcristau@mozilla.com>
# Date 1599423639 0
# Node ID 8ecb82a2f65cf6082d50d1e00453fbeba97633fb
# Parent 0ce38d3c2aa2357df4a8fcc5fd39d3af05fce7e1
Bug 1660901 - ignore AT_NO_AUTOMOUNT in fstatat system call. r=jld, a=RyanVM
Per the manpage "Both stat() and lstat() act as though AT_NO_AUTOMOUNT
was set.", so don't bail if it's set in a call to fstatat.
Differential Revision: https://phabricator.services.mozilla.com/D89121
diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -249,19 +249,20 @@ class SandboxPolicyCommon : public Sandb
return ConvertError(fstatsyscall(fd, buf));
}
if (fd != AT_FDCWD && path[0] != '/') {
SANDBOX_LOG_ERROR("unsupported fd-relative fstatat(%d, \"%s\", %p, %d)",
fd, path, buf, flags);
return BlockedSyscallTrap(aArgs, nullptr);
}
- if ((flags & ~AT_SYMLINK_NOFOLLOW) != 0) {
+ if ((flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) != 0) {
SANDBOX_LOG_ERROR("unsupported flags %d in fstatat(%d, \"%s\", %p, %d)",
- (flags & ~AT_SYMLINK_NOFOLLOW), fd, path, buf, flags);
+ (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)), fd,
+ path, buf, flags);
return BlockedSyscallTrap(aArgs, nullptr);
}
return (flags & AT_SYMLINK_NOFOLLOW) == 0 ? broker->Stat(path, buf)
: broker->LStat(path, buf);
}
static intptr_t ChmodTrap(ArgsRef aArgs, void* aux) {
auto broker = static_cast<SandboxBrokerClient*>(aux);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/geasscore/firefox.git
git@gitee.com:geasscore/firefox.git
geasscore
firefox
firefox
master

搜索帮助