如何解决:模块验证失败:签名和/或所需密钥丢失 - 污染内核

时间:2018-05-30 09:45:19

标签: c linux linux-kernel

我一直在提供这段代码,但它似乎无法运作。

#include<linux/module.h>

int proc_init (void) {
  printk(KERN_INFO "helloModule: kernel module initialized\n");
  return 0;
}

void proc_cleanup(void) {
  printk(KERN_INFO "helloModule: performing cleanup of module\n");
}

MODULE_LICENSE("GPL");
module_init(proc_init);
module_exit(proc_cleanup);

这是给定的制造商档案:

CONFIG_MODULE_SIG=n

obj-m += helloModule.o

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

我被告知是否在制造商档案中我改变了:

CONFIG_MODULE_SIG=n to CONFIG_MODULE_SIG=0 

它会工作,但我仍然得到模块验证失败:签名。 如果它有帮助,以下是完整的结果:

[ 1092.186460] helloModule: module verification failed: signature and/or required key missing - tainting kernel
[ 1092.188510] helloModule: kernel module initialized
[ 2245.128462] helloModule: performing cleanup of module
[ 2250.667037] helloModule: kernel module initialized
[ 2305.815511] helloModule: performing cleanup of module
[ 2357.490185] helloModule: kernel module initialized
[ 2526.267464] usb 1-1: USB disconnect, device number 2
[ 2526.718539] usb 1-1: new full-speed USB device number 3 using ohci-pci
[ 2527.105378] usb 1-1: New USB device found, idVendor=80ee, idProduct=0021
[ 2527.105388] usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[ 2527.105393] usb 1-1: Product: USB Tablet
[ 2527.105399] usb 1-1: Manufacturer: VirtualBox
[ 2527.152019] input: VirtualBox USB Tablet as /devices/pci0000:00/0000:00:06.0/usb1/1-1/1-1:1.0/0003:80EE:0021.0002/input/input8
[ 2527.232240] hid-generic 0003:80EE:0021.0002: input,hidraw0: USB HID v1.10 Mouse [VirtualBox USB Tablet] on usb-0000:00:06.0-1/input0
[ 2865.057333] helloModule: performing cleanup of module
[ 2888.205365] helloModule: kernel module initialized
[ 3021.971994] helloModule: performing cleanup of module
[ 3045.980743] helloModule: kernel module initialized
[ 3358.220063] helloModule: performing cleanup of module
[ 3438.762378] helloModule: kernel module initialized
[ 3950.763573] helloModule: performing cleanup of module
[ 4001.871200] helloModule: kernel module initialized
[ 4146.644108] helloModule: performing cleanup of module
[ 4230.781248] helloModule: kernel module initialized
[ 4354.724930] helloModule: performing cleanup of module
[ 4356.440943] helloModule: kernel module initialized
[ 4376.318716] helloModule: performing cleanup of module

我的ubuntu版本是16.04 LTS

0 个答案:

没有答案