Opened 11 years ago

Closed 11 years ago

#5834 closed Support Requests (invalid)

once.cpp: call_once: suffers from lack of uniqueness and synchronization handle manipulations

Reported by: noloader@… Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: viboes

Description

call_once attempts to form a unique mutex name by concatenating 2AC1A572DB6944B0A65C38C4140AF2F4 with the PID.

As Wagner and Goldberg taught us, PIDs are a useless source of entropy (or part thereof). See http://www.cs.berkeley.edu/~daw/papers/ddj-netscape.html.

An attacker using Win32 can manipulate synchronization objects by (1) squatting the name 'a priori', (2) creating a different type of object using the same name, and (3) creating the expected object but with lesser permissions than the program expects (ie, remove the ability to 'wait' on the mutex). See http://www.softwareintegrity.com/Documents/Old-Dogs-and-New-Tricks.pdf.

In addition, two different routines within the same program, each expecting to be 'run once', will suffer contention.

Change History (6)

comment:1 by Jeffrey Walton <noloader@…>, 11 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:2 by viboes, 11 years ago

Do you have any suggestion to improve the current state?

comment:3 by viboes, 11 years ago

Cc: viboes added

comment:4 by viboes, 11 years ago

How is this related to #5752 boost::call_once() is unreliable on some platforms?

comment:5 by viboes, 11 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned
Type: BugsSupport Requests

Could you point where in the code this is happening? Moved to support request until clarified.

Last edited 11 years ago by viboes (previous) (diff)

comment:6 by viboes, 11 years ago

Resolution: invalid
Status: assignedclosed

Closed as it seems this doesn't corresponds to the current Boost.Thread implementation.

Note: See TracTickets for help on using tickets.