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: <Pine.LNX.4.64N.0610311411000.2572@attu4.cs.washington.edu>
Date:	Tue, 31 Oct 2006 14:13:04 -0800 (PST)
From:	David Rientjes <rientjes@...washington.edu>
To:	Jesper Juhl <jesper.juhl@...il.com>
cc:	linux-kernel@...r.kernel.org, Giuliano Pochini <pochini@...ny.it>,
	Takashi Iwai <tiwai@...e.de>
Subject: Re: [PATCH] Fix potential NULL pointer dereference in echoaudio
 midi.

On Tue, 31 Oct 2006, Jesper Juhl wrote:

> In sound/pci/echoaudio/midi.c::snd_echo_midi_output_write(), there's a risk
> of dereferencing a NULL 'chip->midi_out'.
> This patch contains the obvious fix as also used a bit higher up in the 
> same function.
> 

How about just adding an early test:
	if (!chip->midi_out)
		goto out;

and adding a label for out before the chip->lock unlock?  We still need to 
clear chip->midi_full so we still require the spinlock, but there's no 
reason we should be testing chip->midi_out multiple times since the 
remaining code path in its entirety depends on it.

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