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] [day] [month] [year] [list]
Message-ID: <20080116100414.GA27576@clifford.at>
Date:	Wed, 16 Jan 2008 11:04:14 +0100
From:	Clifford Wolf <clifford@...fford.at>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rlim in proc/<pid>/status (2nd rev.)

Hi,

On Wed, Jan 16, 2008 at 04:33:12PM +0900, KOSAKI Motohiro wrote:
> Hi Clifford,
> 
> > +static inline char *task_rlim(struct task_struct *p, char *buffer)
> > +{
> > +	unsigned long flags;
> > +	struct rlimit rlim[RLIM_NLIMITS];
> > +	int i;
> > +	
> > +	rcu_read_lock();
> > +	if (lock_task_sighand(p, &flags)) {
> > +		for (i=0; i<RLIM_NLIMITS; i++)
> > +			rlim[i] = p->signal->rlim[i];
> > +		unlock_task_sighand(p, &flags);
> > +	}
> 
> lock_task_sighand is possible return NULL?
> if so, rlim is uninitialized when NULL.

hmm.. can p->sighand be NULL here? If so, there also is a problem in the
task_sig() function in the same file.

In fact that code is copy&paste from task_sig(). In fact I'm not even sure
if I actually need to lock anything to access p->signal->rlim.. I've
searched the kernel code a bit and it looks like most acesses to the rlimits
are done unlocked, which is no problem imo given the typical change-pattern
of this values..

anyone a clue on this issues?

yours,
 - clifford

-- 
2B OR (NOT 2B) That is the question. The answer is FF.
--
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