Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CF320752F2B99449115298D4A06B22F34E3DD31@dggemm509-mbx.china.huawei.com>
Date: Tue, 11 Jun 2019 11:36:59 +0000
From: pengyuanhong <pengyuanhong@...wei.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
CC: helitao <helitao@...wei.com>, "Huangqiang (H)" <h.huangqiang@...wei.com>,
	Jinyongming <jinyongming@...wei.com>, leijitang <leijitang@...wei.com>,
	"liuyutao (C)" <liuyutao2@...wei.com>, "Liyu (Marvin, Euler Dept)"
	<marvin.tms@...wei.com>, "Threefifteen Wang(Kunfeng)"
	<threefifteen.wangkunfeng@...wei.com>, "Wudilong (Michael)"
	<wudilong@...wei.com>
Subject: [proposal] Add detection of thread ID in pthread-related interfaces

Hello,

I find that all pthread-related interfaces directly access the input
parameter `pthread_t` without any check. If I pass an invalid thread ID
(e.g. an exited thread ID) to these interfaces, then segment fault
happens.

Both glibc and freebsd can do simple detection of thread ID(pthread_t)
passed by user and return ESRCH when no thread can be found. They
put all threads in a list or hash table, and update this list or table every
time a thread is created or exits.

>From the user's point of view, segment fault is unbearable and is not
*         recoverable in most cases. Instead, returning an error of ESRCH
*         seems more acceptable.

Content of type "text/html" skipped

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.