[Bug 246497] /bin/sh crashes since r360452 in emulators/xsystem35, misc/gpsim, x11-themes/clearlooks

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat May 30 13:40:56 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246497

--- Comment #4 from commit-hook at freebsd.org ---
A commit references this bug:

Author: jilles
Date: Sat May 30 13:39:57 UTC 2020
New revision: 361646
URL: https://svnweb.freebsd.org/changeset/base/361646

Log:
  MFC r361112,r361117: sh: Fix double INTON with vfork

  The shell maintains a count of the number of times SIGINT processing has
  been disabled via INTOFF, so SIGINT processing resumes when all disables
  have enabled again (INTON).

  If an error occurs in a vfork() child, the processing of the error enables
  SIGINT processing again, and the INTON in vforkexecshell() causes the count
  to become negative.

  As a result, a later INTOFF may not actually disable SIGINT processing. This
  might cause memory corruption if a SIGINT arrives at an inopportune time.

  Note that various places such as errors in non-special builtins
  unconditionally reset the count to 0, so the problem might still not always
  be visible.

  PR:           246497

Changes:
_U  stable/12/
  stable/12/bin/sh/jobs.c
  stable/12/bin/sh/tests/execution/Makefile
  stable/12/bin/sh/tests/execution/unknown2.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-bugs mailing list