Skip to content

Conversation

@xboHodx
Copy link
Contributor

@xboHodx xboHodx commented Jan 8, 2026

  • chmod_test 的 ChmodTest.FchmodatNotDir
  • open_test 的 OpenTest.OpenNoFollowSymlink
  • 修复sysinfo_test并把sysinfo系统调用移到新的文件sys_sysinfo.rs中
  • mkdir_test 的 MkdirTest.FailsOnDirWithoutWritePerms
  • 修改gvisor测试的white_list和block_list

@github-actions github-actions bot added Bug fix A bug is fixed in this pull request test Unitest/User space test labels Jan 8, 2026
@fslongjin
Copy link
Member

bugbot run


if how.o_flags.contains(FileFlags::O_NOFOLLOW) && file_type == FileType::SymLink {
return Err(SystemError::ELOOP);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O_NOFOLLOW check ignores O_PATH flag combination

Medium Severity

When O_PATH | O_NOFOLLOW are both set, Linux semantics dictate that open() should succeed and return an O_PATH file descriptor referencing the symbolic link itself. However, the new check unconditionally returns ELOOP when O_NOFOLLOW is set and the target is a symlink, breaking this valid use case. The check needs to exclude the case where O_PATH is also present in o_flags.

Fix in Cursor Fix in Web

@xboHodx xboHodx changed the title fix(vfs): 添加路径为空和符号链接处理的错误检查 [TBD] fix(vfs): 添加路径为空和符号链接处理的错误检查 Jan 8, 2026
@github-actions github-actions bot added the ambiguous The title of PR/issue doesn't match the format label Jan 8, 2026
@xboHodx xboHodx changed the title [TBD] fix(vfs): 添加路径为空和符号链接处理的错误检查 [TBD] fix(syscall): 修复一些系统调用 Jan 8, 2026
@fslongjin
Copy link
Member

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3284ad11b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 288 to 289
if how.o_flags.contains(FileFlags::O_NOFOLLOW) && file_type == FileType::SymLink {
return Err(SystemError::ELOOP);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow O_PATH|O_NOFOLLOW to open symlinks

The new unconditional O_NOFOLLOW && symlink => ELOOP check blocks openat calls that intentionally use O_PATH|O_NOFOLLOW to obtain a file descriptor for the symlink itself (Linux allows this and it is the standard way to later fstatat(AT_EMPTY_PATH|AT_SYMLINK_NOFOLLOW) the link). With this change, such calls now fail even though the caller explicitly requested a path-only FD, which breaks symlink-introspection use cases while not required to satisfy the OpenNoFollowSymlink test for non-O_PATH opens.

Useful? React with 👍 / 👎.

@xboHodx
Copy link
Contributor Author

xboHodx commented Jan 10, 2026

bugbot run

@cursor
Copy link

cursor bot commented Jan 10, 2026

Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository.

@xboHodx xboHodx changed the title [TBD] fix(syscall): 修复一些系统调用 fix(syscall): 修复一些系统调用 Jan 10, 2026
@github-actions github-actions bot removed the ambiguous The title of PR/issue doesn't match the format label Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix A bug is fixed in this pull request test Unitest/User space test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants