从这个网页截图中,我们可以获取到以下关于漏洞的关键信息: 1. 漏洞描述: - 标题:bpf: Fix out-of-bounds write in trie_get_next_key() - 描述:trie_get_next_key() 函数在遍历 trie 结构时可能会导致越界写入。具体来说,当 trie->max_prefixlen 为 8 时,函数会尝试在 node_stack 中写入 9 个节点,导致越界写入。 2. 修复措施: - 修改代码:在 trie_get_next_key() 函数中添加了检查,确保 node_stack 的大小不超过 trie->max_prefixlen。 - 代码变更: - Diffstat:显示了代码变更的位置和类型。 3. 修复过程: - 提交者:Byeonguk Jeong - 提交时间:2024-10-26 - 提交描述:修复了 bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map 的问题。 - 测试者:Hou Tao - 验证者:Alexei Starovoitov 4. 相关链接: - 原始提交:https://lore.kernel.org/r/Zxx384ZfdlFYnz6J@localhost.localdomain - 提交详情:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21 这些信息表明,该漏洞是由于 trie_get_next_key() 函数在遍历 trie 结构时可能导致越界写入,修复措施是通过检查 node_stack 的大小来防止越界写入。