mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't send a signal to a controlling thread group if one has not been set.
Reported-by: syzbot+6ffd4294901528c6fd54@syzkaller.appspotmail.com PiperOrigin-RevId: 512678427
This commit is contained in:
committed by
gVisor bot
parent
3875c3f2ea
commit
8a1845f8b8
@@ -49,7 +49,15 @@ func (tg *ThreadGroup) TTY() *TTY {
|
||||
func (tty *TTY) SignalForegroundProcessGroup(info *linux.SignalInfo) {
|
||||
tty.mu.Lock()
|
||||
defer tty.mu.Unlock()
|
||||
|
||||
tg := tty.tg
|
||||
if tg == nil {
|
||||
// This TTY is not a controlling thread group. This can happen
|
||||
// if it was opened with O_NOCTTY, or if it failed the checks
|
||||
// on session and leaders in SetControllingTTY(). There is
|
||||
// nothing to signal.
|
||||
return
|
||||
}
|
||||
|
||||
tg.pidns.owner.mu.Lock()
|
||||
tg.signalHandlers.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user