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

IMA emulator: improve polling mechanism #374

Open
ansasaki opened this issue May 12, 2022 · 3 comments
Open

IMA emulator: improve polling mechanism #374

ansasaki opened this issue May 12, 2022 · 3 comments

Comments

@ansasaki
Copy link
Contributor

Currently the polling mechanism is a simple loop.

@ueno
Copy link
Contributor

ueno commented May 12, 2022

Last time I looked at it, the file was not pollable:
https://patchwork.kernel.org/project/linux-integrity/patch/[email protected]/
But it's half a year ago and the situation might have changed. @stefanberger do you know of any further update on this area?

@stefanberger
Copy link
Contributor

Sorry, I have no update...

I just tried your v2 patch but it seems to be stuck in poll().

strace tail -f /sys/kernel/security/ima/ascii_runtime_measurements

It should show base64 when I run it but doesn't seem to come back from poll(). It does show base64 on the restart of tail as expected.

I have the following policy on my system:

dont_measure fsmagic=0x9fa0
dont_measure fsmagic=0x62656572
dont_measure fsmagic=0x64626720
dont_measure fsmagic=0x1021994
dont_measure fsmagic=0x1cd1
dont_measure fsmagic=0x42494e4d
dont_measure fsmagic=0x73636673
dont_measure fsmagic=0xf97cff8c
dont_measure fsmagic=0x43415d53
dont_measure fsmagic=0x27e0eb
dont_measure fsmagic=0x63677270
dont_measure fsmagic=0x6e736673
dont_measure fsmagic=0xde5e81e4
measure func=MMAP_CHECK mask=MAY_EXEC
measure func=BPRM_CHECK mask=MAY_EXEC
measure func=FILE_CHECK mask=MAY_READ uid=0

@ueno
Copy link
Contributor

ueno commented May 13, 2022

Thank you for checking; let me come up with v3 shortly.

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

3 participants