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:   Mon, 22 Jan 2018 12:58:36 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     jglisse@...hat.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Ralph Campbell <rcampbell@...dia.com>
Subject: Re: [PATCH] mm/hmm: fix uninitialized use of 'entry' in
 hmm_vma_walk_pmd()

On Mon, 22 Jan 2018 13:57:59 -0500 jglisse@...hat.com wrote:

> From: Ralph Campbell <rcampbell@...dia.com>
> 
> The variable 'entry' is used before being initialized in
> hmm_vma_walk_pmd()
> 
> ...
>
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -418,7 +418,7 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp,
>  		}
>  
>  		if (!pte_present(pte)) {
> -			swp_entry_t entry;
> +			swp_entry_t entry = pte_to_swp_entry(pte);
>  
>  			if (!non_swap_entry(entry)) {
>  				if (hmm_vma_walk->fault)
> @@ -426,8 +426,6 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp,
>  				continue;
>  			}
>  
> -			entry = pte_to_swp_entry(pte);
> -
>  			/*
>  			 * This is a special swap entry, ignore migration, use
>  			 * device and report anything else as error.

Gee, how did that sneak through.  gcc not clever enough...

I'll add a cc:stable to this, even though the changelog didn't tell us what
the runtime effects of the bug are.  It should do so, so can you please
send us that description and I will add it, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ