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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Oct 2010 16:24:03 -0400
From:	Dan Rosenberg <drosenberg@...curity.com>
To:	segooon@...il.com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: tidspbridge: fix signess error

It seems to me that in a lot of cases, signed types were used initially
with checks that the value was not below zero, but then unsigned types
were substituted due to problems later on (potentially security
related), and the checks were never removed.  Just because a check
doesn't make sense doesn't necessarily mean it's safe to revert an
unsigned type to a signed one - just be careful to make sure you're not
introducing any problems when you make these kinds of changes.  I have
no idea whether or not this is the case in this particular example.

> i was unsigned, so check for (i < 0) made no sense.  Made it signed.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
> ---
>  I cannot compile this driver, so it is not tested.
>  drivers/staging/tidspbridge/core/dsp-mmu.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> diff --git a/drivers/staging/tidspbridge/core/dsp-mmu.c b/drivers/staging/tidspbridge/core/dsp-mmu.c
> index 3c978f9..983c95a 100644
> --- a/drivers/staging/tidspbridge/core/dsp-mmu.c
> +++ b/drivers/staging/tidspbridge/core/dsp-mmu.c
> @@ -219,7 +219,8 @@ u32 user_to_dsp_map(struct iommu *mmu, u32 uva, u32 da, u32 size,
>  				struct page **usr_pgs)
>  {
>  	int res, w;
> -	unsigned pages, i;
> +	unsigned pages;
> +	int i;
>  	struct vm_area_struct *vma;
>  	struct mm_struct *mm = current->mm;
>  	struct sg_table *sgt;
> -- 
> 1.7.0.4


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