lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sfprudal.fsf@email.froward.int.ebiederm.org>
Date:   Mon, 02 May 2022 11:09:22 -0500
From:   "Eric W. Biederman" <ebiederm@...ssion.com>
To:     Alexey Gladkov <legion@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Alexander Mikhalitsyn <alexander.mikhalitsyn@...tuozzo.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Daniel Walsh <dwalsh@...hat.com>,
        Davidlohr Bueso <dbueso@...e.de>,
        Kirill Tkhai <ktkhai@...tuozzo.com>,
        Linux Containers <containers@...ts.linux.dev>,
        Manfred Spraul <manfred@...orfullife.com>,
        Serge Hallyn <serge@...lyn.com>,
        Varad Gautam <varad.gautam@...e.com>,
        Vasily Averin <vvs@...tuozzo.com>
Subject: Re: [PATCH v1 2/4] ipc: Use proper ipc namespace

Alexey Gladkov <legion@...nel.org> writes:

> As Eric Biederman pointed out, changing the namespace broke checkpoint
> restore. I have reverted my previous changes.

Can you remind me the bug that is being fixed here?

I am probably just going to fast to see it, but it would be good to have
it described in the commit comment.

Thanks,
Eric

>
> Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
> Signed-off-by: Alexey Gladkov <legion@...nel.org>
> ---
>  ipc/ipc_sysctl.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
> index eb7ba8e0a355..ff99d0305a5b 100644
> --- a/ipc/ipc_sysctl.c
> +++ b/ipc/ipc_sysctl.c
> @@ -72,7 +72,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
>  static int proc_ipc_dointvec_minmax_checkpoint_restore(struct ctl_table *table,
>  		int write, void *buffer, size_t *lenp, loff_t *ppos)
>  {
> -	struct ipc_namespace *ns = table->extra1;
> +	struct ipc_namespace *ns = current->nsproxy->ipc_ns;
>  	struct ctl_table ipc_table;
>  
>  	if (write && !checkpoint_restore_ns_capable(ns->user_ns))
> @@ -244,15 +244,12 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
>  #ifdef CONFIG_CHECKPOINT_RESTORE
>  			} else if (tbl[i].data == &init_ipc_ns.ids[IPC_SEM_IDS].next_id) {
>  				tbl[i].data = &ns->ids[IPC_SEM_IDS].next_id;
> -				tbl[i].extra1 = ns;
>  
>  			} else if (tbl[i].data == &init_ipc_ns.ids[IPC_MSG_IDS].next_id) {
>  				tbl[i].data = &ns->ids[IPC_MSG_IDS].next_id;
> -				tbl[i].extra1 = ns;
>  
>  			} else if (tbl[i].data == &init_ipc_ns.ids[IPC_SHM_IDS].next_id) {
>  				tbl[i].data = &ns->ids[IPC_SHM_IDS].next_id;
> -				tbl[i].extra1 = ns;
>  #endif
>  			} else {
>  				tbl[i].data = NULL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ