On Mon, 2011-06-13 at 15:03 +0100, Andy Whitcroft wrote:
> From: Timo Warns <Warns@pre-sense.de>
>
> commit 1eafbfeb7bdf59cfe173304c76188f3fd5f1fd05 upstream.
>
> The kernel automatically evaluates partition tables of storage devices.
> The code for evaluating OSF partitions contains a bug that leaks data
> from kernel heap memory to userspace for certain corrupted OSF
> partitions.
>
> In more detail:
>
> for (i = 0 ; i < le16_to_cpu(label->d_npartitions); i++, partition++) {
>
> iterates from 0 to d_npartitions - 1, where d_npartitions is read from
> the partition table without validation and partition is a pointer to an
> array of at most 8 d_partitions.
>
> Add the proper and obvious validation.
>
> Signed-off-by: Timo Warns <warns@pre-sense.de>
> Cc: stable@kernel.org
> [ Changed the patch trivially to not repeat the whole le16_to_cpu()
> thing, and to use an explicit constant for the magic value '8' ]
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
>
> (backported from 1eafbfeb7bdf59cfe173304c76188f3fd5f1fd05 upstream)
> CVE-2011-1163
> BugLink: http://bugs.launchpad.net/bugs/796606
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
06-14-2011, 07:28 AM
Brad Figg
Fix corrupted OSF partition table parsing
On 06/13/2011 03:03 PM, Andy Whitcroft wrote:
From: Timo Warns<Warns@pre-sense.de>
The kernel automatically evaluates partition tables of storage devices.
The code for evaluating OSF partitions contains a bug that leaks data
from kernel heap memory to userspace for certain corrupted OSF
partitions.
In more detail:
for (i = 0 ; i< le16_to_cpu(label->d_npartitions); i++, partition++) {
iterates from 0 to d_npartitions - 1, where d_npartitions is read from
the partition table without validation and partition is a pointer to an
array of at most 8 d_partitions.
Add the proper and obvious validation.
Signed-off-by: Timo Warns<warns@pre-sense.de>
Cc: stable@kernel.org
[ Changed the patch trivially to not repeat the whole le16_to_cpu()
thing, and to use an explicit constant for the magic value '8' ]
Signed-off-by: Linus Torvalds<torvalds@linux-foundation.org>