Thread (5 messages) 5 messages, 3 authors, 2024-07-09

Re: [RFC PATCH v19 1/5] exec: Add a new AT_CHECK flag to execveat(2)

From: Mickaël Salaün <mic@digikod.net>
Date: 2024-07-09 20:42:18
Also in: linux-fsdevel, linux-integrity, linux-security-module, lkml

Possibly related (same subject, not in this thread)

On Tue, Jul 09, 2024 at 11:57:27AM -0700, Jeff Xu wrote:
On Tue, Jul 9, 2024 at 2:18 AM Mickaël Salaün [off-list ref] wrote:
quoted
On Mon, Jul 08, 2024 at 10:52:36AM -0700, Jeff Xu wrote:
quoted
On Mon, Jul 8, 2024 at 10:33 AM Florian Weimer [off-list ref] wrote:
quoted
* Jeff Xu:
quoted
On Mon, Jul 8, 2024 at 9:26 AM Florian Weimer [off-list ref] wrote:
quoted
* Jeff Xu:
quoted
Will dynamic linkers use the execveat(AT_CHECK) to check shared
libraries too ?  or just the main executable itself.
I expect that dynamic linkers will have to do this for everything they
map.
Then all the objects (.so, .sh, etc.) will go through  the check from
execveat's main  to security_bprm_creds_for_exec(), some of them might
be specific for the main executable ?
Yes, we should check every executable code (including seccomp filters)
to get a consistent policy.

What do you mean by "specific for the main executable"?
I meant:

The check is for the exe itself, not .so, etc.

For example:  /usr/bin/touch is checked.
not the shared objects:
ldd /usr/bin/touch
linux-vdso.so.1 (0x00007ffdc988f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f59b6757000)
/lib64/ld-linux-x86-64.so.2 (0x00007f59b6986000)
ld.so should be patched to check shared-objects.
Basically, I asked if the check can be extended to shared-objects,
seccomp filters, etc, without modifying existing LSMs.
Yes, the check should be used against any piece of code such as
shared-objects, seccomp filters...
you pointed out "LSM should not need to be updated with this patch
series.", which already answered my question.

Thanks.
-Jeff

-Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help