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:	Tue, 31 Oct 2006 15:13:02 +1100
From:	Neil Brown <neilb@...e.de>
To:	"Akinobu Mita" <akinobu.mita@...il.com>
Cc:	"Trond Myklebust" <Trond.Myklebust@...app.com>,
	linux-kernel@...r.kernel.org,
	"Andy Adamson" <andros@...i.umich.edu>,
	"J. Bruce Fields" <bfields@...i.umich.edu>,
	"Olaf Kirch" <okir@...ad.swb.de>
Subject: Re: [PATCH 2/2] auth_gss: unregister gss_domain when unloading module

On Tuesday October 31, akinobu.mita@...il.com wrote:
> 
> But I noticed that even if we have this kind of smp-safe code, there
> is no guarantee that 2nd auth_domain_put() in
> svcauth_gss_unregister_pseudoflavor() is the last reference of
> this gss_domain.
> 
> So it is possible to happen invalid dereference by real last user of
> this gss_domain after unloading module. If this is not wrong,
> Is it neccesary to have try_get_module()/put_module() somewhere to
> prevent this?

After a quick look, it seems to me that one reasonable option would
be:

  svcauth_gss_register_pseudoflavor
     returns a void* which is 'new', and possible calls try_get_module(),
     failing if that fails. and
  svcauth_gss_unregister_pseudoflavor
     takes the void* (not a name) and calls auth_domain_put on it, and
     then calls put_module().

  'struct pf_desc' would have to gain a
        void * handle;
  to hold the returned value.

Would that solve the problem as you see it?

NeilBrown
-
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