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:	Tue, 5 Aug 2014 12:10:11 +0200
From:	Philippe De Muyter <phdm@...qel.be>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Jens Axboe <axboe@...nel.dk>, Fabian Frederick <fabf@...net.be>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] partitions: aix.c: off by one bug

On Tue, Aug 05, 2014 at 11:09:59AM +0300, Dan Carpenter wrote:
> The lvip[] array has "state->limit" elements so the condition here
> should be >= instead of >.
> 
> Fixes: 6ceea22bbbc8 ('partitions: add aix lvm partition support files')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/block/partitions/aix.c b/block/partitions/aix.c
> index 0a6ed54..f3ed7b2 100644
> --- a/block/partitions/aix.c
> +++ b/block/partitions/aix.c
> @@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitions *state)
>  				continue;
>  			}
>  			lv_ix = be16_to_cpu(p->lv_ix) - 1;
> -			if (lv_ix > state->limit) {
> +			if (lv_ix >= state->limit) {
>  				cur_lv_ix = -1;
>  				continue;
>  			}

Acked-by: Philippe De Muyter <phdm@...qel.be>

Thanks

Did you encounter the bug in real life, or only by code review ?

If this has a real risk to happen, a pr_warn would be welcome.

Philippe

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
--
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