Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] fstatat crashed with invalid path #232

Open
qzheng527 opened this issue Mar 17, 2022 · 0 comments
Open

[BUG] fstatat crashed with invalid path #232

qzheng527 opened this issue Mar 17, 2022 · 0 comments
Assignees

Comments

@qzheng527
Copy link
Contributor

Describe the bug

Once upgrading to Ubuntu 20.04 base, the Occlum LTP test may panic in the case statx03.

To reproduce

Steps to reproduce the behavior:

  1. Start a Occlum container with OS Ubuntu20.04
  2. Go to demos/linux-ltp, do the build.
  3. Go to ltp_instance, run occlum run /opt/ltp/run-ltp.sh -f syscalls -s statx03

Expected behavior

No panic.

Logs

If applicable, add logs to help explain your problem.

Environment

  • HW: [e.g. SGX1, SGX2]
  • OS: [Ubuntu20.04]
  • Occlum version: [0.27.0]

Additional context

NGO/Occlum doesn't support syscall statx (332), in glibc > 2.28, it eventually will call syscall fstatat.
The panic happens when passing a dangling ponter as "pathname".
Details could refer to the LTP source code.
https://github.com/linux-test-project/ltp/blob/20210927/testcases/kernel/syscalls/statx/statx03.c#L58

Possible solution/Implementation

Not obligatory, but suggest a fix/reason for the bug.

@guzongmin guzongmin changed the title [BUG] [BUG] fstatat crashed with invalid path Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants