ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] I: brp-verify-unit: "... assumes overflowugid credentials"
Date: Mon, 12 Feb 2024 12:34:06 +0200
Message-ID: <20240212103406.GB1493@altlinux.org> (raw)
In-Reply-To: <067bf2a1-7222-4959-827d-541d12a2a1fe@basealt.ru>

On Mon, Feb 12, 2024 at 08:58:30AM +0300, Anton Farygin wrote:
> On 12.02.2024 01:12, Dmitry V. Levin wrote:
> > Кто-нибудь может мне рассказать, почему ядро до сих пор ещё разрешает
> > setuid(overflowuid)?  Это же по сути отменяет саму идею, заложенную
> > в overflowuid.
> >
> Сейчас при входе в систему доменным пользователем UID получается 32-х 
> битный.
> 
> overflow оно только на старых системах, где UID/GID 16-бит.

Всё обстоит несколько иначе.  Не готов читать лекцию, желающие могут
обратиться к первоисточнику самостоятельно:

linux$ git grep overflowuid
Documentation/admin-guide/sysctl/fs.rst:overflowgid & overflowuid
Documentation/admin-guide/sysctl/kernel.rst:overflowgid & overflowuid
Documentation/filesystems/idmappings.rst:third idmapping. The kernel will report unmapped ids as the overflowuid
drivers/gpu/drm/drm_ioctl.c:		client->uid = overflowuid;
fs/sysctls.c:		.procname	= "overflowuid",
fs/sysctls.c:		.data		= &fs_overflowuid,
fs/udf/super.c:	uopt.uid = make_kuid(current_user_ns(), overflowuid);
include/linux/highuid.h:extern int overflowuid;
include/linux/highuid.h:#define high2lowuid(uid) ((uid) & ~0xFFFF ? (old_uid_t)overflowuid : (old_uid_t)(uid))
include/linux/highuid.h:extern int fs_overflowuid;
include/linux/highuid.h:#define fs_high2lowuid(uid) ((uid) & ~0xFFFF ? (uid16_t)fs_overflowuid : (uid16_t)(uid))
include/linux/uidgid.h:		uid = overflowuid;
include/uapi/linux/bpf.h: * 		time-wait or a request socket instead), **overflowuid** value
include/uapi/linux/bpf.h: * 		is returned (note that **overflowuid** might also be the actual
kernel/sys.c:int overflowuid = DEFAULT_OVERFLOWUID;
kernel/sys.c:EXPORT_SYMBOL(overflowuid);
kernel/sys.c:int fs_overflowuid = DEFAULT_FS_OVERFLOWUID;
kernel/sys.c:EXPORT_SYMBOL(fs_overflowuid);
kernel/sysctl.c:		.procname	= "overflowuid",
kernel/sysctl.c:		.data		= &overflowuid,
kernel/user_namespace.c: *	If @kuid has no mapping in @targ overflowuid is returned.
kernel/user_namespace.c:		uid = overflowuid;
net/core/filter.c:		return overflowuid;


-- 
ldv


  reply	other threads:[~2024-02-12 10:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-10 11:37 Arseny Maslennikov
2024-02-10 14:06 ` Anton Farygin
2024-02-10 15:23   ` Arseny Maslennikov
2024-02-11 22:12     ` Dmitry V. Levin
2024-02-12  5:58       ` Anton Farygin
2024-02-12 10:34         ` Dmitry V. Levin [this message]
2024-02-12 10:50           ` Anton Farygin
2024-02-12 13:16             ` Arseny Maslennikov
2024-02-12  5:44     ` Anton Farygin
2024-02-12  7:45       ` [devel] I: brp-verify-unit: "... assumes overflowugid Alexey V. Vissarionov
2024-02-12  7:52         ` Anton Farygin
2024-02-12  8:04           ` Alexey V. Vissarionov
2024-02-12 14:23       ` [devel] I: brp-verify-unit: "... assumes overflowugid credentials" Arseny Maslennikov
2024-02-12 14:33         ` Arseny Maslennikov
2024-02-12 14:48           ` Anton Farygin
2024-02-18 13:35 ` Vitaly Lipatov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240212103406.GB1493@altlinux.org \
    --to=ldv@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git