Skip to content

Missing safe_read before pointer dereference in drsyscall_linux.c #2547

Description

@Egor-OSSRevival

Missing safe_read before pointer dereference in drsyscall_linux.c

#2546
#2478

In drsyscall/drsyscall_linux.c, the current code does not include a safe_read before dereferencing arg_ptr. This could lead to potential issues if the pointer is not valid.

int semid;
ASSERT(argnum_semid + 3 < SYSCALL_NUM_ARG_STORE, "index too high");
cmd = (uint) pt->sysarg[argnum_semid + 2];
arg_val = (ptr_int_t) pt->sysarg[argnum_semid + 3];
arg = *(union semun *) &arg_val;
arg_ptr = (union semun *)arg_val;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions