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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Apr 2019 15:48:17 +0800
From:   Chao Fan <fanc.fnst@...fujitsu.com>
To:     Dave Young <dyoung@...hat.com>
CC:     "bhe@...hat.com" <bhe@...hat.com>,
        Junichi Nomura <j-nomura@...jp.nec.com>,
        Borislav Petkov <bp@...en8.de>,
        "kasong@...hat.com" <kasong@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] x86/boot: Use efi_setup_data for searching RSDP on
 kexec-ed kernel

On Thu, Apr 04, 2019 at 03:41:02PM +0800, Dave Young wrote:
>Hi Chao,
>On 04/04/19 at 03:20pm, Chao Fan wrote:
>> On Thu, Apr 04, 2019 at 02:41:30PM +0800, Dave Young wrote:
>> >On 04/04/19 at 11:22am, Dave Young wrote:
>> >> On 04/04/19 at 11:10am, Baoquan He wrote:
>> >> > On 04/04/19 at 11:00am, Baoquan He wrote:
>> >> > > On 04/04/19 at 10:52am, Dave Young wrote:
>> >> > > > On 04/04/19 at 01:23am, Junichi Nomura wrote:
>> >> >  +	/* Save RSDP address for later use. */
>> >> >  +	boot_params->acpi_rsdp_addr = get_rsdp_addr();
>> >> >  +
>> >> >  +	error("Hang kernel for kexec debugging");
>> >> > 
>> >> > Sorry, here I means calling error() to hang kernel after calling
>> >> > get_rsdp_addr().
>> >> 
>> >> Thanks, it did not hang, it always reset to firmware/grub boot menu.
>> >> I'm pretty sure now the bug exists in get_rsdp_addr().
>> >
>> >static acpi_physical_address kexec_get_rsdp_addr(void)
>> >{
>> >...
>> >        /* Get systab from boot params. */
>> >        systab = (efi_system_table_64_t *) (ei->efi_systab | ((__u64)ei->efi_systab_hi << 32));
>> >        if (!systab)
>> >              error("EFI system table not found in kexec boot_params.");
>> > 
>> >...
>> >  -> add error("hang me") here will have a hang
>> >...
>> >        return __efi_get_rsdp_addr((unsigned long)esd->tables,
>> >                                   systab->nr_tables, true);
>> > 
>> 
>> I have an idea, but not sure whether is a problem.
>> In code of Nomura:
>> 
>> #if defined(CONFIG_EFI) && defined(CONFIG_X86_64)
>> [...]
>>         if (strncmp(sig, EFI64_LOADER_SIGNATURE, 4)) {
>>                 debug_putstr("Wrong kexec EFI loader signature.\n");
>>                 return 0;
>>         }
>> 
>>         /* Get systab from boot params. */
>>         systab = (efi_system_table_64_t *) (ei->efi_systab | ((__u64)ei->efi_systab_hi << 32));
>> [...]
>> #endif
>> 
>> After review agian, I wonder what will happen if 32bit-efi boot 64bit
>> OS.
>
>It is hard to find 32bit efi hardware, I can confirm all the laptop I
>have are 64bit efi.
>
>In case 32bit efi EFI64_LOADER_SIGNATURE checking will be false.

Yes, just when reviewing code, I notice this problem.

Thanks,
Chao Fan
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ