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:	Mon, 24 Sep 2012 18:17:57 +0800
From:	Gao feng <gaofeng@...fujitsu.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	Jan Engelhardt <jengelh@...i.de>,
	Stephen Hemminger <stephen.hemminger@...tta.com>,
	netdev@...r.kernel.org, davem@...emloft.net, kuznet@....inr.ac.ru
Subject: Re: [PATCH] inet_diag: make config INET_DIAG bool

于 2012年09月24日 17:42, Eric Dumazet 写道:
> In fact I didnt fully understand the problem you try to address.
> 
> If you want to prevent module being unloaded, you need to add proper
> module_get()/module_put()
> 
> So I would add a "struct module *module;" in struct sock_diag_handler
> and use it appropriately.

Yes, I try to add reference of the module,but I can't find a proper
location to call module_get and module_put.

module_get should be called when userspace program use netlink to
send dump request to the kernel,and module_put should be called when
the dump is completed. I am right?

BUT the userspace program may only call netlink_sendmsg without call
netlink_recvmsg.so the reference of the module will be incorrect.

> 
> But then, I might have totally misunderstood the problem.
> 
> Care to explain how you trigger the bug ?

It's very easy to trigger this bug,
you can exec "while :; do ss -a ; done" in one terminal
and exec "while :; do rmmod tcp_diag && rmmod inet_diag; done"
in another terminal.

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