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: <780588F2-6183-44B3-8EB8-CB82FB3DD8A7@gmail.com>
Date:	Sun, 8 Jan 2012 07:45:09 -0500
From:	Xi Wang <xi.wang@...il.com>
To:	Takashi Iwai <tiwai@...e.de>
Cc:	Jaroslav Kysela <perex@...ex.cz>,
	Clemens Ladisch <clemens@...isch.de>,
	Daniel Mack <zonque@...il.com>,
	Wolfgang Breyha <wbreyha@....net>, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()

On Jan 8, 2012, at 4:09 AM, Takashi Iwai wrote:
> As of now, I have little time to evaluate, so I might have missed
> something, but I wonder whether 
> 
> 		/* avoid overflow */
> 		if (nr_rates == KMALLOC_MAX_SIZE / sizeof(int))
> 			break;
> 
> is the best way to check.  This looks ugly to me.
> If we need to limit the number of rates, better to define some proper
> numbers as the upper limit.  And then, it should warn, not only
> breaking loop.

Thanks for looking into this.  Yeah, I agree using something like
MAX_NR_RATES is better.  Is 65535 okay or do we need a larger limit?

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