一位英国安全研究人员今天发现,Sudo应用程序中最近的一个安全漏洞也会影响macOS操作系统,而不仅仅是最初认为的Linux和BSD。

该漏洞,上周由Qualys的安全研究人员披露为CVE-2021-3156(又名Baron Samedit),影响了Sudo,一个允许管理员将有限的根访问权限委托给其他用户的应用程序。

Qualys研究人员发现它们可能触发“heap overflow“bug更改当前用户对根级命令的低权限访问,授予攻击者访问整个系统的权限。

利用此漏洞的唯一条件是攻击者可以访问系统,研究人员说,这可以通过在设备上植入恶意软件或强制使用低特权服务帐户来实现https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit“target=”\u blank“rel=”noopener noreferrer nofollow“data component=“externalLink”>报告上周,Qualys的研究人员表示,他们只在Ubuntu、Debian和Fedora上测试了这个问题。他们说类似UNIX的操作系统也会受到影响,但大多数安全研究人员认为这个错误可能会影响BSD,Sudo应用程序还附带了另一个主要的操作系统。

最新的macOS版本也影响了

但是https://twitter.com/hackerfantasticHacker House的联合创始人Matthew Hickey今天在Twitter上指出,macOS的最新版本https://support.apple.com/en-gb/HT202035“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>也随Sudo应用程序提供

希基说,他测试了CVE-2021-3156漏洞,发现经过一些修改,这个安全漏洞也可用于授予攻击者访问macOS根帐户的权限。

“要触发它,您只需覆盖argv[0]或创建一个符号链接,从而使操作系统暴露于上周左右困扰Linux用户的同一个本地根漏洞中,”Hickey在今天与ZDNet分享一段视频之前说他的发现也得到了私人和独立的验证,并由https://twitter.com/patrickwardle“target=”\u blank“rel=”noopener noreferrer“data component=”externalLink“>Patrick Wardle,当今领先的macOS安全专家之一,通过Google资助项目,用新的Rust组件保护Apache web服务器

勒索软件团伙正在滥用VMWare ESXi漏洞对虚拟硬盘进行加密

a, .nav-item > a, .dropdown-menu a'); allLinks.forEach(link => { let href = link.getAttribute('href'); if (!href || href === '#' || href === 'javascript:;') return; // 4. 提取菜单中的核心路径 // 例如 /articles.html -> articles let cleanHref = href.replace(/^\/|\/$/g, '').replace(/\.(html|php)$/, '').toLowerCase(); let isMatch = false; // 5. 精确匹配逻辑 if (cleanHref === 'index') { // 只有当前是首页时,才高亮首页 if (cleanPath === 'index') isMatch = true; } else { // 如果当前路径完全等于菜单路径 (如 /articles 匹配 /articles) // 或者当前路径以 "菜单路径/" 开头 (如 /articles/154 匹配 /articles) // 或者当前路径包含 "菜单路径." (防某些带点号的特殊情况) if (cleanPath === cleanHref || cleanPath.startsWith(cleanHref + '/')) { isMatch = true; } } // 6. 如果匹配成功,加上高亮 if (isMatch) { link.classList.add('active'); // 如果匹配的是下拉菜单里的子项,顺便把它的父级分类也高亮 const parentNavItem = link.closest('.nav-item'); if (parentNavItem && !parentNavItem.classList.contains('active')) { const parentLink = parentNavItem.querySelector('a'); if (parentLink) parentLink.classList.add('active'); } } }); })(); // ================= 移动端菜单逻辑 ================= const toggle = document.getElementById("menuToggle"); const nav = document.getElementById("navLinks"); // 1. 汉堡按钮:切换主菜单显示/隐藏 if (toggle && nav) { toggle.addEventListener("click", function (e) { e.stopPropagation(); const expanded = this.getAttribute("aria-expanded") === "true"; this.setAttribute("aria-expanded", String(!expanded)); nav.classList.toggle("active"); }); } // 2. 处理下拉子菜单的展开/折叠 if (window.innerWidth <= 768) { const navItems = document.querySelectorAll(".nav-item"); navItems.forEach((item) => { const titleLink = item.querySelector("a"); const dropdownMenu = item.querySelector(".dropdown-menu"); const arrowIcon = item.querySelector(".arrow-icon"); if (titleLink && dropdownMenu) { titleLink.addEventListener("click", function (e) { e.preventDefault(); // 阻止链接跳转 e.stopPropagation(); // 手风琴效果:收起其他已展开的菜单 navItems.forEach((otherItem) => { if (otherItem !== item) { const otherMenu = otherItem.querySelector(".dropdown-menu"); const otherArrow = otherItem.querySelector(".arrow-icon"); if (otherMenu) otherMenu.classList.remove("active"); if (otherArrow) otherArrow.style.transform = "rotate(0)"; } }); // 切换当前菜单 dropdownMenu.classList.toggle("active"); if (arrowIcon) { arrowIcon.style.transform = dropdownMenu.classList.contains( "active", ) ? "rotate(180deg)" : "rotate(0)"; } }); } }); } // 3. 点击普通菜单项后,自动关闭整个主菜单 if (nav) { nav.querySelectorAll("a").forEach(function (link) { if (!link.querySelector(".arrow-icon")) { link.addEventListener("click", function () { nav.classList.remove("active"); if (toggle) toggle.setAttribute("aria-expanded", "false"); }); } }); } // ================= 返回顶部逻辑 ================= (function () { const backToTop = document.getElementById("backToTop"); window.addEventListener("scroll", function () { if (window.scrollY > 300) { backToTop.classList.add("show"); } else { backToTop.classList.remove("show"); } }); backToTop.addEventListener("click", function () { window.scrollTo({ top: 0, behavior: "smooth" }); }); })(); // 多语言 document.addEventListener("DOMContentLoaded", function() { let path = window.location.pathname; let isEn = path.startsWith('/en/'); if (isEn) { document.cookie = "my_lang=en; path=/; max-age=" + (30 * 24 * 3600); } else { document.cookie = "my_lang=zh; path=/; max-age=" + (30 * 24 * 3600); } // 【2. 首页记忆】如果访问的是首页(没带 en),但记忆是英文,前端自动跳去英文首页 if (!isEn && (path === '/' || path === '/index.html')) { if (document.cookie.includes('my_lang=en')) { window.location.replace('/en' + path); return; } } // 【3. 菜单不掉线】如果是英文页面,自动给菜单链接加上 /en/ if (isEn) { document.querySelectorAll('a').forEach(function(link) { let href = link.getAttribute('href'); // 站内链接,且没带 /en/ if (href && href.startsWith('/') && !href.startsWith('/en/') && !href.startsWith('http')) { link.setAttribute('href', '/en' + href); } }); } });