* pinfo.h (winpids::pid_access): New element.
(winpids::winpids): Rejigger to set pinfo_access. * pinfo.cc (winpids::add): Try to open shared memory region with supplied pinfo_access first, then default to readonly. * fhandler_termios.cc (tty_min::kill_pgrp): When getting list of pids to work with, suggest opening with PID_MAP_RW. * signal.cc (kill_pgrp): Ditto. * sigproc.cc (sig_send): Perform a write check on todo prior to attempting to increment it. Return EACCES if we can't write to it.
This commit is contained in:
@ -725,6 +725,11 @@ sig_send (_pinfo *p, int sig, DWORD ebp, bool exception)
|
||||
else if ((thiscatch = getevent (p, "sigcatch")))
|
||||
{
|
||||
todo = p->getsigtodo (sig);
|
||||
if (IsBadWritePtr (todo, sizeof (*todo)))
|
||||
{
|
||||
set_errno (EACCES);
|
||||
goto out;
|
||||
}
|
||||
issem = false;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user