Opened 6 years ago
Last modified 6 months ago
#14961 assigned bug
Audit all syscalls for permissions and access checks — at Initial Version
Reported by: | waddlesplash | Owned by: | waddlesplash |
---|---|---|---|
Priority: | high | Milestone: | R1/beta6 |
Component: | System/Kernel | Version: | R1/Development |
Keywords: | security | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Here's a full list of source files containing syscall implementations:
- src/system/kernel/UserTimer.cpp
- src/system/kernel/arch/arm/arch_atomic32.cpp
- src/system/kernel/arch/arm/arch_atomic64.cpp
- src/system/kernel/arch/m68k/arch_atomic.cpp
- src/system/kernel/arch/x86/arch_system_info.cpp
- src/system/kernel/arch/x86/syscalls_compat.cpp
- src/system/kernel/cpu.cpp
- src/system/kernel/debug/BreakpointManager.cpp
- src/system/kernel/debug/debug.cpp
- src/system/kernel/debug/frame_buffer_console.cpp
- src/system/kernel/debug/safemode_settings.cpp
- src/system/kernel/debug/system_profiler.cpp
- src/system/kernel/debug/tracing.cpp
- src/system/kernel/debug/user_debugger.cpp
- src/system/kernel/disk_device_manager/ddm_userland_interface.cpp
- src/system/kernel/elf.cpp
- src/system/kernel/fs/fd.cpp
- src/system/kernel/fs/node_monitor.cpp
- src/system/kernel/fs/socket.cpp
- src/system/kernel/fs/vfs.cpp
- src/system/kernel/image.cpp
- src/system/kernel/locks/user_mutex.cpp
- src/system/kernel/messaging/MessagingService.cpp
- src/system/kernel/port.cpp
- src/system/kernel/posix/realtime_sem.cpp
- src/system/kernel/posix/xsi_message_queue.cpp
- src/system/kernel/posix/xsi_semaphore.cpp
- src/system/kernel/real_time_clock.cpp
- src/system/kernel/scheduler/scheduler.cpp
- src/system/kernel/scheduler/scheduling_analysis.cpp
- src/system/kernel/sem.cpp
- src/system/kernel/shutdown.cpp
- src/system/kernel/signal.cpp
- src/system/kernel/syscalls.cpp
- src/system/kernel/system_info.cpp
- src/system/kernel/team.cpp
- src/system/kernel/thread.cpp
- src/system/kernel/usergroup.cpp
- src/system/kernel/vm/vm.cpp
- src/system/kernel/wait_for_objects.cpp
Each and every one of these needs to be audited, namely:
- All passed pointers are checked against
IS_USER_ADDRESS
(thanks to SMAP, largely already done) - All objects (e.g. FDs, areas, semaphores) manipulated by syscalls are checked that the calling team has access to manipulate them
- Whatever other things I think of adding here...
Note:
See TracTickets
for help on using tickets.