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-next>] [day] [month] [year] [list]
Message-ID: <496535D9.6040606@gmail.com>
Date:	Thu, 08 Jan 2009 00:08:09 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	David Howells <dhowells@...hat.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	James Morris <jmorris@...ei.org>
Subject: broken daemonize (COW credentials?)

Hi,

I'm observing daemonize crashes with this code:
static struct pid *pid;
static DECLARE_COMPLETION(comp);

static int bubak(void *data)
{
        daemonize("bubak");
        while (!signal_pending(current))
                msleep_interruptible(5000);
        complete_and_exit(&comp, 0);
        return 0;
}

static int init1(void) <-- module_init function
{
        int ret;

        ret = kernel_thread(bubak, NULL, 0);
        if (ret < 0)
                return ret;
        pid = find_get_pid(ret);
	return 0;
}
----------------------- cut here -------------------

This is due to:
daemonize
 -> exit_mm
   -> tsk->mm = NULL; (i.e. current->mm)
 -> reparent_to_kthreadd
   -> commit_creds
     -> set_dumpable(task->mm, suid_dumpable); (i.e. current->mm)

The culprit is probably COW credentials. David?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ