Bug 90999 - chkfontpath sends SIGUSR1 to PID 2 due to a programming flaw
chkfontpath sends SIGUSR1 to PID 2 due to a programming flaw
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: chkfontpath (Show other bugs)
9
All Linux
high Severity high
: ---
: ---
Assigned To: Mike A. Harris
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-16 05:04 EDT by Mike A. Harris
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.9.8-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-17 09:23:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2003-05-16 05:04:17 EDT
There is a rather serious bug in chkfontpath, which executes as part of an
attempt to send SIGUSR1 to xfs to force it to reload it's config file.  The bug
causes SIGUSR1 to also be sent to PID 2.  Here is the releavant broken code:
 
void restartXfs()
{
  struct stat st;
  /*  pid_t pid, wst;*/
 
  /* Stat /proc/version to see if /proc is mounted. */
  if (stat("/proc/version", &st) == 0) {
 
    /* It's there, we can do the pidof w/o fear of mounting /proc. */
    system("kill -USR1 `/sbin/pidof xfs` 2&1>/dev/null");
  }
}
 
system() above evaluates to:
 
kill -USR1 `/sbin/pidof xfs` 2  &  1>/dev/null
 
Which has the effect of USR1'ing PID 2 along with xfs, and running it in the
background.  PID 2 is almost certainly always going to be a kernel thread, which
means a random kernel thread is getting sent SIGUSR1 every single time
chkfontpath is executed.  This could potentially cause all sorts of problems
depending on how the receiving kernel thread handles SIGUSR1.
 
PID 2 on some of my machines here is:
 
 2 ?        SW     0:00 [migration_CPU0]
 2 ?        SW     0:00 [kflushd]

<pknirsch> root         2  0.0  0.0     0    0 ?        SW   May05   0:01 [keventd]
 
There is no knowing what if any problems may have been caused on live systems
because of this bug, but in my opinion it is serious enough to warrant an
erratum release of chkfontpath on all supported OS platforms that are affected.
Comment 1 Mike A. Harris 2003-05-17 09:23:55 EDT
Fixed in version 1.9.8-1 in rawhide

Note You need to log in before you can comment on or make changes to this bug.