Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 20 May 2020 15:31:46 +0300
From: Konstantin Khlebnikov <>
Subject: pthread shouldn't ignore errors from syscall futex()

Userspace implementations of mutexes (including glibc) in some cases
retries operation without checking error code from syscall futex.

Example which loops inside second call rather than hung (or die) peacefully:

#include <stdlib.h>
#include <pthread.h>

int main(int argc, char **argv)
	char buf[sizeof(pthread_mutex_t) + 1];
	pthread_mutex_t *mutex = (pthread_mutex_t *)(buf + 1);

	pthread_mutex_init(mutex, NULL);

Thread in lkml:

Related bug in glibc:

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.