Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
19 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files16
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- Makefile.am
- list.h
- names.c
- names.h
- sysfs_utils.c
- sysfs_utils.h
- usbip_common.c
- usbip_common.h
- usbip_device_driver.c
- usbip_device_driver.h
- usbip_host_common.c
- usbip_host_common.h
- usbip_host_driver.c
- usbip_host_driver.h
- vhci_driver.c
- vhci_driver.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tools/usb/usbip/libsrc/sysfs_utils.c
C · 562 bytes// SPDX-License-Identifier: GPL-2.0
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "sysfs_utils.h"
#include "usbip_common.h"
int write_sysfs_attribute(const char *attr_path, const char *new_value,
size_t len)
{
int fd;
int length;
fd = open(attr_path, O_WRONLY);
if (fd < 0) {
dbg("error opening attribute %s", attr_path);
return -1;
}
length = write(fd, new_value, len);
if (length < 0) {
dbg("error writing to attribute %s", attr_path);
close(fd);
return -1;
}
close(fd);
return 0;
}