[RFC PATCH v2 30/41] ipc: add IPC_STAT_R and IPC_SET_R
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Oct 22 03:17:56 UTC 2026
> The ids of SysV message queues, semaphore sets and shared memory
> segments reach userspace in struct ipc64_perm, 32 bits each, so a UUID
> or GUID owner shows up as the overflow id and can't be set at all.
>
> Rather than doubling every *id64_ds, add two commands shared by
> msgctl(), semctl() and shmctl() that work on a struct ipc_perm_r with
> key, mode, and uid, gid, cuid and cgid as __kernel_uid_r_t:
>
> - IPC_STAT_R reads it, with the permission checks of IPC_STAT,
> - IPC_SET_R sets uid, gid and mode like IPC_SET does (a message queue
> keeps its size).
>
> The IPC_SET path now works on the kernel ids of a struct ipc_set_ids,
> which the classic command fills from its ipc64_perm. The audit record
> of IPC_SET has the new owner as a kuid as well and logs it like the
> other audit ids, in the initial user namespace.
>
> Assisted-by: Claude:claude-opus-5-5
>
> Signed-off-by: Jan Koester <jan.koester at tuxist.de>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792552161.git.jan.koester@tuxist.de?part=30
More information about the Linux-security-module-archive
mailing list