Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1165005

kexec_load(2) bypasses signature verification

From Theodore Ts'o <tytso@mit.edu>
Newsgroups linux.kernel
Subject kexec_load(2) bypasses signature verification
Date 2015-06-15 06:00 +0200
Message-ID <pBtJ0-8R-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From experimentation and from looking at the sources, it appears that
the signature checking is only done in the kexec_file_load(2) system
all, and not in the kexec_load(2) system call.  And I understand why
-- the signature is not sent from userspace to the kernel in the older
kexec_load(2) system call.

The problem is that if you use an old version of kexec, it will use
the old kexec_load(2) system call, and even though
CONFIG_KEXEC_VERIFY_SIG is enabled, kexec_load(2) will happily load an
unsigned kernel, and then "kexec -e" will happily boot into it.

Correct me if I am wrong, but this appears to be a hole in Secure Boot
you could drive a Mack Truck through.

(I noticed this because Debian is still using a kexec-tools from the
stone ages, version 2.0.7, and I was wondering **why** I was able to
kexec boot completely unsigned kernels.)

It would appear to me that if CONFIG_KEXEC_VERIFY_SIG is enabled, the
old kexec_load(2) system call should be disabled (and a warning be
placed in the Kconfig help that the user should have at least verision
2.X of kexec-tools if they enable this kernel option).

Am I missing something?

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

kexec_load(2) bypasses signature verification Theodore Ts'o <tytso@mit.edu> - 2015-06-15 06:00 +0200
  Re: kexec_load(2) bypasses signature verification Theodore Ts'o <tytso@mit.edu> - 2015-06-15 22:10 +0200
    Re: kexec_load(2) bypasses signature verification ebiederm@xmission.com (Eric W. Biederman) - 2015-06-16 21:50 +0200
      Re: kexec_load(2) bypasses signature verification Vivek Goyal <vgoyal@redhat.com> - 2015-06-16 22:30 +0200
        Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-18 03:20 +0200
          Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-18 04:10 +0200
            Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-19 08:30 +0200
              Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-19 10:20 +0200
                Re: kexec_load(2) bypasses signature verification Vivek Goyal <vgoyal@redhat.com> - 2015-06-19 15:10 +0200
        Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-19 09:10 +0200
          Re: kexec_load(2) bypasses signature verification Vivek Goyal <vgoyal@redhat.com> - 2015-06-19 15:10 +0200
    Re: kexec_load(2) bypasses signature verification Dave Young <dyoung@redhat.com> - 2015-06-18 03:30 +0200

csiph-web