tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for "pshared" POSIX semaphores



On Sat, Feb 02, 2019 at 02:11:47PM -0800, Jason Thorpe wrote:
> Ok, updated patch:
> 
> 	https://patch-diff.githubusercontent.com/raw/thorpej/netbsd-src/pull/5.diff <https://patch-diff.githubusercontent.com/raw/thorpej/netbsd-src/pull/5.diff>
> 
> I went an used a simple hash table with 32 buckets.  Seems good enough for now.  Since the “pshared” IDs are random anyway, I didn’t bother with any exotic hash function — just extract some of the random bits to use as the bucket index.

This seems to allow attaching to random semaphores by just knowing the
right idea. This violates the definition of anonymous semaphores and I
wouldn't be surprised if it creates some nasty security issues...

Joerg


Home | Main Index | Thread Index | Old Index