func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
divide_look_behind_alternatives(Node* node) { Node *head, *np, *insert_node; AnchorNode* an = ANCHOR_(node); int anc_type = an->type; head = NODE_ANCHOR_BODY(an); np = NODE_CAR(head); swap_node(node, head); NODE_CAR(node) = head; NODE_BODY(head) = np; np = node; while (IS_NOT_NULL(np = NODE_CDR(np...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
104,426,624,573,709,960,000,000,000,000,000,000,000
28
fix #87: Read unknown address in onig_error_code_to_str()
void tracing_off(void) { tracer_tracing_off(&global_trace); }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
324,380,580,455,878,400,000,000,000,000,000,000,000
4
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
void CalendarRegressionTest::TestJ81() { UErrorCode status = U_ZERO_ERROR; UnicodeString temp, temp2, temp3; int32_t i; GregorianCalendar cal(TimeZone::createTimeZone("GMT"), Locale::getUS(), status); SimpleDateFormat fmt("HH:mm 'w'w 'd'D E d MMM yyyy", Locale::getUS(), status); if (U_FAILURE(st...
0
[ "CWE-190" ]
icu
71dd84d4ffd6600a70e5bca56a22b957e6642bd4
292,418,688,981,730,730,000,000,000,000,000,000,000
208
ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J X-SVN-Rev: 40654
int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high) { struct net *net = xs_net(x); unsigned int h; struct xfrm_state *x0; int err = -ENOENT; __be32 minspi = htonl(low); __be32 maxspi = htonl(high); u32 mark = x->mark.v & x->mark.m; spin_lock_bh(&x->lock); if (x->km.state == XFRM_STATE_DEAD) goto unl...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
45,274,203,190,595,850,000,000,000,000,000,000,000
53
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
pixRemoveUnusedColors(PIX *pixs) { l_int32 i, j, w, h, d, nc, wpls, val, newval, index, zerofound; l_int32 rval, gval, bval; l_uint32 *datas, *lines; l_int32 *histo, *map1, *map2; PIXCMAP *cmap, *cmapd; PROCNAME("pixRemoveUnusedColors"); if (!pixs) return ERROR_INT("pixs not defined",...
0
[ "CWE-125" ]
leptonica
5ee24b398bb67666f6d173763eaaedd9c36fb1e5
27,824,933,983,351,387,000,000,000,000,000,000,000
120
Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow * color quantized pix must be 8 bpp before extra colors are added.
static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, size_t len, unsigned int flags) { struct fuse_file *ff_in = file_in->private_data; struct fuse_file *ff_out = file_out->private_data; struct inode *inode_in = file_inode(file_in); st...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
101,530,334,017,907,560,000,000,000,000,000,000,000
108
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
static int io_recv(struct io_kiocb *req, bool force_nonblock, struct io_comp_state *cs) { return -EOPNOTSUPP; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
169,976,707,651,433,410,000,000,000,000,000,000,000
5
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
void Statement::Work_AfterRun(napi_env e, napi_status status, void* data) { std::unique_ptr<RunBaton> baton(static_cast<RunBaton*>(data)); Statement* stmt = baton->stmt; Napi::Env env = stmt->Env(); Napi::HandleScope scope(env); if (stmt->status != SQLITE_ROW && stmt->status != SQLITE_DONE) { ...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
39,445,217,580,240,854,000,000,000,000,000,000,000
24
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
START_TEST(evdev_abs_parser) { struct test { uint32_t which; const char *prop; int min, max, res, fuzz, flat; } tests[] = { { .which = (ABS_MASK_MIN|ABS_MASK_MAX), .prop = "1:2", .min = 1, .max = 2 }, { .which = (ABS_MASK_MIN|ABS_MASK_MAX), .prop = "1:2:", .min = 1, .max = 2 }, { .which =...
0
[ "CWE-134" ]
libinput
562157f2a56537f353ca49b194efeb770004ba63
154,773,069,612,982,490,000,000,000,000,000,000,000
75
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static void dodaemonize(void) { pid_t child; unsigned int i; /* Contributed by Jason Lunz - also based on APUI code, see open_max() */ if (daemonize != 0) { if ((child = fork()) == (pid_t) -1) { perror(MSG_STANDALONE_FAILED " - fork"); logfile(LOG_ERR, MSG_STANDALONE_FAI...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
18,891,714,945,568,480,000,000,000,000,000,000,000
36
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
int ssl3_send_server_key_exchange(SSL *s) { #ifndef OPENSSL_NO_RSA unsigned char *q; int j,num; RSA *rsa; unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH]; unsigned int u; #endif #ifndef OPENSSL_NO_DH DH *dh=NULL,*dhp; #endif #ifndef OPENSSL_NO_ECDH EC_KEY *ecdh=NULL, *ecdhp; unsigned char *encodedPoi...
0
[ "CWE-310" ]
openssl
ce325c60c74b0fa784f5872404b722e120e5cab0
223,657,061,990,513,000,000,000,000,000,000,000,000
491
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image, const CacheView_ *image_view,const PixelInterpolateMethod method, const double x,const double y,PixelInfo *pixel,ExceptionInfo *exception) { MagickBooleanType status; double alpha[16], gamma; PixelInfo pixels[16]; reg...
1
[ "CWE-190" ]
ImageMagick
406da3af9e09649cda152663c179902edf5ab3ac
218,986,959,528,004,350,000,000,000,000,000,000,000
441
https://github.com/ImageMagick/ImageMagick/issues/1732
void cil_destroy_typeattribute(struct cil_typeattribute *attr) { if (attr == NULL) { return; } cil_symtab_datum_destroy(&attr->datum); if (attr->expr_list != NULL) { /* we don't want to destroy the expression stacks (cil_list) inside * this list cil_list_destroy destroys sublists, so we need to do it * ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
137,306,298,711,142,670,000,000,000,000,000,000,000
25
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
RemoteFsDevice::~RemoteFsDevice() { }
0
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
186,257,674,153,916,800,000,000,000,000,000,000,000
2
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
const CString& CUser::GetPass() const { return m_sPass; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
119,988,719,181,315,340,000,000,000,000,000,000,000
1
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static bool xhci_er_full(void *opaque, int version_id) { struct XHCIInterrupter *intr = opaque; return intr->er_full; }
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
160,220,418,944,558,220,000,000,000,000,000,000,000
5
xhci: guard xhci_kick_epctx against recursive calls Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9...
const CImg<T>& save_cimg(std::FILE *const file, const unsigned int n0, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0) const { CImgList<T>(*this,true).save_cimg(file,n0,x0,y0,z0,c...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
316,256,534,889,225,300,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
asn1_der_decoding_element (asn1_node * structure, const char *elementName, const void *ider, int len, char *errorDescription) { asn1_node node, p, p2, p3, nodeFound = NULL; char temp[128], currentName[ASN1_MAX_NAME_SIZE * 10], *dot_p, *char_p; int nameLen = ASN1_MAX_NAME_SIZE * 10 - 1, state; int counter,...
0
[ "CWE-476" ]
libtasn1
53958290ab731c8486531a3bdef54a933533579d
176,979,854,995,309,570,000,000,000,000,000,000,000
755
Allow a NULL value in asn1_read_value() for all types.
process_system_pointer_pdu(STREAM s) { uint32 system_pointer_type; logger(Protocol, Debug, "%s()", __func__); in_uint32_le(s, system_pointer_type); set_system_pointer(system_pointer_type); }
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
26,603,234,949,718,550,000,000,000,000,000,000,000
9
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
int __init atalk_register_sysctl(void) { atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table); if (!atalk_table_header) return -ENOMEM; return 0; }
0
[ "CWE-416" ]
linux
6377f787aeb945cae7abbb6474798de129e1f3ac
338,581,277,788,436,000,000,000,000,000,000,000,000
7
appletalk: Fix use-after-free in atalk_proc_exit KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr ffff8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440...
void ServerConnectionImpl::sendProtocolError() { // We do this here because we may get a protocol error before we have a logical stream. Higher // layers can only operate on streams, so there is no coherent way to allow them to send an error // "out of band." On one hand this is kind of a hack but on the other ha...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
174,442,321,659,922,830,000,000,000,000,000,000,000
13
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
GF_Err tfxd_box_size(GF_Box *s) { s->size += 20; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
308,533,652,665,743,570,000,000,000,000,000,000,000
5
fixed #1587
char ssl3_cbc_record_digest_supported(const EVP_MD *digest) { #ifdef OPENSSL_FIPS if (FIPS_mode()) return 0; #endif switch (digest->type) { case NID_md5: case NID_sha1: case NID_sha224: case NID_sha256: case NID_sha384: case NID_sha512: return 1; default: return 0; } }
1
[ "CWE-310" ]
openssl
1909df070fb5c5b87246a2de19c17588deba5818
310,891,814,681,686,500,000,000,000,000,000,000,000
19
Don't access EVP_MD internals directly.
static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) { struct hci_dev *hdev = hcon->hdev; struct sco_conn *conn = hcon->sco_data; if (conn || status) return conn; conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC); if (!conn) return NULL; spin_lock_init(&conn->lock); hcon->sco_data =...
0
[ "CWE-200" ]
linux
c4c896e1471aec3b004a693c689f60be3b17ac86
114,365,919,438,504,280,000,000,000,000,000,000,000
29
Bluetooth: sco: fix information leak to userspace struct sco_conninfo has one padding byte in the end. Local variable cinfo of type sco_conninfo is copied to userspace with this uninizialized one byte, leading to old stack contents leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. ...
static int __ffs_data_do_os_desc(enum ffs_os_desc_type type, struct usb_os_desc_header *h, void *data, unsigned len, void *priv) { struct ffs_data *ffs = priv; u8 length; ENTER(); switch (type) { case FFS_OS_DESC_EXT_COMPAT: { struct usb_ext_compat_desc *d = data; int i; if (len < sizeof(*d) || ...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
196,842,074,007,807,320,000,000,000,000,000,000,000
59
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
void CZNC::DestroyInstance() { delete s_pZNC; s_pZNC = nullptr; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
322,545,215,431,008,450,000,000,000,000,000,000,000
4
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static char *perform_io(size_t needed, int flags) { fd_set r_fds, e_fds, w_fds; struct timeval tv; int cnt, max_fd; size_t empty_buf_len = 0; xbuf *out; char *data; if (iobuf.in.len == 0 && iobuf.in.pos != 0) { if (iobuf.raw_input_ends_before) iobuf.raw_input_ends_before -= iobuf.in.pos; iobuf.in.pos = 0...
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
302,353,375,460,608,700,000,000,000,000,000,000,000
358
Some extra file-list safety checks.
GF_Err mfro_dump(GF_Box *a, FILE * trace) { GF_MovieFragmentRandomAccessOffsetBox *p = (GF_MovieFragmentRandomAccessOffsetBox *)a; gf_isom_box_dump_start(a, "MovieFragmentRandomAccessOffsetBox", trace); fprintf(trace, "container_size=\"%d\" >\n", p->container_size); gf_isom_box_dump_done("MovieFragmentRandomAcces...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
109,661,781,382,058,860,000,000,000,000,000,000,000
10
fixed 2 possible heap overflows (inc. #1088)
int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, gpa_t addr, int len) { struct kvm_io_range *range, key; int off; key = (struct kvm_io_range) { .addr = addr, .len = len, }; range = bsearch(&key, bus->range, bus->dev_count, sizeof(struct kvm_io_range), kvm_io_bus_sort_cmp); if (range == NULL) ...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
166,630,637,713,358,610,000,000,000,000,000,000,000
23
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static int btrfs_prepare_sprout(struct btrfs_fs_info *fs_info) { struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; struct btrfs_fs_devices *old_devices; struct btrfs_fs_devices *seed_devices; struct btrfs_super_block *disk_super = fs_info->super_copy; struct btrfs_device *device; u64 super_flags; lockd...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
308,697,774,030,248,500,000,000,000,000,000,000,000
59
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
lexer_token_is_let (parser_context_t *context_p) /**< context */ { JERRY_ASSERT (context_p->token.type == LEXER_LITERAL); return (context_p->token.keyword_type == LEXER_KEYW_LET && !context_p->token.lit_location.has_escape); } /* lexer_token_is_let */
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
131,800,027,532,825,640,000,000,000,000,000,000,000
7
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
decode_ofpat_set_field(const struct ofp12_action_set_field *oasf, bool may_mask, const struct vl_mff_map *vl_mff_map, uint64_t *tlv_bitmap, struct ofpbuf *ofpacts) { struct ofpbuf b = ofpbuf_const_initializer(oasf, ntohs(oasf->len)); ofpbuf_pull(&b, OBJECT_OFFSETOF(...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
106,515,453,054,483,420,000,000,000,000,000,000,000
58
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int mp_add_one_port(struct uart_driver *drv, struct sb_uart_port *port) { struct sb_uart_state *state; int ret = 0; if (port->line >= drv->nr) return -EINVAL; state = drv->state + port->line; MP_MUTEX_LOCK(mp_mutex); if (state->port) { ret = -EINVAL; goto out; } state->port = port; spin_lock...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
145,511,423,901,457,960,000,000,000,000,000,000,000
33
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
get_pubkey_end (GETKEY_CTX ctx) { getkey_end (ctx); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
118,339,536,251,818,600,000,000,000,000,000,000,000
4
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static void cmd_parse_lsub(struct ImapData *idata, char *s) { char buf[STRING]; char errstr[STRING]; struct Buffer err, token; struct Url url; struct ImapList list; if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST) { /* caller will handle response itself */ cmd_parse_list(idata, s); retur...
1
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
237,931,988,464,177,260,000,000,000,000,000,000,000
46
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
static void settings_init(void) { settings.use_cas = true; settings.access = 0700; settings.port = 11211; settings.udpport = 0; #ifdef TLS settings.ssl_enabled = false; settings.ssl_ctx = NULL; settings.ssl_chain_cert = NULL; settings.ssl_key = NULL; settings.ssl_verify_mode = SSL_VE...
0
[ "CWE-125" ]
memcached
554b56687a19300a75ec24184746b5512580c819
106,685,386,222,923,390,000,000,000,000,000,000,000
70
fix strncpy call to avoid ASAN violation Ensure we're only reading to the size of the smallest buffer, since they're both on the stack and could potentially overlap. Overlapping is defined as ... undefined behavior. I've looked through all available implementations of strncpy and they still only copy from the first \0...
lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile) { /* i_ctx_p is NULL running arg (@) files. * lib_path and mem are never NULL */ bool starting_arg_file = (i_ctx_p == ...
1
[]
ghostpdl
407cc61e87b0fd9d44d72ca740af7d3c85dee78d
169,955,689,528,299,250,000,000,000,000,000,000,000
58
"starting_arg_file" should only apply once. The "starting_arg_file == true" setting should apply to the *first* call to lib_file_open() in the context of a given call to runarg(). Previously, it remained set for the entire duration of the runarg() call, resulting in the current directory being searched for any resourc...
static inline int security_socket_getpeername(struct socket *sock) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
219,537,118,680,180,800,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
bool operator!=(const StringVal& other) const { return !(*this == other); }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
67,438,041,628,760,450,000,000,000,000,000,000,000
1
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
ciphertext_to_compressed (gnutls_session_t session, gnutls_datum_t *ciphertext, opaque * compress_data, int compress_size, uint8_t type, record_parameters_st * params, uint64* sequence) { ...
0
[ "CWE-310" ]
gnutls
35e26ca63c6da01db460d93e9c4bf86cd668534c
306,660,245,715,549,470,000,000,000,000,000,000,000
176
provide less timing information when decoding packets. Patch by Nadhem Alfardan.
static int read_or_initialize_metadata(struct dentry *dentry) { struct inode *inode = d_inode(dentry); struct ecryptfs_mount_crypt_stat *mount_crypt_stat; struct ecryptfs_crypt_stat *crypt_stat; int rc; crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; mount_crypt_stat = &ecryptfs_superblock_to_private...
0
[ "CWE-119", "CWE-787" ]
linux
f0fe970df3838c202ef6c07a4c2b36838ef0a88b
71,690,700,696,231,310,000,000,000,000,000,000,000
41
ecryptfs: don't allow mmap when the lower fs doesn't support it There are legitimate reasons to disallow mmap on certain files, notably in sysfs or procfs. We shouldn't emulate mmap support on file systems that don't offer support natively. CVE-2016-1583 Signed-off-by: Jeff Mahoney <jeffm@suse.com> Cc: stable@vger....
static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_time, int flags) { MOVContext *mc = s->priv_data; AVStream *st; FFStream *sti; int sample; int i; if (stream_index >= s->nb_streams) return AVERROR_INVALIDDATA; st = s->streams[stream_index]; sti = ff...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
208,479,973,257,482,330,000,000,000,000,000,000,000
55
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void initialize() override { use_lds_ = false; test_skipped_ = false; // Controls how many addFakeUpstream() will happen in // BaseIntegrationTest::createUpstreams() (which is part of initialize()). // Make sure this number matches the size of the 'clusters' repeated field in the bootstrap // ...
1
[ "CWE-703", "CWE-674" ]
envoy
4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31
26,348,060,345,621,710,000,000,000,000,000,000,000
52
CVE-2022-23606 Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed. Signed-off-by: Yan Avlasov <yavlasov@google.com>
test_length(header_field_info *hfinfo, tvbuff_t *tvb, gint start, gint length, const guint encoding) { gint size = length; if (!tvb) return; if ((hfinfo->type == FT_STRINGZ) || ((encoding & (ENC_VARIANT_MASK)) && (IS_FT_UINT(hfinfo->type) || IS_FT_INT(hfinfo->type)))) { /* If we're fetching unt...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
84,999,906,225,706,370,000,000,000,000,000,000,000
20
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, struct ieee80211_fast_rx *fast_rx) { struct sk_buff *skb = rx->skb; struct ieee80211_hdr *hdr = (void *)skb->data; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct sta_info *sta = rx->sta; int orig_len = skb->len; int ...
0
[]
linux
588f7d39b3592a36fb7702ae3b8bdd9be4621e2f
133,455,475,951,001,100,000,000,000,000,000,000,000
207
mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
ArgParser::argHelp() { std::cout // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 << "Usage: qpdf [ options ] { infilename | --empty } [ outfilename ]\n" << "\n" << "An option summary appears below. Please see the documentation for details.\n" ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
294,408,835,456,955,300,000,000,000,000,000,000,000
411
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
mb_tail_off(char_u *base, char_u *p) { int i; int j; if (*p == NUL) return 0; if (enc_utf8) { // Find the last character that is 10xx.xxxx for (i = 0; (p[i + 1] & 0xc0) == 0x80; ++i) ; // Check for illegal sequence. for (j = 0; p - j > base; ++j) if ((p[-j] & 0xc0) != 0x80) brea...
0
[ "CWE-122", "CWE-787" ]
vim
f6d39c31d2177549a986d170e192d8351bd571e2
139,848,185,002,604,840,000,000,000,000,000,000,000
30
patch 9.0.0220: invalid memory access with for loop over NULL string Problem: Invalid memory access with for loop over NULL string. Solution: Make sure mb_ptr2len() consistently returns zero for NUL.
int wsgi_req_simple_accept(struct wsgi_request *wsgi_req, int fd) { wsgi_req->fd = wsgi_req->socket->proto_accept(wsgi_req, fd); if (wsgi_req->fd < 0) { return -1; } uwsgi_post_accept(wsgi_req); return 0; }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
252,661,979,244,469,600,000,000,000,000,000,000,000
12
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
static int check_helper_call(struct bpf_verifier_env *env, int func_id, int insn_idx) { const struct bpf_func_proto *fn = NULL; struct bpf_reg_state *regs; struct bpf_call_arg_meta meta; bool changes_data; int i, err; /* find function prototype */ if (func_id < 0 || func_id >= __BPF_FUNC_MAX_ID) { verbose(env...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
70,859,981,957,250,530,000,000,000,000,000,000,000
258
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
TEST_F(ExpressionTruncTest, DoubleArg) { assertEvaluates(Value(2.0), Value(2.0)); assertEvaluates(Value(-2.0), Value(-2.0)); assertEvaluates(Value(0.9), Value(0.0)); assertEvaluates(Value(0.1), Value(0.0)); assertEvaluates(Value(-1.2), Value(-1.0)); assertEvaluates(Value(-1.7), Value(-1.0)); ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
273,004,351,502,593,240,000,000,000,000,000,000,000
15
SERVER-38070 fix infinite loop in agg expression
static int verify_address_len(const void *p) { const struct sadb_address *sp = p; const struct sockaddr *addr = (const struct sockaddr *)(sp + 1); const struct sockaddr_in *sin; #if IS_ENABLED(CONFIG_IPV6) const struct sockaddr_in6 *sin6; #endif int len; if (sp->sadb_address_len < DIV_ROUND_UP(sizeof(*sp) +...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
92,141,699,364,073,120,000,000,000,000,000,000,000
45
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
void pointZZ_pShamirsTrick(PointZZ_p * rop, const PointZZ_p * point1, const mpz_t scalar1, const PointZZ_p * point2, const mpz_t scalar2, const CurveZZ_p * curve) { PointZZ_p sum, tmp; mpz_inits(sum.x, sum.y, tmp.x, tmp.y, NULL); pointZZ_pAdd(&sum, point1, point2, curve); int scalar1Bits = mpz_size...
0
[ "CWE-347" ]
fastecdsa
e592f106edd5acf6dacedfab2ad16fe6c735c9d1
67,331,460,439,417,100,000,000,000,000,000,000,000
41
Properly handle the point at infinity
static pyc_object *get_ascii_object(RzBuffer *buffer) { bool error = false; ut32 n = 0; n = get_ut32(buffer, &error); if (error) { return NULL; } return get_ascii_object_generic(buffer, n, true); }
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
48,306,463,905,877,150,000,000,000,000,000,000,000
10
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* indices = GetInput(context, node, kIndices); const TfLiteTensor* updates = GetInput(context, node, kUpdates); const TfLiteTenso...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
52,518,916,509,376,470,000,000,000,000,000,000,000
49
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static int l2tp_ip_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) { struct sockaddr_l2tpip *lsa = (struct sockaddr_l2tpip *) uaddr; int rc; if (sock_flag(sk, SOCK_ZAPPED)) /* Must bind first - autobinding does not work */ return -EINVAL; if (addr_len < sizeof(*lsa)) return -EINVAL; if (ipv4_...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
137,144,964,294,721,940,000,000,000,000,000,000,000
30
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
_PyMemoTable_Lookup(PyMemoTable *self, PyObject *key) { size_t i; size_t perturb; size_t mask = self->mt_mask; PyMemoEntry *table = self->mt_table; PyMemoEntry *entry; Py_hash_t hash = (Py_hash_t)key >> 3; i = hash & mask; entry = &table[i]; if (entry->me_key == NULL || entry->me_ke...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
107,036,413,830,748,000,000,000,000,000,000,000,000
22
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit) { struct commit_list **pp, *parent; struct treesame_state *ts = NULL; int relevant_change = 0, irrelevant_change = 0; int relevant_parents, nth_parent; /* * If we don't do pruning, everything is interesting */ if (!revs->prune) ...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
233,491,080,499,689,140,000,000,000,000,000,000,000
126
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
static void rbd_slab_exit(void) { rbd_assert(rbd_obj_request_cache); kmem_cache_destroy(rbd_obj_request_cache); rbd_obj_request_cache = NULL; rbd_assert(rbd_img_request_cache); kmem_cache_destroy(rbd_img_request_cache); rbd_img_request_cache = NULL; }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
295,090,636,086,613,770,000,000,000,000,000,000,000
10
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static inline void fib6_walker_link(struct fib6_walker_t *w) { write_lock_bh(&fib6_walker_lock); list_add(&w->lh, &fib6_walkers); write_unlock_bh(&fib6_walker_lock); }
0
[ "CWE-399" ]
linux
307f2fb95e9b96b3577916e73d92e104f8f26494
300,384,102,475,328,400,000,000,000,000,000,000,000
6
ipv6: only static routes qualify for equal cost multipathing Static routes in this case are non-expiring routes which did not get configured by autoconf or by icmpv6 redirects. To make sure we actually get an ecmp route while searching for the first one in this fib6_node's leafs, also make sure it matches the ecmp ro...
static int __init proc_genhd_init(void) { proc_create("diskstats", 0, NULL, &proc_diskstats_operations); proc_create("partitions", 0, NULL, &proc_partitions_operations); return 0; }
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
68,499,004,917,639,965,000,000,000,000,000,000,000
6
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
pick_table_access_method(JOIN_TAB *tab) { switch (tab->type) { case JT_REF: tab->read_first_record= join_read_always_key; tab->read_record.read_record_func= join_read_next_same; break; case JT_REF_OR_NULL: tab->read_first_record= join_read_always_key_or_null; tab->read_record.read_record_f...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
4,536,766,429,927,427,300,000,000,000,000,000,000
39
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static bool vmci_transport_is_trusted(struct vsock_sock *vsock, u32 peer_cid) { return vsock->trusted || vmci_is_context_owner(peer_cid, vsock->owner->uid); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
278,849,541,536,835,060,000,000,000,000,000,000,000
5
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
CImg<T> get_rand(const T& val_min, const T& val_max) const { return (+*this).rand(val_min,val_max); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
281,748,584,537,790,060,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline bool debug_pagealloc_enabled(void) { return false; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
15,433,526,783,990,160,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int add_part_field_list(THD *thd, String *str, List<const char> field_list) { int err= 0; const char *field_name; List_iterator<const char> part_it(field_list); err+= str->append('('); while ((field_name= part_it++)) { err+= append_identifier(thd, str, field_name, strlen(field_name)); err+= ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
223,371,515,976,058,150,000,000,000,000,000,000,000
17
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
void updateSearchPrompt(void) { const Utf32String* basePrompt = (direction > 0) ? &forwardSearchBasePrompt : &reverseSearchBasePrompt; size_t promptStartLength = basePrompt->length(); promptChars = promptStartLength + searchTextLen + endSearchBasePrompt.length(); Utf32Str...
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
147,800,100,457,930,320,000,000,000,000,000,000,000
15
SERVER-25335 avoid group and other permissions when creating .dbshell history file
static void DeleteCallbackBundle(napi_env env, void* data, void* hint) { CallbackBundle* bundle = static_cast<CallbackBundle*>(data); delete bundle; }
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
73,685,468,077,106,880,000,000,000,000,000,000,000
4
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
dwarf_formsig8_const(Dwarf_Attribute attr, Dwarf_Sig8 * returned_sig_bytes, Dwarf_Error* error) { int res =_dwarf_formsig8_internal(attr, DW_FORM_data8, returned_sig_bytes,error); return res; }
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
251,858,537,201,045,100,000,000,000,000,000,000,000
8
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL) { size_t new_len; unsigned char enc[256] = {0}; if (!Z_REFCOUNTED_P(value)) { ZVAL_STRINGL(value, Z_STRVAL_P(value), Z_STRLEN_P(value)); } /* strip high/strip low ( see flags )*/ php_filter_strip(value, flags); if (!(flags & FILTER_FLAG_NO_ENCODE_QUOTES)) ...
0
[ "CWE-190" ]
php-src
57b997ebf99e0eb9a073e0dafd2ab100bd4a112d
172,391,821,004,935,600,000,000,000,000,000,000,000
41
Fix bug #71637: Multiple Heap Overflow due to integer overflows
uint32_t PsdImage::writeIptcData(const IptcData& iptcData, BasicIo& out) const { uint32_t resLength = 0; byte buf[8]; if (iptcData.count() > 0) { DataBuf rawIptc = IptcParser::encode(iptcData); if (rawIptc.size_ > 0) { #ifdef DEBUG std::cerr << st...
0
[ "CWE-125" ]
exiv2
68966932510213b5656fcf433ab6d7e26f48e23b
20,569,026,291,002,083,000,000,000,000,000,000,000
32
PSD: Use Safe::add for preventing overflows in PSD files
static void do_show_obj(QPDF& pdf, Options& o, int& exit_code) { QPDFObjectHandle obj; if (o.show_trailer) { obj = pdf.getTrailer(); } else { obj = pdf.getObjectByID(o.show_obj, o.show_gen); } if (obj.isStream()) { if (o.show_raw_stream_data || o.show_filtered...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
144,076,104,890,849,270,000,000,000,000,000,000,000
46
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void Smb4KGlobal::clearSharesList() { mutex.lock(); while ( !p->sharesList.isEmpty() ) { delete p->sharesList.takeFirst(); } mutex.unlock(); }
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
194,796,155,313,906,500,000,000,000,000,000,000,000
11
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
static bool kvm_can_post_timer_interrupt(struct kvm_vcpu *vcpu) { return pi_inject_timer && kvm_vcpu_apicv_active(vcpu) && (kvm_mwait_in_guest(vcpu->kvm) || kvm_hlt_in_guest(vcpu->kvm)); }
0
[ "CWE-476" ]
linux
00b5f37189d24ac3ed46cb7f11742094778c46ce
66,567,435,146,761,270,000,000,000,000,000,000,000
5
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON() instead of crashing the host. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <...
static void builtin_diffstat(const char *name_a, const char *name_b, struct diff_filespec *one, struct diff_filespec *two, struct diffstat_t *diffstat, struct diff_options *o, int complete_rewrite) { mmfile_t mf1, mf2; struct diffstat_file *data; data = diffstat_add(diffstat,...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
101,768,446,367,281,980,000,000,000,000,000,000,000
47
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optlen) { struct sctp_association *asoc; struct list_head *pos; struct sctp_sock *sp = sctp_sk(sk); int val; if (optlen < sizeof(int)) return -EINVAL; if (get_user(val, (int __user *)optval)) return -EFAULT; if ((val != 0) && ((val ...
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
27,835,652,003,529,733,000,000,000,000,000,000,000
23
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
ncp_make_closed(struct inode *inode) { int err; err = 0; mutex_lock(&NCP_FINFO(inode)->open_mutex); if (atomic_read(&NCP_FINFO(inode)->opened) == 1) { atomic_set(&NCP_FINFO(inode)->opened, 0); err = ncp_close_file(NCP_SERVER(inode), NCP_FINFO(inode)->file_handle); if (!err) ncp_vdbg("volnum=%d, dirent=%u...
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
328,170,813,195,886,930,000,000,000,000,000,000,000
18
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
md_add_line_into_current_block(MD_CTX* ctx, const MD_LINE_ANALYSIS* analysis) { MD_ASSERT(ctx->current_block != NULL); if(ctx->current_block->type == MD_BLOCK_CODE || ctx->current_block->type == MD_BLOCK_HTML) { MD_VERBATIMLINE* line; line = (MD_VERBATIMLINE*) md_push_block_bytes(ctx, sizeof(M...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
189,126,933,842,731,550,000,000,000,000,000,000,000
28
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
static int parser_errcb(struct libmnt_table *tb __attribute__ ((__unused__)), const char *filename, int line) { warnx(_("%s: parse error at line %d -- ignored"), filename, line); ++parse_nerrors; return 1; }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
57,446,388,093,121,110,000,000,000,000,000,000,000
7
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
JwtHeaderLocation(const std::string& token, const absl::node_hash_set<std::string>& issuers, const LowerCaseString& header) : JwtLocationBase(token, issuers), header_(header) {}
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
113,343,905,971,529,920,000,000,000,000,000,000,000
3
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
cmd_string (const char *com _GL_UNUSED, const char *val, void *place) { char **pstring = (char **)place; xfree_null (*pstring); *pstring = xstrdup (val); return true; }
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
120,748,090,884,933,240,000,000,000,000,000,000,000
8
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
nfnl_cthelper_parse_tuple(struct nf_conntrack_tuple *tuple, const struct nlattr *attr) { int err; struct nlattr *tb[NFCTH_TUPLE_MAX+1]; err = nla_parse_nested(tb, NFCTH_TUPLE_MAX, attr, nfnl_cthelper_tuple_pol, NULL); if (err < 0) return err; if (!tb[NFCTH_TUPLE_L3PROTONUM] || !tb[NFCTH_TUPLE_L4...
0
[ "CWE-862" ]
linux
4b380c42f7d00a395feede754f0bc2292eebe6e5
153,243,237,155,677,700,000,000,000,000,000,000,000
22
netfilter: nfnetlink_cthelper: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, nfnl_cthelper_list is shared by all net namespaces on the system. An unprivileged user can create user and net names...
CImg<T> get_projections2d(const unsigned int x0, const unsigned int y0, const unsigned int z0) const { if (is_empty() || _depth<2) return +*this; const unsigned int _x0 = (x0>=_width)?_width - 1:x0, _y0 = (y0>=_height)?_height - 1:y0, _z0 = (z0>=_depth)?_depth - 1:z0; const...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
297,291,756,311,610,650,000,000,000,000,000,000,000
15
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void ov518_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* isoc packet */ int len) /* iso packet length */ { struct sd *sd = (struct sd *) gspca_dev; /* A false positive here is likely, until OVT gives me * the definitive SOF/EOF format */ if ((!(data[0] | data[1] | data[2] | data[3] | data[5]...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
248,294,460,692,326,500,000,000,000,000,000,000,000
37
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
h2_mplx *h2_mplx_create(conn_rec *c, server_rec *s, apr_pool_t *parent, h2_workers *workers) { apr_status_t status = APR_SUCCESS; apr_allocator_t *allocator; apr_thread_mutex_t *mutex; h2_mplx *m; m = apr_pcalloc(parent, sizeof(h2_mplx)); if (m) { m->id = c-...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
288,922,830,962,523,240,000,000,000,000,000,000,000
71
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
file_rlookup(const char *filename) /* I - Filename */ { int i; /* Looping var */ cache_t *wc; /* Current cache file */ for (i = web_files, wc = web_cache; i > 0; i --, wc ++) { if (!strcmp(wc->name, filename)) { if (!strncmp(wc->url, "data:", 5)) return ("data URL"); else ...
0
[ "CWE-476", "CWE-415", "CWE-787" ]
htmldoc
369b2ea1fd0d0537ba707f20a2f047b6afd2fbdc
5,027,088,153,078,274,000,000,000,000,000,000,000
19
Fix JPEG error handling (Issue #415)
void key_replace_session_keyring(void) { const struct cred *old; struct cred *new; if (!current->replacement_session_keyring) return; write_lock_irq(&tasklist_lock); new = current->replacement_session_keyring; current->replacement_session_keyring = NULL; write_unlock_irq(&tasklist_lock); if (!new) return...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
301,439,207,779,276,570,000,000,000,000,000,000,000
43
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void Field_longlong::set_max() { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; set_notnull(); int8store(ptr, unsigned_flag ? ULONGLONG_MAX : LONGLONG_MAX); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
156,322,997,046,472,890,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
_zip_cdir_grow(struct zip_cdir *cd, int nentry, struct zip_error *error) { struct zip_dirent *entry; if (nentry < cd->nentry) { _zip_error_set(error, ZIP_ER_INTERNAL, 0); return -1; } if ((entry=((struct zip_dirent *) realloc(cd->entry, sizeof(*(cd->entry))*nentry))) == NULL) { _zip_error_set(err...
0
[ "CWE-189" ]
php-src
ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5
66,617,866,136,921,330,000,000,000,000,000,000,000
20
Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
static struct sctp_association *sctp_association_init(struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, sctp_scope_t scope, gfp_t gfp) { struct net *net = sock_net(sk); struct sctp_sock *sp; int i; sctp_paramhdr_t *p; int err; /* Retrieve the SCTP p...
0
[]
linux
196d67593439b03088913227093e374235596e33
227,770,299,025,674,200,000,000,000,000,000,000,000
279
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
void fuse_request_send(struct fuse_conn *fc, struct fuse_req *req) { __set_bit(FR_ISREPLY, &req->flags); if (!test_bit(FR_WAITING, &req->flags)) { __set_bit(FR_WAITING, &req->flags); atomic_inc(&fc->num_waiting); } __fuse_request_send(fc, req); }
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
211,356,494,179,357,100,000,000,000,000,000,000,000
9
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
unlink_def_function(ufunc_T *ufunc) { if (ufunc->uf_dfunc_idx > 0) { dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data) + ufunc->uf_dfunc_idx; if (--dfunc->df_refcount <= 0) delete_def_function_contents(dfunc, TRUE); ufunc->uf_def_status = UF_NOT_COMPILED; ufunc->uf_dfunc_idx = 0; if (dfunc-...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
270,398,760,554,485,060,000,000,000,000,000,000,000
15
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
_equalRuleStmt(const RuleStmt *a, const RuleStmt *b) { COMPARE_NODE_FIELD(relation); COMPARE_STRING_FIELD(rulename); COMPARE_NODE_FIELD(whereClause); COMPARE_SCALAR_FIELD(event); COMPARE_SCALAR_FIELD(instead); COMPARE_NODE_FIELD(actions); COMPARE_SCALAR_FIELD(replace); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
164,023,325,139,076,340,000,000,000,000,000,000,000
12
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
bool __fastcall SendToAnotherInstance() { THandles OtherInstances; FindOtherInstances(OtherInstances); bool Result = false; THandles::const_iterator I = OtherInstances.begin(); while (!Result && (I != OtherInstances.end())) { HWND Handle = *I; TCopyDataMessage Message; Message.Comm...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
266,990,978,891,004,700,000,000,000,000,000,000,000
33
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
TEST(FormatterTest, HashFlag) { EXPECT_EQ("42", format("{0:#}", 42)); EXPECT_EQ("-42", format("{0:#}", -42)); EXPECT_EQ("0b101010", format("{0:#b}", 42)); EXPECT_EQ("0B101010", format("{0:#B}", 42)); EXPECT_EQ("-0b101010", format("{0:#b}", -42)); EXPECT_EQ("0x42", format("{0:#x}", 0x42)); EXPECT_EQ("0X42"...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
316,182,915,112,733,340,000,000,000,000,000,000,000
44
Fix segfault on complex pointer formatting (#642)
struct sigqueue *sigqueue_alloc(void) { struct sigqueue *q = __sigqueue_alloc(-1, current, GFP_KERNEL, 0); if (q) q->flags |= SIGQUEUE_PREALLOC; return q; }
0
[]
linux-2.6
da48524eb20662618854bb3df2db01fc65f3070c
304,464,389,209,481,000,000,000,000,000,000,000,000
9
Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code Userland should be able to trust the pid and uid of the sender of a signal if the si_code is SI_TKILL. Unfortunately, the kernel has historically allowed sigqueueinfo() to send any si_code at all (as long as it was negative - to distinguish i...
fr_window_get_archive_file_for_paste (FrWindow *window) { g_return_val_if_fail (window != NULL, NULL); if (window->priv->clipboard_data != NULL) return window->priv->clipboard_data->file; else return NULL; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
156,186,357,264,891,760,000,000,000,000,000,000,000
9
libarchive: sanitize filenames before extracting
TEST_F(Http1ServerConnectionImplTest, Http11AbsoluteEnabledNoOp) { initialize(); TestRequestHeaderMapImpl expected_headers{ {":authority", "bah"}, {":path", "/foo/bar"}, {":method", "GET"}}; Buffer::OwnedImpl buffer("GET /foo/bar HTTP/1.1\r\nHost: bah\r\n\r\n"); expectHeadersTest(Protocol::Http11, true, ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
156,936,933,443,597,540,000,000,000,000,000,000,000
8
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
107,630,230,504,459,610,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void destroy_session(sasl_session_t *p) { mowgli_node_t *n, *tn; myuser_t *mu; if (p->flags & ASASL_NEED_LOG && p->username != NULL) { mu = myuser_find_by_nick(p->username); if (mu != NULL && !(ircd->flags & IRCD_SASL_USE_PUID)) sasl_logcommand(p, mu, CMDLOG_LOGIN, "LOGIN (session timed out)"); } ...
0
[ "CWE-288" ]
atheme
de2ba3ca8f6c39b41431d989f3ac66002a487839
225,374,311,244,797,300,000,000,000,000,000,000,000
32
modules/saslserv/main: backport 7.3 commits for pending EID login This backports commits 4e664c75d0b280a052eb & ceb0235695e6736ce2ab from the master branch. The IRCv3.1 SASL specification contains the following wording: If the client completes registration (with CAP END, NICK, USER and any other necessary me...
static uint8_t avrcp_handle_request_continuing(struct avrcp *session, struct avrcp_header *pdu, uint8_t transaction) { struct avrcp_player *player = target_get_player(session); uint16_t len = ntohs(pdu->params_len); struct pending_pdu *pending; if (len != 1 || session->pending_pdu == NULL) goto err; ...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
276,139,492,967,997,470,000,000,000,000,000,000,000
39
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.