Bug 13172 - aio_suspend is not async-signal-safe
Summary: aio_suspend is not async-signal-safe
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: librt (show other bugs)
Version: unspecified
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 03:38 UTC by Rich Felker
Modified: 2015-08-27 22:11 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Felker 2011-09-09 03:38:03 UTC
aio_suspend is required by POSIX to be async-signal-safe, but the first non-trivial line of glibc's implementation of aio_suspend is:

pthread_mutex_lock(&__aio_requests_mutex);

This will obviously deadlock (or worse) if the thread running the signal handler was already executing aio_suspend when it was interrupted by the signal.