Page MenuHomeFreeBSD

sh: Fix job pointer invalidation with trapsasync
ClosedPublic

Authored by jilles on Mon, Nov 17, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 18, 6:54 AM
Unknown Object (File)
Tue, Nov 18, 3:17 AM
Unknown Object (File)
Tue, Nov 18, 3:17 AM
Unknown Object (File)
Tue, Nov 18, 2:05 AM
Unknown Object (File)
Tue, Nov 18, 12:50 AM
Unknown Object (File)
Mon, Nov 17, 10:36 PM
Unknown Object (File)
Mon, Nov 17, 9:45 PM
Unknown Object (File)
Mon, Nov 17, 9:38 PM
Subscribers

Details

Summary

Calling dotrap() can do almost anything, including reallocating the
jobtab array. Convert the job pointer to an index before calling
dotrap() and then restore a proper job pointer afterwards.

PR: 290330
Reported by: bdrewery

Test Plan

Install patched sh with new tests, cd /usr/tests/bin/sh && kyua test and reboot (all within a virtual machine).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable