Bug 23356 - [PATCH] killall(1) refuses to kill root-owned SUID-binary started by non-root
Summary: [PATCH] killall(1) refuses to kill root-owned SUID-binary started by non-root
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: ps
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-12-07 15:00 UTC by Eugene Grosbein
Modified: 2001-02-23 08:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein 2000-12-07 15:00:02 UTC
New killall(1) is C-program that has replaced old perl-script.
It has a bug: sometimes it says "No matching processes belonging to you were found"
when user tries to kill any root-owned SUID-binary started by this
user. However, kill(1) still works.

Fix: 

Unknown for me
How-To-Repeat: I discovered this bug while connecting to ISP using pppd using command
like 'pppd call isp' and then tried to disconnect using 'killall pppd'.
killall refused to work. This is 100% repeatable.
However, kill did a job.
Comment 1 Maxim Konovalov 2000-12-12 00:35:55 UTC
Hi,

There is a typo in the killall.c. Here is the patch:

*** killall.c.orig	Tue Dec 12 00:00:01 2000
--- killall.c	Tue Dec 12 02:49:25 2000
***************
*** 248,254 ****
  	miblen = 3;
  
  	if (user && mib[2] == KERN_PROC_ALL) {
! 		mib[2] = KERN_PROC_UID;
  		mib[3] = uid;
  		miblen = 4;
  	}
--- 248,254 ----
  	miblen = 3;
  
  	if (user && mib[2] == KERN_PROC_ALL) {
! 		mib[2] = KERN_PROC_RUID;
  		mib[3] = uid;
  		miblen = 4;
  	}


The bin/17498 is obsolete, so you can close it too.

- - maxim

--
Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
Comment 2 Johan Karlsson freebsd_committer freebsd_triage 2000-12-15 18:24:02 UTC
Responsible Changed
From-To: freebsd-bugs->ps

Over to one of the authors.
Comment 3 ps freebsd_committer freebsd_triage 2001-02-23 08:36:06 UTC
State Changed
From-To: open->closed

fix in stable and current