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:	Sun, 20 May 2007 21:26:27 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Davi Arnaut <davi@...ent.com.br>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] signalfd: retrieve multiple signals with one read()
 call

On Sun, 20 May 2007 21:14:38 -0700 (PDT) Davide Libenzi <davidel@...ilserver.org> wrote:

> On Sun, 20 May 2007, Andrew Morton wrote:
> 
> > If 'count' is not a multiple of sizeof(struct signalfd_siginfo)), the read()
> > will return the next smallest multiple of `count'.
> > 
> > That is, unless `count' happens to be less than 1*sizeof(struct
> > signalfd_siginfo)), in which case we return -EINVAL.
> > 
> > This seems inconsistent.
> 
> I think it fits the rule "buffer must be big enough for at least one sigingo".
> We use the special return 0; as indicator that the process we were 
> monitoring signals, detached the sighand.
> 

hm.  Kernel violates proper read() semantics in many places.  Looks like we
just did it again.

> 
> > Also, I'm desperately hunting for the place where we zero out that local
> > siginfo_t, and I ain't finding it.  Someone please convince me that we're
> > not leaking bits of kernel memory out to userspace in that thing.
> 
> Hmm, __clear_user()?

oic, yes, that thing.  Usually we'd zero out the on-stack struct, assemble
it then copy out the whole thing.  I guess doing it the way you have saves
a few instructions.  But it's the cache hit against *uinfo which will have
most of the cost, and we can't do anything about that.

Unless we just remove the __clear_user() altogether.  Who said that "Unused
memebers should be zero"?

-
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