System Calls & the Kernel Interface Questions

The boundary between user space and the kernel: how programs request privileged services through system calls, the user/kernel mode transition, and the semantics of core POSIX calls such as fork, exec, wait, open, read, write, and stat. Covers syscall numbers, arguments, return values and errno, and how libc wrappers relate to the underlying trap. This is the foundational interface for all systems programming on Unix/Linux.

HardTechnical
63 practiced

Implement a minimal ptrace-based tracer in C that attaches to a running process, intercepts execve syscalls, and logs the command-line arguments of executed programs. Provide code for attaching, using PTRACE_SYSCALL to intercept entry/exit, and reading strings from traced process memory. Discuss performance and security limitations of ptrace in production.

HardTechnical
54 practiced

A malware analyst tool walks a directory tree, filters for regular files, and then hashes them. How would you make the file-type checks and traversal resistant to symlink tricks, renamed paths, and concurrent filesystem changes?

MediumTechnical
86 practiced

Suppose your agent must execute a helper binary as a different user on a production host. What environment variables, file descriptors, path-resolution rules, and privilege transitions would you review before allowing that launch?

HardTechnical
53 practiced

During an incident, you notice a suspicious process tree spawning rapidly and executing different binaries. How would you use your understanding of fork(), exec(), and process parent-child relationships to distinguish normal automation from a fork bomb or malware loader?

HardTechnical
49 practiced

Describe how process credentials (real and effective UID/GID) interact with execve(2) and the setuid/setgid bits. Explain the security model for setuid binaries, how interpreters and shebang lines affect setuid behavior, and what operational recommendations you'd make for running third-party binaries that require elevated privileges.

Unlock Full Question Bank

Get access to all 10 System Calls & the Kernel Interface interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.