ima_bprm_creds_for_exec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

ima_bprm_creds_for_exec β€” bestie, this is the one that collects, stores, and appraises the measurement ✨


πŸŽ€ SYNOPSIS πŸŽ€

int ima_bprm_creds_for_exec (struct linux_binprm *bprm );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • bprm β€” this cutie right here contains the linux_binprm structure, no cap πŸ‘‘

🌸 DESCRIPTION 🌸

okay so here's the vibe: this function looks at the IMA policy and the execveat(2) AT_EXECVE_CHECK flag, and then it measures and appraises the integrity of a file that's about to be executed by script interpreters 🧚✨

and here's the part that's actually iconic β€” unlike literally every other LSM hook where the kernel is the one enforcing file integrity, this time around enforcing file integrity is left up to the discretion of the script interpreter (that's userspace, babe). so the kernel isn't the bouncer here, the interpreter is πŸ’…

on success, it returns 0 πŸŽ‰ but if there's an integrity appraisal error β€” assuming the file is in policy and IMA-appraisal is in enforcing mode β€” it returns -EACCES. so like, not a slay 😭

ngl this one's giving "trust the userspace to do the right thing" energy, which is a choice, but okay 🫢

🌈 SEE ALSO 🌈

kernel file ./security/integrity/ima/ima_main.c (the mothership πŸ‘‘) plus all these besties:


and that's the whole page, periodt πŸ’– this gem lives at ./security/integrity/ima, it's dated October 2026, and it's officially known as ima_bprm_creds_for_exec(9) β€” go off, kernel API manual, you ate πŸ“βœ¨

πŸ“¦ where this page comes from