一句话:提出差分模糊测试框架 Metamong,自动检测浏览器渲染更新语义错误且避免误报。
渲染更新错误是 Web 浏览器因错误的渲染更新而产生错误渲染输出的一类语义 bug,通常不会引发崩溃或违反检查,且由于 DOM 与 CSS 渲染规范复杂,难以自动判断渲染结果是否正确,实践中依赖专家人工分析。本文提出 Metamong,一个通过差分模糊测试自动检测渲染更新错误的框架。其核心包括页面变异器与渲染更新判定器:前者生成改变网页内容的渲染更新操作以触发 bug;后者利用 HTML 标准中的 yielding 规则生成给定网页的正确渲染结果。Metamong 构造两个 HTML 文件,它们构建相同网页,但仅其中一个会触发渲染更新,再通过差分测试比较渲染输出以判定 bug。作者实现了原型并在 Chrome 和 Firefox 上进行差分模糊测试,共发现 19 个新渲染更新 bug,其中 Chrome 17 个、Firefox 2 个,均已获浏览器厂商确认,5 个已被修复,验证了方法的实用性。
A render-update bug arises when a web browser produces an erroneous rendering output due to incorrect rendering updates. Such render-update bugs seriously harm the usability and reliability of web browsers. However, we find that detecting render-update bugs is challenging because the render-update bug is a semantic bug - given a rendering result, it is difficult to determine if it is correct due to the complex rendering specification of DOM and CSS. Thus, unlike memory corruption bugs, the incorrect rendering output does not raise the violation or crash. In practice, render-update bug detection relies on the time-prohibitive manual analysis of domain experts to determine the bug. This paper proposes Metamong, an automated framework to detect render-update bugs without false positive issues via differential fuzz testing. Metamong features two key components: (i) page mutator, and (ii) render-update oracle. The page mutator generates render-update operations, which change the content of the web page, to trigger a render-update bug. The render-update oracle exploits an HTML standard rule, so-called yielding, to produce the correct rendering result of a given web page. Combining these components, Metamong creates two HTML files where each constructs the same web page, but only one of them induces the render-update. It then uses differential testing to compare their rendering outputs to determine a bug. We implemented a prototype of Metamong, which performs differential fuzz testing on popular browsers, Chrome and Firefox. By far, Metamong identified 19 new render-update bugs, 17 in Chrome and two in Firefox. All of those have been confirmed by each browser vendor and five are already fixed, demonstrating the practical effectiveness of Metamong in identifying render-update bugs.