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]
Date:   Thu, 24 Jun 2021 11:18:39 -0500
From:   Mike Christie <michael.christie@...cle.com>
To:     kernel test robot <lkp@...el.com>, linux-kernel@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, mst@...hat.com,
        sgarzare@...hat.com, jasowang@...hat.com, stefanha@...hat.com,
        christian@...uner.io, akpm@...ux-foundation.org,
        peterz@...radead.org, christian.brauner@...ntu.com
Cc:     kbuild-all@...ts.01.org
Subject: Re: [PATCH 3/3] vhost: pass kthread user to check RLIMIT_NPROC

On 6/24/21 3:26 AM, kernel test robot wrote:
>>> drivers/vhost/vhost.c:599:57: sparse: sparse: dereference of noderef expression
> vim +599 drivers/vhost/vhost.c
> 
>    581	
>    582	/* Caller should have device mutex */
>    583	long vhost_dev_set_owner(struct vhost_dev *dev)
>    584	{
>    585		struct task_struct *worker;
>    586		int err;
>    587	
>    588		/* Is there an owner already? */
>    589		if (vhost_dev_has_owner(dev)) {
>    590			err = -EBUSY;
>    591			goto err_mm;
>    592		}
>    593	
>    594		vhost_attach_mm(dev);
>    595	
>    596		dev->kcov_handle = kcov_common_handle();
>    597		if (dev->use_worker) {
>    598			worker = kthread_create_for_user(vhost_worker, dev,
>  > 599							 current->real_cred->user,
>    600							 "vhost-%d", current->pid);

It looks like I should be doing something like get_uid(current_user())
then a free_uid() when doing using the user_struct.

Will fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ