Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
20 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files45
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- Kconfig
- LICENCE
- Makefile
- README.Locking
- TODO
- acl.c
- acl.h
- background.c
- build.c
- compr.c
- compr.h
- compr_lzo.c
- compr_rtime.c
- compr_rubin.c
- compr_zlib.c
- debug.c
- debug.h
- dir.c
- erase.c
- file.c
- fs.c
- gc.c
- ioctl.c
- jffs2_fs_i.h
- jffs2_fs_sb.h
- malloc.c
- nodelist.c
- nodelist.h
- nodemgmt.c
- os-linux.h
- read.c
- readinode.c
- scan.c
- security.c
- summary.c
- summary.h
- super.c
- symlink.c
- wbuf.c
- write.c
- writev.c
- xattr.c
- xattr.h
- xattr_trusted.c
- xattr_user.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
fs/jffs2/writev.c
C · 1,103 bytes/*
* JFFS2 -- Journalling Flash File System, Version 2.
*
* Copyright © 2001-2007 Red Hat, Inc.
*
* Created by David Woodhouse <[email protected]>
*
* For licensing information, see the file 'LICENCE' in this directory.
*
*/
#include <linux/kernel.h>
#include <linux/mtd/mtd.h>
#include "nodelist.h"
int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen)
{
if (!jffs2_is_writebuffered(c)) {
if (jffs2_sum_active()) {
int res;
res = jffs2_sum_add_kvec(c, vecs, count, (uint32_t) to);
if (res) {
return res;
}
}
}
return mtd_writev(c->mtd, vecs, count, to, retlen);
}
int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len,
size_t *retlen, const u_char *buf)
{
int ret;
ret = mtd_write(c->mtd, ofs, len, retlen, buf);
if (jffs2_sum_active()) {
struct kvec vecs[1];
int res;
vecs[0].iov_base = (unsigned char *) buf;
vecs[0].iov_len = len;
res = jffs2_sum_add_kvec(c, vecs, 1, (uint32_t) ofs);
if (res) {
return res;
}
}
return ret;
}