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, 1 Aug 2011 22:26:16 +0200
From:	Oliver Neukum <oliver@...kum.org>
To:	Josh Boyer <jwboyer@...hat.com>
Cc:	Oliver Neukum <oliver@...kum.name>,
	"Greg Kroah-Hartman" <gregkh@...e.de>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: cdc_ncm uses stack memory for DMA

Am Montag, 1. August 2011, 21:59:50 schrieb Josh Boyer:

Hi,

> Looking through the code, it seems that cdc_ncm_setup is still passing
> stack variables around lines 270, 276, 375, and 406.  Which of those
> exactly is triggering the backtrace, I'm not sure but all of them seem
> incorrect from what I can tell.

They are incorrect.
 
> Do you have any thoughts on a solution for this?  Off the top of my
> head, either the local variables being used could be added to the ctx

Careful. You also need to confirm to the rules about cached coherency
on some architectures. You cannot do DMA into the middle of a structure
unless you are sure it is not touched any other way.

> structure or the variables can be changed to pointers and then be
> allocated via kmalloc and torn down shortly after.

This looks like the easiest way.

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