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: <m2bp38r33j.fsf@igel.home>
Date:	Sat, 22 Jan 2011 23:22:08 +0100
From:	Andreas Schwab <schwab@...ux-m68k.org>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	Lasse Collin <lasse.collin@...aani.org>,
	linux-kernel@...r.kernel.org
Subject: Re: Possible array overrun in lzma_reset()

Jesper Juhl <jj@...osbits.net> writes:

> 787  		probs = s->lzma.is_match[0];
> At conditional (1): "i < 14134UL" taking true path
> At conditional (2): "i < 14134UL" taking true path
> At conditional (3): "i < 14134UL" taking true path
> 788  		for (i = 0; i < PROBS_TOTAL; ++i)
> Event overrun-local: Overrunning static array of size 32 bytes at byte position 28266 by indexing pointer "probs" with index variable "i".
> Event overrun-local: Note: These bugs are often difficult to see at first glance. Coverity recommends a close inspection of the events leading to this overrun.
> 789  			probs[i] = RC_BIT_MODEL_TOTAL / 2;
> ...
>
> I looked into the report and found that 's->lzma.is_match' is
> 	uint16_t is_match[STATES][POS_STATES_MAX]
> where 'STATES' is '#define STATES 12' and 'POS_STATES_MAX' is '#define POS_STATES_MAX (1 << 4)'.
>
> So I think the checker has a point.

The loop treats the part of the structure from is_match to the end as a
single array of PROBS_TOTAL uint16_t (which it is, in effect).

Andreas.

-- 
Andreas Schwab, schwab@...ux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
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