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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 9 Jan 2008 08:20:27 +1100
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	DM <dm.n9107@...il.com>, Arjan van de Ven <arjan@...radead.org>,
	linux-kernel@...r.kernel.org, ak@...e.de
Subject: Re: [patch 2/2] track and print last unloaded module in the oops trace

On Wednesday 09 January 2008 03:18:46 Ingo Molnar wrote:
> * DM <dm.n9107@...il.com> wrote:
> > On Jan 8, 2008 3:26 PM, Arjan van de Ven <arjan@...radead.org> wrote:
> > > > Why use sprintf? If a module name contains the % character we could
> > > > overflow the buffer. Or is module-unloading root-only and we don't
> > > > care?
> > >
> > > module loading isn't just root only; the name comes from an already
> > > loaded module. If you can load kernel modules of your choice you own
> > > the entire kernel already anway
> >
> > Still, strcpy seems like a better choice IMHO.
>
> agreed, this just isnt obvious IMO:
>
> +       sprintf(last_unloaded_module, mod->name);
>
> 	Ingo

Yes, I've changed it to:
+	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));

In my tree.

Thanks,
Rusty.
--
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