VirtualBox

9 年 前 建立

9 年 前 結束

#14153 closed defect (fixed)

Backslash recognised as path separator on Linux guests in shared folders

回報者: colml 負責人:
元件: shared folders 版本: VirtualBox 4.3.28
關鍵字: backslash path security 副本:
Guest type: Linux Host type: Windows

描述

While security testing a PHP web application that uses the basename() function to prevent directory traversal attacks I discovered that backslashes are recognised as valid path separators on Linux guests when working in shared folders. The host is running on Windows.

As basename() on Linux does not strip backslashes directory traversal is possible (i.e. passing ..\\..\\..\\target\\securefile).

The can be tested in bash by changing the current directory (cd ..\\) or referencing another file (cat ..\\file.txt).

Tested on a Ubuntu 14.04 guest with the latest guest additions installed via apt-get. I have not tested on other hosts or guests.

It's possible this behaviour is intentional, but it does allow security breaches in certain cases.

更動歷史 (2)

comment:1 9 年 前Klaus Espenlaub 編輯

We tried to trigger accessing files outside the area which is allowed for a shared folder, and everything was caught correctly. Scratching my head why you think this is a security issue.

It's definitely surprising behavior that \ is accepted as a path separator, but that's a comparably minor issue which can be fixed with appropriate priority (by producing an appropriate error in this case, as Windows host can't represent path elements with a \ in them, which would be perfectly valid of the host OS would be Linux).

comment:2 9 年 前Frank Mehnert 編輯

狀態: newclosed
處理結果: fixed

There is a fix in VBox 5.0.2.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette