func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt) { int fmt = opt->output_format; if (fmt & DIFF_FORMAT_CHECKDIFF) diff_flush_checkdiff(p, opt); else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS)) diff_flush_raw(p, opt); else if (fmt & DIFF_FORMAT_NAME) { const char *name_...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
261,494,344,907,558,850,000,000,000,000,000,000,000
16
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>
yaml_parser_increase_flow_level(yaml_parser_t *parser) { yaml_simple_key_t empty_simple_key = { 0, 0, 0, { 0, 0, 0 } }; /* Reset the simple key on the next level. */ if (!PUSH(parser, parser->simple_keys, empty_simple_key)) return 0; /* Increase the flow level. */ if (parser->flow_level ...
0
[ "CWE-20" ]
libyaml
e6aa721cc0e5a48f408c52355559fd36780ba32a
52,936,389,139,935,860,000,000,000,000,000,000,000
20
Fix for https://bitbucket.org/xi/libyaml/issue/10/ https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
evdev_scroll_config_natural_set(struct libinput_device *device, int enabled) { struct evdev_device *dev = evdev_device(device); dev->scroll.natural_scrolling_enabled = enabled ? true : false; return LIBINPUT_CONFIG_STATUS_SUCCESS; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
107,470,750,933,174,240,000,000,000,000,000,000,000
9
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 unsigned char *ReadImage(FILE * fd, int width, int height, unsigned char cmap[256][3], int ncols, int bpp, int compression, int rowbytes, gboolean Grey, const Bitmap_Channel * masks, at_exception_type * exp) { unsigned char v, n; int xpos = 0; int ypos = 0; unsigned char * image; unsigned char...
0
[ "CWE-787" ]
autotrace
e96bffadc25ff0ba0e10745f8012efcc5f920ea9
144,473,286,920,076,750,000,000,000,000,000,000,000
277
input-bmp: Increase header buffer in some cases Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
next_zero (void *nxdata, uint32_t count, uint64_t offset, uint32_t flags, int *err) { struct b_conn *b_conn = nxdata; int r; r = b_conn->b->zero (b_conn->b, b_conn->conn, count, offset, flags, err); if (r == -1) assert (*err && *err != ENOTSUP && *err != EOPNOTSUPP); return r; }
0
[ "CWE-406" ]
nbdkit
bf0d61883a2f02f4388ec10dc92d4c61c093679e
301,884,573,348,150,220,000,000,000,000,000,000,000
11
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
passGetEmphasis () { int more = 1; passLinepos++; passEmphasis = 0; while (more) { switch (passLine.chars[passLinepos]) { case 'i': passEmphasis |= italic; break; case 'b': passEmphasis |= bold; break; case 'u': passEmphasis |= underline; break; case 'c': passEmphasis |= comp...
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
338,149,391,471,713,200,000,000,000,000,000,000,000
36
Merge branch 'table_resolver'
bool AuthorizationSession::isAuthorizedToChangeOwnCustomDataAsUser(const UserName& userName) { return AuthorizationSession::isAuthorizedToChangeAsUser(userName, ActionType::changeOwnCustomData); }
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
46,302,132,204,216,980,000,000,000,000,000,000,000
4
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info) { return info->colortype == LCT_GREY || info->colortype == LCT_GREY_ALPHA; }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
109,236,652,907,021,420,000,000,000,000,000,000,000
4
Fixed #5645: realloc return handling
static void intern_cleanup(void) { if (intern_input_malloced) caml_stat_free(intern_input); if (intern_obj_table != NULL) caml_stat_free(intern_obj_table); if (intern_extra_block != NULL) { /* free newly allocated heap chunk */ caml_free_for_heap(intern_extra_block); } else if (intern_block != 0) { ...
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
319,984,066,054,339,180,000,000,000,000,000,000,000
14
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
static void set_ftrace_swapper(void) { struct task_struct *p; int cpu; get_online_cpus(); for_each_online_cpu(cpu) { p = idle_task(cpu); set_tsk_trace_trace(p); } put_online_cpus(); }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
262,236,573,132,025,460,000,000,000,000,000,000,000
12
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
static struct fuse_writepage_args *fuse_find_writeback(struct fuse_inode *fi, pgoff_t idx_from, pgoff_t idx_to) { struct rb_node *n; n = fi->writepages.rb_node; while (n) { struct fuse_writepage_args *wpa; pgoff_t curr_index; wpa = rb_entry(n, struct fuse_writepage_args, writepages_entry); WARN_O...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
326,194,141,379,763,240,000,000,000,000,000,000,000
23
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 bool subpage_accepts(struct uc_struct *uc, void *opaque, hwaddr addr, unsigned len, bool is_write, MemTxAttrs attrs) { subpage_t *subpage = opaque; #if defined(DEBUG_SUBPAGE) printf("%s: subpage %p %c len %u addr " TARGET_FMT_plx "\n", __...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
63,967,631,870,418,930,000,000,000,000,000,000,000
13
Fix crash when mapping a big memory and calling uc_close
mldv2_report_print(netdissect_options *ndo, const u_char *bp, u_int len) { const struct icmp6_hdr *icp = (const struct icmp6_hdr *) bp; u_int group, nsrcs, ngroups; u_int i, j; /* Minimum len is 8 */ if (len < 8) { ND_PRINT((ndo," [invalid len %d]", len)); return; } ...
0
[ "CWE-125" ]
tcpdump
d7505276842e85bfd067fa21cdb32b8a2dc3c5e4
306,969,563,469,966,850,000,000,000,000,000,000,000
56
(for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check Moreover: Add and use *_tstr[] strings. Update four tests outputs accordingly. Fix a space. Wang Junjie of 360 ESG Codesafe Team had independently identified this vulnerability in 2018 by means of fuzzing and provided the packet capture file for the tes...
void br_multicast_stop(struct net_bridge *br) { struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_entry *mp; struct hlist_node *p, *n; u32 ver; int i; del_timer_sync(&br->multicast_router_timer); del_timer_sync(&br->multicast_querier_timer); del_timer_sync(&br->multicast_query_timer); spin_lock_bh(&br...
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
94,542,695,782,582,630,000,000,000,000,000,000,000
42
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
//! Convert pixel values from Lab to XYZ color spaces. CImg<T>& LabtoXYZ(const bool use_D65=true) { if (_spectrum!=3) throw CImgInstanceException(_cimg_instance "LabtoXYZ(): Instance is not a Lab image.", cimg_instance); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
259,286,521,602,122,050,000,000,000,000,000,000,000
26
Fix other issues in 'CImg<T>::load_bmp()'.
static const GUIDParseTable *find_guid(ff_asf_guid guid) { int j, ret; const GUIDParseTable *g; swap_guid(guid); g = gdef; for (j = 0; j < FF_ARRAY_ELEMS(gdef); j++) { if (!(ret = memcmp(guid, g->guid, sizeof(g->guid)))) return g; g++; } return NULL; }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
84,613,638,072,951,510,000,000,000,000,000,000,000
15
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int enc_untrusted_link(const char *oldpath, const char *newpath) { return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_link, oldpath, newpath); }
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
178,235,780,550,050,680,000,000,000,000,000,000,000
4
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
off_t PackLinuxElf32::pack3(OutputFile *fo, Filter &ft) { off_t flen = super::pack3(fo, ft); // loader follows compressed PT_LOADs // NOTE: PackLinuxElf::pack3 adjusted xct_off for the extra page unsigned v_hole = sz_pack2 + lsize; set_te32(&elfout.phdr[0].p_filesz, v_hole); set_te32(&elfout.phdr...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
298,745,296,702,571,100,000,000,000,000,000,000,000
120
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
static BOOL update_send_non_monitored_desktop(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo) { wStream* s; rdpUpdate* update = context->update; BYTE controlFlags = ORDER_SECONDARY | (ORDER_TYPE_WINDOW << 2); UINT16 orderSize = 7; update_check_flush(context, o...
0
[ "CWE-125" ]
FreeRDP
f8890a645c221823ac133dbf991f8a65ae50d637
145,890,272,280,641,860,000,000,000,000,000,000,000
20
Fixed #6005: Bounds checks in update_read_bitmap_data
h2_vfp_body(struct vfp_ctx *vc, struct vfp_entry *vfe, void *ptr, ssize_t *lp) { struct h2_req *r2; struct h2_sess *h2; unsigned l; enum vfp_status retval = VFP_OK; CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC); CHECK_OBJ_NOTNULL(vfe, VFP_ENTRY_MAGIC); CAST_OBJ_NOTNULL(r2, vfe->priv1, H2_REQ_MAGIC); h2 = r2->h2sess; ...
1
[ "CWE-444" ]
varnish-cache
d4c67d2a1a05304598895c24663c58a2e2932708
160,808,998,611,618,150,000,000,000,000,000,000,000
53
Take content length into account on H/2 request bodies When receiving H/2 data frames, make sure to take the advertised content length into account, and fail appropriately if the combined sum of the data frames does not match the content length.
R_API RBuffer *r_buf_new_file(const char *file, int perm, int mode) { struct buf_file_user u = { 0 }; u.file = file; u.perm = perm; u.mode = mode; return new_buffer (R_BUFFER_FILE, &u); }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
112,883,643,501,114,050,000,000,000,000,000,000,000
7
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
void readRawInto(std::string& s) { s = cursor_.readFixedString(readVarint<uint32_t>()); }
0
[ "CWE-400", "CWE-522", "CWE-674" ]
mcrouter
97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b
217,333,539,945,180,500,000,000,000,000,000,000,000
3
Attempt to make CarbonProtocolReader::skip tail recursive Reviewed By: edenzik Differential Revision: D17967570 fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284
static void node_remove_caches(struct node *node) { }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
202,893,444,038,512,740,000,000,000,000,000,000,000
1
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
__poll_t af_alg_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk; struct alg_sock *ask = alg_sk(sk); struct af_alg_ctx *ctx = ask->private; __poll_t mask; sock_poll_wait(file, sock, wait); mask = 0; if (!ctx->more || ctx->used) mask |= EPOLLIN | EPOLLRDNORM; i...
0
[ "CWE-416" ]
linux
9060cb719e61b685ec0102574e10337fa5f445ea
1,599,514,852,512,975,000,000,000,000,000,000,000
19
net: crypto set sk to NULL when af_alg_release. KASAN has found use-after-free in sockfs_setattr. The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close() and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore that crypto module forgets to set the sk to NULL after af_al...
void Magick::Image::write(Blob *blob_) { size_t length=0; void *data; modifyImage(); GetPPException; data=ImagesToBlob(constImageInfo(),image(),&length,exceptionInfo); if (length > 0) blob_->updateNoCopy(data,length,Blob::MallocAllocator); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
39,759,961,513,240,533,000,000,000,000,000,000,000
15
Added missing return to avoid use after free.
GF_Err trik_box_size(GF_Box *s) { GF_TrickPlayBox *ptr = (GF_TrickPlayBox *) s; ptr->size += 8 * ptr->entry_count; return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
317,072,281,481,324,200,000,000,000,000,000,000,000
6
fixed #1587
static void write_dict(bytearray_t * bplist, node_t* node, hashtable_t* ref_table, uint8_t dict_param_size) { uint64_t idx1 = 0; uint64_t idx2 = 0; uint8_t *buff = NULL; node_t* cur = NULL; uint64_t i = 0; uint64_t size = node_n_children(node) / 2; uint8_t marker = BPLIST_DICT | (size < 15...
0
[ "CWE-770" ]
libplist
26061aac4ec75e7a4469a9aab9a424716223e5c4
202,691,560,078,870,340,000,000,000,000,000,000,000
43
bplist: Check for invalid offset_size in bplist trailer
local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ { unsigned chain_length = s->max_chain_length;/* max hash chain length */ register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; ...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
67,763,295,440,871,925,000,000,000,000,000,000,000
142
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
void testCrash_Report2418192() { // Testcase by Harvey Vrsalovic helperTestQueryString("http://svcs.cnn.com/weather/wrapper.jsp?&csiID=csi1", 1); }
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
291,967,975,030,040,250,000,000,000,000,000,000,000
4
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
ReturnCode_t DataWriterImpl::assert_liveliness() { if (writer_ == nullptr) { return ReturnCode_t::RETCODE_NOT_ENABLED; } if (!publisher_->rtps_participant()->wlp()->assert_liveliness( writer_->getGuid(), writer_->get_liveliness_kind(), writer_->ge...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
304,464,299,291,576,830,000,000,000,000,000,000,000
30
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static int TSS_sha1(const unsigned char *data, unsigned int datalen, unsigned char *digest) { struct sdesc *sdesc; int ret; sdesc = init_sdesc(hashalg); if (IS_ERR(sdesc)) { pr_info("trusted_key: can't alloc %s\n", hash_alg); return PTR_ERR(sdesc); } ret = crypto_shash_digest(&sdesc->shash, data, data...
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
119,047,621,582,351,400,000,000,000,000,000,000,000
16
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
virSecuritySELinuxLXCInitialize(virSecurityManager *mgr) { g_autoptr(virConf) selinux_conf = NULL; virSecuritySELinuxData *data = virSecurityManagerGetPrivateData(mgr); data->skipAllLabel = true; data->label_handle = selabel_open(SELABEL_CTX_FILE, NULL, 0); if (!data->label_handle) { virRe...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
221,035,516,837,409,520,000,000,000,000,000,000,000
61
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
MODRET add_defaultchdir(cmd_rec *cmd) { config_rec *c; char *dir,**argv; int argc; array_header *acl = NULL; CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL|CONF_ANON); if (cmd->argc < 2) CONF_ERROR(cmd, "syntax: DefaultChdir <directory> [<group-expression>]"); argv = cmd->argv; argc = cmd->ar...
0
[ "CWE-59", "CWE-61" ]
proftpd
ecff21e0d0e84f35c299ef91d7fda088e516d4ed
80,875,654,284,970,430,000,000,000,000,000,000,000
43
Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks is off, to 1.3.5 branch.
TEST(ComparisonsTest, GreaterEqualInt) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_INT32, BuiltinOperator_GREATER_EQUAL); model.PopulateTensor<int>(model.input1(), {-1, 9, 7, 3}); model.PopulateTensor<int>(model.input2(), {1, 2, 7, 5}); model.Invoke(); EXPECT_TH...
0
[ "CWE-20", "CWE-703" ]
tensorflow
a989426ee1346693cc015792f11d715f6944f2b8
230,889,672,882,356,740,000,000,000,000,000,000,000
10
Improve to cover scale value greater than one PiperOrigin-RevId: 433050921
g_file_set_attributes_from_info (GFile *file, GFileInfo *info, GFileQueryInfoFlags flags, GCancellable *cancellable, GError **error) { GF...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
319,456,683,053,938,500,000,000,000,000,000,000,000
24
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
longlong Field_double::val_int_from_real(bool want_unsigned_result) { Converter_double_to_longlong conv(val_real(), want_unsigned_result); if (unlikely(!want_unsigned_result && conv.error())) conv.push_warning(get_thd(), Field_double::val_real(), false); return conv.result(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
245,148,522,225,145,000,000,000,000,000,000,000,000
7
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...
static void acm_disconnect(struct usb_interface *intf) { struct acm *acm = usb_get_intfdata(intf); struct tty_struct *tty; int i; /* sibling interface is already cleaning up */ if (!acm) return; mutex_lock(&acm->mutex); acm->disconnected = true; if (acm->country_codes) { device_remove_file(&acm->control->...
0
[ "CWE-416" ]
linux
c52873e5a1ef72f845526d9f6a50704433f9c625
90,599,404,878,002,030,000,000,000,000,000,000,000
52
usb: cdc-acm: make sure a refcount is taken early enough destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Cc: stable <stable@vger.kernel.org> Reported-and-tested-by: ...
static int verify_md5(HEVCContext *s, AVFrame *frame) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); int pixel_shift; int i, j; if (!desc) return AVERROR(EINVAL); pixel_shift = desc->comp[0].depth > 8; av_log(s->avctx, AV_LOG_DEBUG, "Verifying checksum for fram...
0
[ "CWE-476" ]
FFmpeg
9ccc633068c6fe76989f487c8932bd11886ad65b
70,130,047,533,965,890,000,000,000,000,000,000,000
65
avcodec/hevcdec: Avoid only partly skiping duplicate first slices Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 This also fi...
void WebContents::OnDevToolsSearchCompleted( int request_id, const std::string& file_system_path, const std::vector<std::string>& file_paths) { base::ListValue file_paths_value; for (const auto& file_path : file_paths) { file_paths_value.AppendString(file_path); } base::Value request_id_value(re...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
253,803,081,217,898,320,000,000,000,000,000,000,000
14
fix: restrict sendToFrame to same-process frames by default (#26875)
qword_to_hex_punct(char *out, guint64 qword, char punct) { out = dword_to_hex_punct(out, (guint32)(qword >> 32), punct); *out++ = punct; out = dword_to_hex_punct(out, (guint32)(qword & 0xffffffff), punct); return out; }
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
146,641,209,320,041,150,000,000,000,000,000,000,000
7
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) { const struct cred *old; struct cred *new; int retval; new = prepare_creds(); if (!new) return -ENOMEM; old = current_cred(); retval = -EPERM; if (!nsown_capable(CAP_SETGID)) { if (rgid != (gid_t) -1 && rgid != old->gid && rgid != ol...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
151,948,803,406,483,570,000,000,000,000,000,000,000
38
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
*/ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) { zval **data, **tmp, tmp2; char *string_key; uint string_len; ulong num_key; zend_is_auto_global(name, name_length TSRMLS_CC); if (zend_hash_find(&EG(symbol_table), name, name_length+1, (void **) &data)!=FAILURE && (Z_TYPE_PP(data)...
0
[ "CWE-200" ]
php-src
3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9
124,005,592,273,190,130,000,000,000,000,000,000,000
78
Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
static void rbd_img_capture_header(struct rbd_img_request *img_req) { struct rbd_device *rbd_dev = img_req->rbd_dev; lockdep_assert_held(&rbd_dev->header_rwsem); if (rbd_img_is_write(img_req)) img_req->snapc = ceph_get_snap_context(rbd_dev->header.snapc); else img_req->snap_id = rbd_dev->spec->snap_id; if (...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
248,567,973,116,321,440,000,000,000,000,000,000,000
14
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...
long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, unsigned int flags) { struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_ioctl_in inarg = { .fh = ff->fh, .cmd = cmd, .arg = arg, .flags = flags }; struct fuse_ioctl_out outarg; struct iovec...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
51,835,301,271,452,890,000,000,000,000,000,000,000
193
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,...
GF_Err mdia_box_read(GF_Box *s, GF_BitStream *bs) { GF_Err e; u64 cookie = gf_bs_get_cookie(bs); cookie &= ~GF_ISOM_BS_COOKIE_VISUAL_TRACK; gf_bs_set_cookie(bs, cookie); e = gf_isom_box_array_read(s, bs, mdia_on_child_box); gf_bs_set_cookie(bs, cookie); if (e) return e; if (!((GF_MediaBox *)s)->information) { ...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
140,862,046,261,203,880,000,000,000,000,000,000,000
24
fixed #1587
static bool bin_raw_strings(RCore *r, int mode, int va) { RBinFile *bf = r_bin_cur (r->bin); if (!bf && r->io && r->io->desc && r->io->desc->uri) { const char *file = r->io->desc->uri; r_sys_cmdf ("rabin2 -qzzz '%s'", file); // eprintf ("Likely you used -nn \n"); // eprintf ("try: .!rabin2 -B <baddr> -zzr fil...
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
169,592,560,775,234,480,000,000,000,000,000,000,000
21
Fix #7698 - UAF in r_config_set when loading a dex
static int netdev_queue_add_kobject(struct net_device *dev, int index) { struct netdev_queue *queue = dev->_tx + index; struct kobject *kobj = &queue->kobj; int error = 0; kobj->kset = dev->queues_kset; error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index); if (error) return e...
1
[]
linux
a3e23f719f5c4a38ffb3d30c8d7632a4ed8ccd9e
106,043,878,933,313,700,000,000,000,000,000,000,000
25
net-sysfs: call dev_hold if kobject_init_and_add success In netdev_queue_add_kobject and rx_queue_add_kobject, if sysfs_create_group failed, kobject_put will call netdev_queue_release to decrease dev refcont, however dev_hold has not be called. So we will see this while unregistering dev: unregister_netdevice: waitin...
QPDFObjectHandle::assertInteger() { assertType("Integer", isInteger()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
78,193,994,707,375,490,000,000,000,000,000,000,000
4
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static CharDriverState *qemu_chr_open_pp_fd(int fd, ChardevCommon *backend, Error **errp) { CharDriverState *chr; chr = qemu_chr_alloc(backend, errp); if (!chr) { return NULL; } chr->opaque = (void *)(in...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
329,723,671,772,840,500,000,000,000,000,000,000,000
16
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static TRBCCode xhci_evaluate_slot(XHCIState *xhci, unsigned int slotid, uint64_t pictx) { dma_addr_t ictx, octx; uint32_t ictl_ctx[2]; uint32_t iep0_ctx[5]; uint32_t ep0_ctx[5]; uint32_t islot_ctx[4]; uint32_t slot_ctx[4]; trace_usb_xhci_slot_evaluate(slo...
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
219,832,487,446,806,260,000,000,000,000,000,000,000
66
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...
static inline void tm_reclaim_task(struct task_struct *tsk) { /* We have to work out if we're switching from/to a task that's in the * middle of a transaction. * * In switching we need to maintain a 2nd register state as * oldtask->thread.ckpt_regs. We tm_reclaim(oldproc); this saves the * checkpointed (tbe...
0
[ "CWE-20" ]
linux
621b5060e823301d0cba4cb52a7ee3491922d291
34,357,003,636,161,770,000,000,000,000,000,000,000
47
powerpc/tm: Fix crash when forking inside a transaction When we fork/clone we currently don't copy any of the TM state to the new thread. This results in a TM bad thing (program check) when the new process is switched in as the kernel does a tmrechkpt with TEXASR FS not set. Also, since R1 is from userspace, we trig...
void zincrbyCommand(client *c) { zaddGenericCommand(c,ZADD_INCR); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
298,523,282,941,357,200,000,000,000,000,000,000,000
3
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static BOOL rfx_process_message_channels(RFX_CONTEXT* context, wStream* s) { BYTE channelId; BYTE numChannels; context->decodedHeaderBlocks &= ~_RFX_DECODED_CHANNELS; if (Stream_GetRemainingLength(s) < 1) { WLog_ERR(TAG, "RfxMessageChannels packet too small"); return FALSE; } Stream_Read_UINT8(s, numChanne...
0
[ "CWE-125" ]
FreeRDP
3a06ce058f690b7fc1edad2f352c453376c2ebfe
280,042,488,336,650,800,000,000,000,000,000,000,000
57
Fixed oob read in rfx_process_message_tileset Check input data length Thanks to hac425 CVE-2020-11043
static void sw_perf_event_destroy(struct perf_event *event) { u64 event_id = event->attr.config; WARN_ON(event->parent); static_key_slow_dec(&perf_swevent_enabled[event_id]); swevent_hlist_put(event); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
281,526,306,280,203,330,000,000,000,000,000,000,000
9
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
storageVolGetInfoFlags(virStorageVolPtr vol, virStorageVolInfoPtr info, unsigned int flags) { virStoragePoolObj *obj; virStorageBackend *backend; virStorageVolDef *voldef; int ret = -1; virCheckFlags(VIR_STORAGE_VOL_GET_PHYSICAL, -1); if (!(voldef ...
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
176,803,006,258,402,640,000,000,000,000,000,000,000
36
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
xsltFormatNumberPreSuffix(xsltDecimalFormatPtr self, xmlChar **format, xsltFormatNumberInfoPtr info) { int count=0; /* will hold total length of prefix/suffix */ int len; while (1) { /* * prefix / suffix ends at end of string or at * first 'special' character */ if (**format == 0) return count...
0
[ "CWE-843" ]
libxslt
6ce8de69330783977dd14f6569419489875fb71b
278,895,105,878,033,830,000,000,000,000,000,000,000
47
Fix uninitialized read with UTF-8 grouping chars The character type in xsltFormatNumberConversion was too narrow and an invalid character/length combination could be passed to xsltNumberFormatDecimal, resulting in an uninitialized read. Found by OSS-Fuzz.
inline void Dequantize(const tflite::DequantizationParams& op_params, const RuntimeShape& input_shape, const int16_t* input_data, const RuntimeShape& output_shape, float* output_data) { ruy::profiler::ScopeLabel label("Dequantize/Int16"); const in...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
120,978,094,624,695,000,000,000,000,000,000,000,000
36
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
static void pt_guest_exit(struct vcpu_vmx *vmx) { if (vmx_pt_mode_is_system()) return; if (vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) { pt_save_msr(&vmx->pt_desc.guest, vmx->pt_desc.num_address_ranges); pt_load_msr(&vmx->pt_desc.host, vmx->pt_desc.num_address_ranges); } /* * KVM requires VM_EXIT_CLEAR_IA3...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
307,861,313,188,759,740,000,000,000,000,000,000,000
17
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
MagickPrivate MagickBooleanType RegistryComponentGenesis(void) { if (registry_semaphore == (SemaphoreInfo *) NULL) registry_semaphore=AcquireSemaphoreInfo(); return(MagickTrue); }
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
101,754,426,986,711,570,000,000,000,000,000,000,000
6
https://github.com/ImageMagick/ImageMagick/issues/790
static int __init control_va_addr_alignment(char *str) { /* guard against enabling this on other CPU families */ if (va_align.flags < 0) return 1; if (*str == 0) return 1; if (*str == '=') str++; if (!strcmp(str, "32")) va_align.flags = ALIGN_VA_32; else if (!strcmp(str, "64")) va_align.flags = ALIGN...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
2,841,372,242,959,486,000,000,000,000,000,000,000
25
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 ...
SSL *ssl_session_new(int fd) { SSL *ssl = SSL_new(ssl_ctx_); if (!ssl) { std::cerr << "SSL_new() failed" << std::endl; return nullptr; } if (SSL_set_fd(ssl, fd) == 0) { std::cerr << "SSL_set_fd() failed" << std::endl; SSL_free(ssl); return nullptr; } return ssl; ...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
140,144,972,637,254,680,000,000,000,000,000,000,000
13
Don't read too greedily
static bool mirror_drained_poll(BlockJob *job) { MirrorBlockJob *s = container_of(job, MirrorBlockJob, common); /* If the job isn't paused nor cancelled, we can't be sure that it won't * issue more requests. We make an exception if we've reached this point * from one of our own drain sections, to avo...
0
[ "CWE-476" ]
qemu
66fed30c9cd11854fc878a4eceb507e915d7c9cd
73,197,505,267,826,250,000,000,000,000,000,000,000
15
block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts() In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer in mirror_wait_on_conflicts() without checks if it is not NULL. Backtrace: Program termi...
static void rlvl_destroy(jpc_enc_rlvl_t *rlvl) { jpc_enc_band_t *band; uint_fast16_t bandno; if (rlvl->bands) { for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { band_destroy(band); } jas_free(rlvl->bands); rlvl->bands = NULL; } }
0
[ "CWE-416" ]
jasper
03fe49ab96bf65fea784cdc256507ea88267fc7c
338,567,488,351,612,600,000,000,000,000,000,000,000
14
Fixed some potential double-free problems in the JPC codec.
static struct buffer_head *ext4_lookup_entry(struct inode *dir, struct dentry *dentry, struct ext4_dir_entry_2 **res_dir) { int err; struct ext4_filename fname; struct buffer_head *bh; err = ext4_fname_prepare_lookup(dir, dentry, &fname); if (err == -ENOENT) return NULL; if (err) return E...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
186,269,081,365,384,900,000,000,000,000,000,000,000
19
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
std::chrono::milliseconds requestHeadersTimeout() const override { return {}; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
48,577,517,480,541,960,000,000,000,000,000,000,000
1
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
GF_Err mhac_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_MHAConfigBox *ptr = (GF_MHAConfigBox *) s; e = gf_isom_box_write(s, bs); if (e) return e; gf_bs_write_u8(bs, ptr->configuration_version); gf_bs_write_u8(bs, ptr->mha_pl_indication); gf_bs_write_u8(bs, ptr->reference_channel_layout); gf_bs_write_u16...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
249,811,054,446,865,800,000,000,000,000,000,000,000
16
prevent dref memleak on invalid input (#1183)
static struct sk_buff *ieee80211_frag_cache_get(struct ieee80211_device *ieee, struct ieee80211_hdr_4addr *hdr) { struct sk_buff *skb = NULL; u16 sc; unsigned int frag, seq; struct ieee80211_frag_entry *entry; sc = le16_to_cpu(hdr->seq_ctl); frag = WLAN_GET_SEQ_FRAG(sc); seq = WLAN_GET_SEQ_SEQ(sc); if (...
0
[ "CWE-189" ]
linux-2.6
04045f98e0457aba7d4e6736f37eed189c48a5f7
228,675,683,238,698,300,000,000,000,000,000,000,000
49
[IEEE80211]: avoid integer underflow for runt rx frames Reported by Chris Evans <scarybeasts@gmail.com>: > The summary is that an evil 80211 frame can crash out a victim's > machine. It only applies to drivers using the 80211 wireless code, and > only then to certain drivers (and even then depends on a card's > firmw...
static char *mailbox_header_data_cstring(struct mailbox *mailbox) { struct buf buf = BUF_INITIALIZER; struct dlist *dl = dlist_newkvlist(NULL, NULL); int nflags = 0; int flag; dlist_setatom(dl, "T", mboxlist_mbtype_to_string(mailbox->h.mbtype)); dlist_setatom(dl, "N", mailbox->h.name); dl...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
125,058,082,212,423,100,000,000,000,000,000,000,000
38
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static int bcm_release(struct socket *sock) { struct sock *sk = sock->sk; struct net *net; struct bcm_sock *bo; struct bcm_op *op, *next; if (!sk) return 0; net = sock_net(sk); bo = bcm_sk(sk); /* remove bcm_ops, timer, rx_unregister(), etc. */ spin_lock(&bcm_notifier_lock); while (bcm_busy_notifier == ...
1
[ "CWE-362" ]
linux
d5f9023fa61ee8b94f37a93f08e94b136cf1e463
183,362,525,137,990,900,000,000,000,000,000,000,000
77
can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, mean...
decode_day(VALUE d, VALUE *jd, VALUE *df, VALUE *sf) { VALUE f; *jd = div_day(d, &f); *df = div_df(f, &f); *sf = sec_to_ns(f); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
43,549,251,695,798,340,000,000,000,000,000,000,000
8
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf) { struct vhost_vdpa *v = vmf->vma->vm_file->private_data; struct vdpa_device *vdpa = v->vdpa; const struct vdpa_config_ops *ops = vdpa->config; struct vdpa_notification_area notify; struct vm_area_struct *vma = vmf->vma; u16 index = vma->vm_pgoff; notify ...
0
[ "CWE-416" ]
linux
f6bbf0010ba004f5e90c7aefdebc0ee4bd3283b9
134,089,778,193,892,740,000,000,000,000,000,000,000
19
vhost-vdpa: fix use-after-free of v->config_ctx When the 'v->config_ctx' eventfd_ctx reference is released we didn't set it to NULL. So if the same character device (e.g. /dev/vhost-vdpa-0) is re-opened, the 'v->config_ctx' is invalid and calling again vhost_vdpa_config_put() causes use-after-free issues like the foll...
SetConstraintStateAddItem(SetConstraintState state, Oid tgoid, bool tgisdeferred) { if (state->numstates >= state->numalloc) { int newalloc = state->numalloc * 2; newalloc = Max(newalloc, 8); /* in case original has size 0 */ state = (SetConstraintState) repalloc(state, sizeof(SetConstraintS...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
191,028,771,548,520,220,000,000,000,000,000,000,000
22
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...
XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { if (parser != NULL) startDoctypeDeclHandler = start; }
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
203,900,465,975,863,480,000,000,000,000,000,000,000
5
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event) { struct sock *sk = ulpq->asoc->base.sk; struct sk_buff_head *queue, *skb_list; struct sk_buff *skb = sctp_event2skb(event); int clear_pd = 0; skb_list = (struct sk_buff_head *) skb->prev; /* If the socket is just going to throw this ...
0
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
241,661,538,904,108,800,000,000,000,000,000,000,000
64
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
f_trunc(typval_T *argvars, typval_T *rettv) { float_T f = 0.0; rettv->v_type = VAR_FLOAT; if (get_float_arg(argvars, &f) == OK) /* trunc() is not in C90, use floor() or ceil() instead. */ rettv->vval.v_float = f > 0 ? floor(f) : ceil(f); else rettv->vval.v_float = 0.0; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
83,597,944,261,202,920,000,000,000,000,000,000,000
11
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
nfa_restore_listids(nfa_regprog_T *prog, int *list) { int i; nfa_state_T *p; p = &prog->state[0]; for (i = prog->nstate; --i >= 0; ) { p->lastlist[1] = list[i]; ++p; } }
0
[ "CWE-122" ]
vim
65b605665997fad54ef39a93199e305af2fe4d7f
123,522,184,911,249,520,000,000,000,000,000,000,000
12
patch 8.2.3409: reading beyond end of line with invalid utf-8 character Problem: Reading beyond end of line with invalid utf-8 character. Solution: Check for NUL when advancing.
static int snd_seq_ioctl_get_queue_tempo(struct snd_seq_client *client, void __user *arg) { struct snd_seq_queue_tempo tempo; struct snd_seq_queue *queue; struct snd_seq_timer *tmr; if (copy_from_user(&tempo, arg, sizeof(tempo))) return -EFAULT; queue = queueptr(tempo.queue); if (queue == NULL) return...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
168,917,571,108,856,670,000,000,000,000,000,000,000
28
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
ip6t_get_target_c(const struct ip6t_entry *e) { return ip6t_get_target((struct ip6t_entry *)e); }
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
297,730,764,962,186,300,000,000,000,000,000,000,000
4
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
static struct io_rsrc_data *io_rsrc_data_alloc(struct io_ring_ctx *ctx, rsrc_put_fn *do_put, unsigned nr) { struct io_rsrc_data *data; data = kzalloc(sizeof(*data), GFP_KERNEL); if (!data) return NULL; data->tags = kvcalloc(nr, sizeof(*data->tags), GFP_KERNEL); if (!data->tags) { kfr...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
224,983,737,824,762,800,000,000,000,000,000,000,000
22
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
MONGO_EXPORT int mongo_connect( mongo *conn , const char *host, int port ) { int ret; bson_errprintf("WARNING: mongo_connect() is deprecated, please use mongo_client()\n"); ret = mongo_client( conn, host, port ); mongo_set_write_concern( conn, 0 ); return ret; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
86,331,786,662,781,840,000,000,000,000,000,000,000
7
don't mix up int and size_t (first pass to fix that)
int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset) { u32 action[] = { INTEL_GUC_ACTION_AUTHENTICATE_HUC, rsa_offset }; return intel_guc_send(guc, action, ARRAY_SIZE(action)); }
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
83,607,666,292,877,690,000,000,000,000,000,000,000
9
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
PHPAPI void php_url_free(php_url *theurl) { if (theurl->scheme) zend_string_release_ex(theurl->scheme, 0); if (theurl->user) zend_string_release_ex(theurl->user, 0); if (theurl->pass) zend_string_release_ex(theurl->pass, 0); if (theurl->host) zend_string_release_ex(theurl->host, 0); if (theurl->path) zen...
0
[ "CWE-20" ]
php-src
4a89e726bd4d0571991dc22a9a1ad4509e8fe347
33,216,796,315,331,610,000,000,000,000,000,000,000
18
Alternative fix for bug 77423 That bug report originally was about `parse_url()` misbehaving, but the security aspect was actually only regarding `FILTER_VALIDATE_URL`. Since the changes to `parse_url_ex()` apparently affect userland code which is relying on the sloppy URL parsing[1], this alternative restores the old...
check_message_size(transport_instance *tp, address_item *addr) { int rc = OK; int size_limit; deliver_set_expansions(addr); size_limit = expand_string_integer(tp->message_size_limit, TRUE); deliver_set_expansions(NULL); if (expand_string_message) { rc = DEFER; addr->message = size_limit == -1 ? string_sprin...
0
[ "CWE-78" ]
exim
d740d2111f189760593a303124ff6b9b1f83453d
325,002,764,780,266,450,000,000,000,000,000,000,000
28
Fix CVE-2019-10149
Status renameCollectionCommon(OperationContext* opCtx, const NamespaceString& source, const NamespaceString& target, OptionalCollectionUUID targetUUID, repl::OpTime renameOpTimeFromApplyOps, ...
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
272,818,029,208,293,640,000,000,000,000,000,000,000
459
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
cmsPipeline* CMSEXPORT cmsPipelineDup(const cmsPipeline* lut) { cmsPipeline* NewLUT; cmsStage *NewMPE, *Anterior = NULL, *mpe; cmsBool First = TRUE; if (lut == NULL) return NULL; NewLUT = cmsPipelineAlloc(lut ->ContextID, lut ->InputChannels, lut ->OutputChannels); if (NewLUT == NULL) return ...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
67,686,997,279,259,360,000,000,000,000,000,000,000
47
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
adjust_sign(int is_negative, int forcesign, int *signvalue) { if (is_negative) { *signvalue = '-'; return true; } else if (forcesign) *signvalue = '+'; return false; }
0
[ "CWE-787" ]
postgres
29725b3db67ad3f09da1a7fb6690737d2f8d6c0a
139,819,757,027,603,700,000,000,000,000,000,000,000
11
port/snprintf(): fix overflow and do padding Prevent port/snprintf() from overflowing its local fixed-size buffer and pad to the desired number of digits with zeros, even if the precision is beyond the ability of the native sprintf(). port/snprintf() is only used on systems that lack a native snprintf(). Reported by...
qb_ipc_us_ready(struct qb_ipc_one_way * ow_data, struct qb_ipc_one_way * ow_conn, int32_t ms_timeout, int32_t events) { struct pollfd ufds[2]; int32_t poll_events; int numfds = 1; int i; ufds[0].fd = ow_data->u.us.sock; ufds[0].events = events; ufds[0].revents = 0; if (ow_conn && ow_data != ow_conn) { n...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
253,524,987,632,376,700,000,000,000,000,000,000,000
46
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
void RGWPutMetadataObject::pre_exec() { rgw_bucket_object_pre_exec(s); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
214,519,846,426,189,000,000,000,000,000,000,000,000
4
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
/* Init a replace structure for further calls */ REPLACE *init_replace(char * *from, char * *to,uint count, char * word_end_chars) { static const int SPACE_CHAR= 256; static const int END_OF_LINE= 258; uint i,j,states,set_nr,len,result_len,max_length,found_end,bits_set,bit_nr; int used_sets,chr,defaul...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
34,157,350,680,482,173,000,000,000,000,000,000,000
257
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
inline void SegmentBuilder::reset() { word* start = getPtrUnchecked(ZERO * WORDS); memset(start, 0, (pos - start) * sizeof(word)); pos = start; }
0
[ "CWE-20" ]
capnproto
52bc956459a5e83d7c31be95763ff6399e064ae4
229,927,040,035,792,200,000,000,000,000,000,000,000
5
SECURITY: Prevent compiler from eliding bounds checks. Details: https://github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-32bit-elides-bounds-check.md
xfs_inactive( xfs_inode_t *ip) { struct xfs_mount *mp; int error; int truncate = 0; /* * If the inode is already free, then there can be nothing * to clean up here. */ if (VFS_I(ip)->i_mode == 0) { ASSERT(ip->i_df.if_broot_bytes == 0); return; } mp = ip->i_mount; ASSERT(!xfs_iflags_test(ip, XFS...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
93,216,963,161,948,880,000,000,000,000,000,000,000
85
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
void fib6_force_start_gc(struct net *net) { if (!timer_pending(&net->ipv6.ip6_fib_timer)) mod_timer(&net->ipv6.ip6_fib_timer, jiffies + net->ipv6.sysctl.ip6_rt_gc_interval); }
0
[ "CWE-399" ]
linux
307f2fb95e9b96b3577916e73d92e104f8f26494
244,990,871,921,158,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...
add_node(struct xkb_compose_table *table, xkb_keysym_t keysym) { struct compose_node new = { .keysym = keysym, .next = 0, .is_leaf = true, }; darray_append(table->nodes, new); return darray_size(table->nodes) - 1; }
0
[ "CWE-835" ]
libxkbcommon
842e4351c2c97de6051cab6ce36b4a81e709a0e1
333,146,976,952,022,700,000,000,000,000,000,000,000
10
compose: fix infinite loop in parser on some inputs The parser would enter an infinite loop if an unterminated keysym literal occurs at EOF. Found with the afl fuzzer. Signed-off-by: Ran Benita <ran234@gmail.com>
static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) { const struct usb_cdc_union_desc *union_desc; struct usb_host_interface *alt; union_desc = ims_pcu_get_cdc_union_desc(intf); if (!union_desc) return -EINVAL; pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMaste...
0
[ "CWE-125" ]
linux
ea04efee7635c9120d015dcdeeeb6988130cb67a
297,790,509,650,015,200,000,000,000,000,000,000,000
67
Input: ims-psu - check if CDC union descriptor is sane Before trying to use CDC union descriptor, try to validate whether that it is sane by checking that intf->altsetting->extra is big enough and that descriptor bLength is not too big and not too small. Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-of...
TEST_F(ConnectionManagerUtilityTest, RejectIfEscapedSlashesPresentAndConfiguredToReject) { ON_CALL(config_, pathWithEscapedSlashesAction()) .WillByDefault(Return(envoy::extensions::filters::network::http_connection_manager::v3:: HttpConnectionManager::REJECT_REQUEST)); TestRequ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
109,743,945,864,933,270,000,000,000,000,000,000,000
16
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
MAIN_WINDOW_REC *mainwindow_create(int right) { MAIN_WINDOW_REC *rec, *parent; int space; rec = g_new0(MAIN_WINDOW_REC, 1); rec->dirty = TRUE; if (mainwindows == NULL) { active_mainwin = rec; rec->first_line = screen_reserved_top; rec->last_line = term_height-1 - screen_reserved_bottom; rec->height = re...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
177,338,642,865,806,540,000,000,000,000,000,000,000
70
check the error condition of mainwindow_create
bool otherUpdateInFetchPhase() { return _authzManager->_isFetchPhaseBusy; }
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
148,074,323,523,589,320,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
CtPtr ProtocolV2::post_client_banner_exchange() { ldout(cct, 20) << __func__ << dendl; state = AUTH_CONNECTING; return send_auth_request(); }
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
76,165,360,055,754,470,000,000,000,000,000,000,000
7
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
bool kvm_can_use_hv_timer(struct kvm_vcpu *vcpu) { return kvm_x86_ops.set_hv_timer && !(kvm_mwait_in_guest(vcpu->kvm) || kvm_can_post_timer_interrupt(vcpu)); }
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
68,972,322,381,620,140,000,000,000,000,000,000,000
6
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
compute_routerstatus_consensus(smartlist_t *votes, int consensus_method, char *microdesc_digest256_out, tor_addr_port_t *best_alt_orport_out) { vote_routerstatus_t *most = NULL, *cur = NULL; int most_n = 0, cur_n = 0; time_t most_published = 0; /* c...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
159,377,625,980,247,700,000,000,000,000,000,000,000
92
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.