forked from Qortal/Brooklyn
2a709f28fa
* 0day explit mitigation * Memory corruption prevention * Privilege escalation prevention * Buffer over flow prevention * File System corruption defense * Thread escape prevention This may very well be the most intensive inclusion to BrooklynR. This will not be part of an x86 suite nor it will be released as tool kit. The security core toolkit will remain part of kernel base.
16 lines
310 B
C
16 lines
310 B
C
#include <linux/kernel.h>
|
|
#include <linux/grinternal.h>
|
|
#include <linux/module.h>
|
|
|
|
int gr_handle_new_usb(void)
|
|
{
|
|
#ifdef CONFIG_GRKERNSEC_DENYUSB
|
|
if (grsec_deny_new_usb) {
|
|
printk(KERN_ALERT "grsec: denied insert of new USB device\n");
|
|
return 1;
|
|
}
|
|
#endif
|
|
return 0;
|
|
}
|
|
EXPORT_SYMBOL_GPL(gr_handle_new_usb);
|