-
日期: 2025-05-25 | 來源: 新智元 | 有0人參與評論 | 字體: 小 中 大
這意味著,o3 在計劃代碼推理能力上邁出了壹大步!
雖然人工智能還遠遠不能取代頂尖的漏洞研究人員,但它們現在已經發展到了可以顯著提升工作效率的階段。
“如果你的問題可以用不到 10 萬個行程式碼來描述,o3 很可能會直接幫助解決,或者至少能提供很大的幫助。”Heelan 寫道。
先測試壹下
在讓o3真正發現漏洞之前,Heelan用自己手動發現的壹個漏洞對o3進行了測試。
這個漏洞非常適合用來測試LLM,因為:
它很有趣:這個漏洞位於Linux核心的最終攻擊面,本身就很吸引人。
這並不簡單,也不算特別復雜:Heelan 表示,他可以在 10 分鍾內向同事完整講解整個程序代碼路徑,而且你不需要深入了解 Linux 核心、SMB 協議或 ksmbd 的其他部分。從封包到 ksmbd 模塊到觸發漏洞所需閱讀的最少程序代碼量,大約是 3300 行。
在研究確定好提示詞後,Heelan開始了對o3的基准測試。
結果在100次測試中,有8次發現了基准測試中的Kerberos認證漏洞。
在另外66次運行中,o3斷定程序碼中不存在任何錯誤(誤報),其余28次報告為誤報。
相比之下,Claude Sonnet 3.7在100次運行中發現了3次,而Claude Sonnet 3.5在100次運行中均未發現該漏洞。
因此,在這個基准測試中,o3的表現至少比Claude Sonnet 3.7提高了2到3倍。
而且,o3 的輸出感覺相當於壹份人類撰寫的漏洞報告,簡潔明了,只展示發現的結果,通常更容易理解。但有時日志太簡單,可能會犧牲壹些計算。而 Sonnet 3.7 的輸出最初是思維流或工作。
o3發現了真正的漏洞
在確認o3能找出Kerberos認證漏洞(CVE-2025-37778)後,Heelan想要試試如果把程序碼壹下子都給它,o3還能找到這個漏洞。
這顯然更難了,因為這總共有 1.2 萬個行程式碼(約 10 萬個代幣)。
結果是,在這1.2萬行程式碼的場景下,o3在100次運行中還是只有1次發現了Kerberos認證漏洞,性能明顯下降,但它確實能找到。
更讓人震驚的是,在其他運行的輸出中,Heelan 發現了壹個類似的、但之前他不知道的新漏洞報告。
Heelan 讓o3 解釋了這個問題,o3 給出了下面的報告。Short description=================While one ksmbd worker thread is still executing requests that usesess‑>user, another thread that processes an SMB2 LOGOFF for the samesession frees that structure. No synchronisation protects the pointer,so the first thread dereferences freed memory – a classicuse‑after‑free that leads to kernel memory corruption and arbitrary codeexecution in kernel context.Affected code path------------------1. A second transport is bound to an existing session (SMB 3.0 or later, `conn->binding == true`).2. Worker‑A (running on connection C2) receives any normal request (e.g. WRITE). • `smb2_check_user_session()` stores a pointer to the already existing `struct ksmbd_session` in `work->sess` and increments the session ref‑count, **but it does not take any reference on `sess->user`.** • The pointer to `sess` is kept for the whole request processing; every helper that needs authentication data accesses `sess->user` directly.3. Before Worker‑A finishes, Worker‑B (running on the first connection C1) processes an SMB2 LOGOFF for the same session and executes `smb2_session_logoff()` (smb2pdu.c).Relevant part of smb2_session_logoff()--------------------------------------```c ... if (sess->user) { ksmbd_free_user(sess->user); /* (1) frees memory */ sess->user = NULL; /* (2) clear the field */ } ...````ksmbd_free_user()` ultimately ends in simple `kfree(user)`.4. Worker‑B **does not wait for the other connections that are still using the session**; it only waits for running requests on *its own* connection (`ksmbd_conn_wait_idle(conn)`).5. Worker‑A continues to execute (e.g. inside `smb2_open()`, `smb2_write()`, …) and dereferences `sess->user`:```c/* examples (many of them) */if (user_guest(sess->user)) ← dereference after freeksmbd_compare_user(sess->user, …)sess->user->uid```Because the memory was already `kfree()`‑ed in step (1) the access is tofreed memory. Depending on exact timing it is either:• a use‑after‑free (pointer still points into now‑reused slab object), enabling controlled kernel‑memory overwrite, or • a NULL–deref (if Worker‑A reads after step (2)), still a DoS.- 新聞來源於其它媒體,內容不代表本站立場!
-
原文鏈接
原文鏈接:
目前還沒有人發表評論, 大家都在期待您的高見