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]
Message-Id: <20080822.045402.32679253.davem@davemloft.net>
Date:	Fri, 22 Aug 2008 04:54:02 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.apana.org.au
Cc:	adobriyan@...il.com, den@...nvz.org, dlezcano@...ibm.com,
	netdev@...r.kernel.org
Subject: Re: 2.6.27-rc4: icmp_sk() uses smp_processor_id() in preemptible
 code

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Thu, 21 Aug 2008 22:50:00 +1000

> adobriyan@...il.com wrote:
> > Steps to reproduce:
> > 
> >        CONFIG_PREEMPT=y
> >        CONFIG_DEBUG_PREEMPT=y
> >        tracepath <something>
> > 
> > icmp6_sk() is similar (I haven't checked at runtime, though).
> > 
> > BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
> > caller is icmp_sk+0x15/0x30
> > Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1
> > 
> > Call Trace:
> > [<ffffffff8031af14>] debug_smp_processor_id+0xe4/0xf0
> > [<ffffffff80409405>] icmp_sk+0x15/0x30
> > [<ffffffff8040a17b>] icmp_send+0x4b/0x3f0
> 
> Caused by:
> 
> commit 405666db84b984b68fc75794069f424c02e5796c
> Author: Denis V. Lunev <den@...nvz.org>
> Date:   Fri Feb 29 11:16:46 2008 -0800
> 
>     [ICMP]: Pass proper ICMP socket into icmp(v6)_xmit_(un)lock.
> 
> We need to disable preemption (was provided by disabling BH) before
> getting the per-cpu ICMP socket.

Denis, please fix this.

The icmp_sk was always evaluated inside of icmp*_xmit_lock()
exactly because we needed the BH disabling in order for the
smp_processor_id() evaluation to be safe.

It's probably better to pass the namespace into the lock and
unlock routines.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ