Runtime: Add protection to SecureString on Unix

Created on 11 Apr 2015  路  9Comments  路  Source: dotnet/runtime

We have a "working" implementation of SecureString on Unix, meaning that it'll run and provide the consumers with the expected inputs/outputs, but it doesn't actually encrypt any data in memory. We should investigate adding that. The implementation today does make other attempts at keeping the data confidential, such as using mlock to lock the pages in memory and using mprotect to remove read/write permissions from the pages.

api-approved os-linux up-for-grabs

Most helpful comment

@Flavien we recently added SecureString back to ease back-compat. It lives in it's own assembly now: https://github.com/dotnet/corefx/tree/master/src/System.Security.SecureString.

All 9 comments

We recently made the decision to leave SecureString without encryption on Unix, yes?

I don't believe that's been decided. @weshaggard?

https://github.com/dotnet/apireviews/tree/master/2015-07-14-securestring says SecureString should probably not be exposed in .NET Core

We are still working through the details but I believe we are landing in a place where we will be removing support for SecureString in .NET Core.

Closing this since dotnet/corefx#3536 removes System.Security.SecureString from .NetCore

Will .NET Core have an alternative to SecureString?

@Flavien we recently added SecureString back to ease back-compat. It lives in it's own assembly now: https://github.com/dotnet/corefx/tree/master/src/System.Security.SecureString.

@ianhays Does the aforementioned SecureString implementation perform encryption on the target in Unix, as originally suggested? I assume not but, frankly, I don't understand why this would be deprecated or moved into its own assembly at all. SecureString is a security-critical API and there is no alternative that I'm aware of.

Was this page helpful?
0 / 5 - 0 ratings