Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More secure helper tool to avoid possible abuse of SMC interface by malware apps #601

Closed
mhaeuser opened this issue May 7, 2022 · 6 comments

Comments

@mhaeuser
Copy link

mhaeuser commented May 7, 2022

The latest release of this app ships with a Privileged Helper App that exposes an SMC interface that takes caller-specified key names without a whitelist. There are obvious security concerns with not sanity-checking the key names intended to be exposed at the high-security level (helper). To not entirely eliminate this intentional security boundary from Apple, please consider matching the supplied key names against a whitelist. Or, much better yet, do not have any direct SMC exposure, but instead abstract the operations (e.g. expose SMCSetFanSpeed over SMCWriteKey or alike).

@mhaeuser mhaeuser added the bug label May 7, 2022
@kleuter
Copy link
Member

kleuter commented May 9, 2022

Hi,

I don't see a security concern here because macOS checks that only Macs Fan Control is able to use the priviledged helper tool.

image

@kleuter kleuter closed this as completed May 9, 2022
@mhaeuser
Copy link
Author

mhaeuser commented May 9, 2022

Well, if this was not the case, this would not be a "security concern" but an outright vulnerability, which I would have reported privately. The issue is this helper proxies a privileged interface into the unprivileged environment, defeating the security boundary as a whole. Reduced hardening from locally signed complilations, bugs in the unprivileged application, etc. may all lead to performing unintended operations on the privileged SMC interface.

@kleuter
Copy link
Member

kleuter commented Jun 7, 2022

This is not the case, this how apple priviledged tools generally work, but I'll think of reducing API abilities.

@kleuter kleuter reopened this Jun 7, 2022
@mhaeuser
Copy link
Author

Just stumbled over this: https://blog.obdev.at/what-we-have-learned-from-a-vulnerability/
In post 2 you imply SMAuthorizedClients authenticates the peer (which it apparently does not). Is this considered in the code? I didn‘t check.

@kleuter
Copy link
Member

kleuter commented Jun 20, 2022

Thanks, that's a very intereseting and important read.

Will be implemented in the next update for sure.

@kleuter kleuter added enhancement and removed bug labels Jun 20, 2022
@kleuter kleuter added this to the v1.6.0 milestone Jun 20, 2022
@kleuter
Copy link
Member

kleuter commented Jun 21, 2022

Security enforcement (as recommended by Objective Development) is implemented and checked to be working fine.
Works on macOS 10.14 and later. On 10.13 and older no additional security checks are made.

@kleuter kleuter mentioned this issue Jul 11, 2022
@kleuter kleuter changed the title Privileged Helper Application exposes SMC interface More secure helper tool to avoid possible abuse of SMC interface by malware apps Jul 11, 2022
@kleuter kleuter modified the milestones: v1.6.0, 1.5.14 Aug 23, 2022
@kleuter kleuter closed this as completed Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants