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:	Fri, 1 Mar 2013 13:31:59 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	markus@...ppelsdorf.de
Cc:	linux-kernel@...r.kernel.org, tj@...nel.org
Subject: Re: WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0()

On Thu, 28 Feb 2013 10:08:46 +0100
markus@...ppelsdorf.de wrote:

> Just hit the following warning on current git tree:
> 
> ------------[ cut here ]------------
> WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0()
> Hardware name: System Product Name
> Pid: 12366, comm: okular Not tainted 3.8.0-09633-g2a7d2b9-dirty #312
> Call Trace:
>  [<ffffffff8105b7a0>] ? warn_slowpath_common+0x60/0xa0
>  [<ffffffff811bf557>] ? idr_find_slowpath+0x97/0xc0
>  [<ffffffff811249f2>] ? inotify_idr_find_locked+0x32/0x80
>  [<ffffffff810ecf7d>] ? fput+0x1d/0xc0
>  [<ffffffff811254d0>] ? sys_inotify_rm_watch+0x50/0xc0
>  [<ffffffff814c9f58>] ? int_signal+0x12/0x17
>  [<ffffffff814c9d52>] ? system_call_fastpath+0x16/0x1b

okluar passed a negative `wd' into inotify_rm_watch()?

I wonder why it did that.  I doubt if inotify_add_watch() ever returns
negative descriptors, in which case I expect that okular's call to
inotify_add_watch() returned -1 and an errno and okular forgot to check
it, and later passed that -1 back into inotify_rm_watch().

Anyway, I guess we need to make inotify_add_watch() refuse to return
negative descriptors (presumably this is already the case due to idr
internals) and make inotify_rm_watch() trap negative values of `wd' up
front.

I wonder how many other such gremlins the IDR checking has added.
--
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