func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
double Item_func_set_user_var::val_real() { DBUG_ASSERT(fixed == 1); check(0); update(); // Store expression return m_var_entry->val_real(&null_value); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
27,446,559,468,889,267,000,000,000,000,000,000,000
7
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static int vq_memory_access_ok(void __user *log_base, struct vhost_memory *mem, int log_all) { int i; if (!mem) return 0; for (i = 0; i < mem->nregions; ++i) { struct vhost_memory_region *m = mem->regions + i; unsigned long a = m->userspace_addr; if (m->memory_size > ULONG_MAX) return 0; els...
0
[]
linux-2.6
bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
27,005,827,181,441,270,000,000,000,000,000,000,000
23
vhost: fix length for cross region descriptor If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: D...
static CImg<T> get_load_yuv(std::FILE *const file, const unsigned int size_x, const unsigned int size_y=1, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~0U, ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
52,237,277,143,839,280,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
md_text_with_null_replacement(MD_CTX* ctx, MD_TEXTTYPE type, const CHAR* str, SZ size) { OFF off = 0; int ret = 0; while(1) { while(off < size && str[off] != _T('\0')) off++; if(off > 0) { ret = ctx->parser.text(type, str, off, ctx->userdata); if(ret !...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
76,656,628,861,482,090,000,000,000,000,000,000,000
28
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
static int sctp_inet_send_verify(struct sctp_sock *opt, union sctp_addr *addr) { return 1; }
0
[ "CWE-119", "CWE-787" ]
linux
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
304,407,174,906,953,300,000,000,000,000,000,000,000
4
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) ...
static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid, uint64_t pictx, bool bsr) { XHCISlot *slot; USBPort *uport; USBDevice *dev; dma_addr_t ictx, octx, dcbaap; uint64_t poctx; uint32_t ictl_ctx[2]; uint32_t slot_ctx[4]; uint32_t ep0_ct...
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
129,832,446,204,285,970,000,000,000,000,000,000,000
102
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...
resync_start_show(struct mddev *mddev, char *page) { if (mddev->recovery_cp == MaxSector) return sprintf(page, "none\n"); return sprintf(page, "%llu\n", (unsigned long long)mddev->recovery_cp); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
338,097,647,478,150,200,000,000,000,000,000,000,000
6
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
keyid_from_pk (PKT_public_key *pk, u32 *keyid) { u32 lowbits; u32 dummy_keyid[2]; if (!keyid) keyid = dummy_keyid; if( pk->keyid[0] || pk->keyid[1] ) { keyid[0] = pk->keyid[0]; keyid[1] = pk->keyid[1]; lowbits = keyid[1]; } else { const byte *dp; gcry_md_hd_t md...
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
34,466,871,160,263,903,000,000,000,000,000,000,000
36
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 ...
jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) { if( SETJMP(sp->exit_jmpbuf) ) return 0; else { jpeg_start_decompress(cinfo); return 1; } }
0
[ "CWE-369" ]
libtiff
43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec
58,916,911,808,321,230,000,000,000,000,000,000,000
9
* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611
GF_Box *stsg_box_new() { ISOM_DECL_BOX_ALLOC(GF_SubTrackSampleGroupBox, GF_ISOM_BOX_TYPE_STSG); return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
284,353,975,698,137,280,000,000,000,000,000,000,000
5
fixed #1587
bool Arg_comparator::set_cmp_func_for_row_arguments() { uint n= (*a)->cols(); if (n != (*b)->cols()) { my_error(ER_OPERAND_COLUMNS, MYF(0), n); comparators= 0; return true; } if (!(comparators= new Arg_comparator[n])) return true; for (uint i=0; i < n; i++) { if ((*a)->element_index(i)...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
137,667,486,435,907,200,000,000,000,000,000,000,000
24
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int cmm_suspend(void) { cmm_suspended = 1; cmm_free_pages(cmm_pages, &cmm_pages, &cmm_page_list); cmm_free_pages(cmm_timed_pages, &cmm_timed_pages, &cmm_timed_page_list); return 0; }
0
[]
linux
b8e51a6a9db94bc1fb18ae831b3dab106b5a4b5f
227,359,234,907,834,500,000,000,000,000,000,000,000
7
s390/cmm: fix information leak in cmm_timeout_handler() The problem is that we were putting the NUL terminator too far: buf[sizeof(buf) - 1] = '\0'; If the user input isn't NUL terminated and they haven't initialized the whole buffer then it leads to an info leak. The NUL terminator should be: buf[len - 1] = '\0...
Supports_Block_Obj Parser::parse_supports_directive() { Supports_Condition_Obj cond = parse_supports_condition(); if (!cond) { css_error("Invalid CSS", " after ", ": expected @supports condition (e.g. (display: flexbox)), was ", false); } // create the ast node object for the support queries ...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
284,968,673,558,500,720,000,000,000,000,000,000,000
14
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
eval_vars( char_u *src, /* pointer into commandline */ char_u *srcstart, /* beginning of valid memory for src */ int *usedlen, /* characters after src that are used */ linenr_T *lnump, /* line number for :e command, or NULL */ char **errormsg, /* pointer to error message */ int *escaped) /* ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
122,537,073,485,297,840,000,000,000,000,000,000,000
291
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.
static void plugin_free(RBinPlugin *p) { if (p && p->fini) { p->fini (NULL); } R_FREE (p); }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
80,995,897,339,605,590,000,000,000,000,000,000,000
6
Fix #8748 - Fix oobread on string search
MagickPrivate Window XWindowByName(Display *display,const Window root_window, const char *name) { register int i; Status status; unsigned int number_children; Window *children, child, window; XTextProperty window_name; assert(display != (Display *) NULL); assert(root_win...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
21,340,566,742,447,777,000,000,000,000,000,000,000
45
https://github.com/ImageMagick/ImageMagick/issues/1531
void linenoiseHistoryFree(void) { if (history) { for (int j = 0; j < historyLen; ++j) free(history[j]); historyLen = 0; free(history); history = 0; } }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
280,017,285,478,399,020,000,000,000,000,000,000,000
9
SERVER-25335 avoid group and other permissions when creating .dbshell history file
void DcmSCP::notifyAssociationRequest(const T_ASC_Parameters &params, DcmSCPActionType & /* desiredAction */) { // Dump some information if required DCMNET_INFO("Association Received " << params.DULparams.callingPresentationAddress << ": " ...
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
80,234,268,150,510,660,000,000,000,000,000,000,000
15
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char buffer[MagickPathExtent], colorspace[MagickPathExtent], tuple[MagickPathExtent]; MagickBooleanType status; MagickOffsetType scene; PixelInfo pixel; register const Qua...
1
[ "CWE-476" ]
ImageMagick
b61d35eaccc0a7ddeff8a1c3abfcd0a43ccf210b
79,634,295,536,948,410,000,000,000,000,000,000,000
158
https://github.com/ImageMagick/ImageMagick/issues/298
int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc) { mutex_lock(&hc->lock); hc->callback = NULL; hc->context = NULL; mutex_unlock(&hc->lock); return 0; }
0
[ "CWE-200" ]
linux
43cdd1b716b26f6af16da4e145b6578f98798bf6
212,188,273,761,733,430,000,000,000,000,000,000,000
8
ACPI: sbshc: remove raw pointer from printk() message There's no need to be printing a raw kernel pointer to the kernel log at every boot. So just remove it, and change the whole message to use the correct dev_info() call at the same time. Reported-by: Wang Qize <wang_qize@venustech.com.cn> Cc: All applicable <stabl...
static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
188,396,507,106,115,980,000,000,000,000,000,000,000
1
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 ...
_asn1_change_integer_value (asn1_node node) { asn1_node p; unsigned char val[SIZEOF_UNSIGNED_LONG_INT]; unsigned char val2[SIZEOF_UNSIGNED_LONG_INT + 1]; int len; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if ((type_field (p->type) == ASN1_ETYPE_INTEGER) && (...
0
[ "CWE-119" ]
libtasn1
5520704d075802df25ce4ffccc010ba1641bd484
125,909,405,608,919,770,000,000,000,000,000,000,000
56
asn1_find_node: added safety check on asn1_find_node() This prevents a stack overflow in asn1_find_node() which is triggered by too long variable names in the definitions files. That means that applications have to deliberately pass a too long 'name' constant to asn1_write_value() and friends. Reported by Jakub Jiras...
static void __exit econet_proto_exit(void) { #ifdef CONFIG_ECONET_AUNUDP del_timer(&ab_cleanup_timer); if (udpsock) sock_release(udpsock); #endif unregister_netdevice_notifier(&econet_netdev_notifier); #ifdef CONFIG_ECONET_NATIVE dev_remove_pack(&econet_packet_type); #endif sock_unregister(econet_family_ops.fami...
0
[ "CWE-200" ]
linux-2.6
80922bbb12a105f858a8f0abb879cb4302d0ecaa
48,886,177,057,718,570,000,000,000,000,000,000,000
14
econet: Fix econet_getname() leak econet_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
f_histadd(typval_T *argvars UNUSED, typval_T *rettv) { #ifdef FEAT_CMDHIST int histype; char_u *str; char_u buf[NUMBUFLEN]; #endif rettv->vval.v_number = FALSE; if (check_secure()) return; #ifdef FEAT_CMDHIST str = tv_get_string_chk(&argvars[0]); /* NULL on type error */ histype = str != ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
52,624,079,938,847,855,000,000,000,000,000,000,000
27
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.
dialog_response_cb (GtkDialog *dialog, guint response, gpointer user_data) { gtk_widget_hide (GTK_WIDGET (dialog)); }
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
17,439,757,538,264,142,000,000,000,000,000,000,000
4
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
png_read_start_row(png_structrp png_ptr) { /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* Start of interlace block */ static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; /* Offset to next interlace block */ static PNG_CONST png_byte png_pass_inc[7] = {8, 8, ...
0
[ "CWE-120" ]
libpng
a901eb3ce6087e0afeef988247f1a1aa208cb54d
258,903,789,385,840,900,000,000,000,000,000,000,000
290
[libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta).
static void rds_conn_message_info_cmn(struct socket *sock, unsigned int len, struct rds_info_iterator *iter, struct rds_info_lengths *lens, int want_send, bool isv6) { struct hlist_head *head; struct list_head *list; struct rds_connection *conn; struct rds_message *rm; unsigned int to...
0
[ "CWE-401" ]
linux
5f9562ebe710c307adc5f666bf1a2162ee7977c0
281,254,367,249,086,220,000,000,000,000,000,000,000
65
rds: memory leak in __rds_conn_create() __rds_conn_create() did not release conn->c_path when loop_trans != 0 and trans->t_prefer_loopback != 0 and is_outgoing == 0. Fixes: aced3ce57cd3 ("RDS tcp loopback connection can hang") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Reviewed-by: Sharath Srinivasan <sharath.srini...
get_message_type(guint64 value_frame_flags) { // Mask out the least significant bits: 0000 0111 guint64 type_mask_val = (0x07ll & value_frame_flags); return val64_to_str_const(type_mask_val, msg_types, "???"); }
0
[ "CWE-476" ]
wireshark
4a948427100b6c109f4ec7b4361f0d2aec5e5c3f
324,540,525,083,653,920,000,000,000,000,000,000,000
6
BLIP: Fix decompression buffer bug Until now, mistakenly, the buffer for decompressing compressed BLIP messages has been statically allocated as 16 Kb, but that is not valid behavior. 16 Kb is the maximum size of a _compressed_ frame. In theory, due to the ability to zipbomb, there is virtually no upper bound on what...
static int brcmf_msgbuf_tx_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct brcmf_commonring *commonring; struct msgbuf_ioctl_req_hdr *request; u16 buf_len; void *ret_ptr; int err; commonring = msgbuf->com...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
155,737,902,600,150,900,000,000,000,000,000,000,000
44
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
SECURITY_STATUS ntlm_read_NegotiateMessage(NTLM_CONTEXT* context, PSecBuffer buffer) { wStream* s; size_t length; NTLM_NEGOTIATE_MESSAGE* message; message = &context->NEGOTIATE_MESSAGE; ZeroMemory(message, sizeof(NTLM_NEGOTIATE_MESSAGE)); s = Stream_New((BYTE*) buffer->pvBuffer, buffer->cbBuffer); if (!s) ret...
0
[ "CWE-416", "CWE-125" ]
FreeRDP
2ee663f39dc8dac3d9988e847db19b2d7e3ac8c6
233,369,112,799,255,280,000,000,000,000,000,000,000
86
Fixed CVE-2018-8789 Thanks to Eyal Itkin from Check Point Software Technologies.
evutil_check_interfaces(int force_recheck) { evutil_socket_t fd = -1; struct sockaddr_in sin, sin_out; struct sockaddr_in6 sin6, sin6_out; ev_socklen_t sin_out_len = sizeof(sin_out); ev_socklen_t sin6_out_len = sizeof(sin6_out); int r; if (have_checked_interfaces && !force_recheck) return 0; if (evutil_check...
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
250,841,237,309,736,770,000,000,000,000,000,000,000
58
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
static void bnx2x_reset_endianity(struct bnx2x *bp) { bnx2x_config_endianity(bp, 0); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
86,357,909,630,402,440,000,000,000,000,000,000,000
4
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static void sun4u_init(MachineState *machine) { sun4uv_init(get_system_memory(), machine, &hwdefs[0]); }
0
[ "CWE-476" ]
qemu
ad280559c68360c9f1cd7be063857853759e6a73
169,573,817,122,528,880,000,000,000,000,000,000,000
4
sun4u: add power_mem_read routine Define skeleton 'power_mem_read' routine. Avoid NULL dereference. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
test_util_datadir(void) { char buf[1024]; char *f = NULL; char *temp_dir = NULL; temp_dir = get_datadir_fname(NULL); f = get_datadir_fname("state"); tor_snprintf(buf, sizeof(buf), "%s"PATH_SEPARATOR"state", temp_dir); test_streq(f, buf); tor_free(f); f = get_datadir_fname2("cache", "thingy"); tor_s...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
17,128,849,763,647,010,000,000,000,000,000,000,000
30
Fix assertion failure in tor_timegm. Fixes bug 6811.
Status GetPyArrayDimensionsForTensor(const TF_Tensor* tensor, gtl::InlinedVector<npy_intp, 4>* dims, tensorflow::int64* nelems) { dims->clear(); const int ndims = TF_NumDims(tensor); if (TF_TensorType(tensor) == TF_RESOURCE) { if (ndims...
0
[ "CWE-476", "CWE-843" ]
tensorflow
030af767d357d1b4088c4a25c72cb3906abac489
255,495,948,154,909,370,000,000,000,000,000,000,000
21
Fix `tf.raw_ops.ResourceCountUpTo` null pointer dereference. PiperOrigin-RevId: 368294347 Change-Id: I2c16fbfc9b4966c402c3d8e311f0d665a9c852d8
static void do_utfreadnewline_invalid(compiler_common *common) { /* Slow decoding a UTF-16 character, specialized for newlines. TMP1 contains the first half of the character (>= 0xd800). Return char value in TMP1. */ DEFINE_COMPILER; struct sljit_jump *exit_invalid[2]; sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
132,406,043,979,856,040,000,000,000,000,000,000,000
31
Fixed a unicode properrty matching issue in JIT
void HttpIntegrationTest::testTwoRequests(bool network_backup) { // if network_backup is false, this simply tests that Envoy can handle multiple // requests on a connection. // // If network_backup is true, the first request will explicitly set the TCP level flow control // as blocked as it finishes the encod...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
297,487,699,758,298,700,000,000,000,000,000,000,000
45
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...
sf_version_string (void) { #if ENABLE_EXPERIMENTAL_CODE return PACKAGE_NAME "-" PACKAGE_VERSION "-exp" ; #else return PACKAGE_NAME "-" PACKAGE_VERSION ; #endif }
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
130,105,623,307,928,470,000,000,000,000,000,000,000
8
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
DEFUN(undoPos, UNDO, "Cancel the last cursor movement") { BufferPos *b = Currentbuf->undo; int i; if (!Currentbuf->firstLine) return; if (!b || !b->prev) return; for (i = 0; i < PREC_NUM && b->prev; i++, b = b->prev) ; resetPos(b); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
183,482,476,108,084,700,000,000,000,000,000,000,000
12
Make temporary directory safely when ~/.w3m is unwritable
static inline u32 open_file_to_av(struct file *file) { u32 av = file_to_av(file); if (selinux_policycap_openperm) av |= FILE__OPEN; return av; }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
231,356,797,140,990,660,000,000,000,000,000,000,000
9
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 async_polkit_query_free(AsyncPolkitQuery *q) { if (!q) return; sd_bus_slot_unref(q->slot); if (q->registry && q->request) hashmap_remove(q->registry, q->request); sd_bus_message_unref(q->request); sd_bus_message_unref(q->reply); ...
1
[ "CWE-416" ]
systemd
637486261528e8aa3da9f26a4487dc254f4b7abb
263,080,601,619,434,000,000,000,000,000,000,000,000
18
polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it Previously, when doing an async PK query we'd store the original callback/userdata pair and call it again after the PK request is complete. This is problematic, since PK queries might be slow and in the meantime the userdata might...
void sspi_GlobalFinish() { if (sspi_initialized) { sspi_ContextBufferAllocTableFree(); } sspi_initialized = FALSE; }
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
219,517,193,145,554,960,000,000,000,000,000,000,000
9
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, enum cgroup_filetype type) { struct cgroup_pidlist *l; /* don't need task_nsproxy() if we're looking at ourself */ struct pid_namespace *ns = task_active_pid_ns(current); lockdep_assert_held(&cgrp->pidlist_mutex); list_for_each_entry(...
0
[ "CWE-416" ]
linux
3b0462726e7ef281c35a7a4ae33e93ee2bc9975b
295,305,867,059,920,960,000,000,000,000,000,000,000
14
cgroup: verify that source is a string The following sequence can be used to trigger a UAF: int fscontext_fd = fsopen("cgroup"); int fd_null = open("/dev/null, O_RDONLY); int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null); close_range(3, ~0U, 0); The cgroup v1 specific fs parser expects a...
static int handle_vcpu_debug(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { printk("VMM: %s", vcpu->arch.log_buf); return 1; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
298,484,431,078,375,470,000,000,000,000,000,000,000
6
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 cxusb_aver_power_ctrl(struct dvb_usb_device *d, int onoff) { int ret; if (!onoff) return cxusb_ctrl_msg(d, CMD_POWER_OFF, NULL, 0, NULL, 0); if (d->state == DVB_USB_STATE_INIT && usb_set_interface(d->udev, 0, 0) < 0) err("set interface failed"); do {} while (!(ret = cxusb_ctrl_msg(d, CMD_POWER_O...
0
[ "CWE-119", "CWE-787" ]
linux
3f190e3aec212fc8c61e202c51400afa7384d4bc
60,364,292,944,802,300,000,000,000,000,000,000,000
39
[media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a re...
on_page(int x, int y) { if (term->flags & TERM_CAN_CLIP) return TRUE; if ((0 < x && x < term->xmax) && (0 < y && y < term->ymax)) return TRUE; return FALSE; }
0
[ "CWE-787" ]
gnuplot
963c7df3e0c5266efff260d0dff757dfe03d3632
37,201,566,929,422,260,000,000,000,000,000,000,000
10
Better error handling for faulty font syntax A missing close-quote in an enhanced text font specification could cause a segfault. Bug #2303
void verify_filename(const char *prefix, const char *arg, int diagnose_misspelt_rev) { if (*arg == '-') die(_("option '%s' must come before non-option arguments"), arg); if (looks_like_pathspec(arg) || check_filename(prefix, arg)) return; die_verify_filename(the_repository, prefix, arg, diagnose_mi...
0
[ "CWE-22" ]
git
3b0bf2704980b1ed6018622bdf5377ec22289688
270,131,122,971,273,530,000,000,000,000,000,000,000
10
setup: tighten ownership checks post CVE-2022-24765 8959555cee7 (setup_git_directory(): add an owner check for the top-level directory, 2022-03-02), adds a function to check for ownership of repositories using a directory that is representative of it, and ways to add exempt a specific repository from said check if nee...
static struct page *get_mergeable_page(struct rmap_item *rmap_item) { struct mm_struct *mm = rmap_item->mm; unsigned long addr = rmap_item->address; struct vm_area_struct *vma; struct page *page; down_read(&mm->mmap_sem); if (ksm_test_exit(mm)) goto out; vma = find_vma(mm, addr); if (!vma || vma->vm_start > ...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
211,934,450,632,760,600,000,000,000,000,000,000,000
29
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static int nf_ct_net_init(struct net *net) { int res; net->nf_frag.frags.high_thresh = IPV6_FRAG_HIGH_THRESH; net->nf_frag.frags.low_thresh = IPV6_FRAG_LOW_THRESH; net->nf_frag.frags.timeout = IPV6_FRAG_TIMEOUT; res = inet_frags_init_net(&net->nf_frag.frags); if (res) return res; res = nf_ct_frag6_sysctl_regi...
0
[ "CWE-787" ]
linux
9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa
27,491,867,217,217,973,000,000,000,000,000,000,000
15
netfilter: ipv6: nf_defrag: drop mangled skb on ream error Dmitry Vyukov reported GPF in network stack that Andrey traced down to negative nh offset in nf_ct_frag6_queue(). Problem is that all network headers before fragment header are pulled. Normal ipv6 reassembly will drop the skb when errors occur further down th...
int timer_migration_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { static DEFINE_MUTEX(mutex); int ret; mutex_lock(&mutex); ret = proc_dointvec(table, write, buffer, lenp, ppos); if (!ret && write) timers_update_migration(false); mutex_unlock(&mutex...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
27,517,932,335,305,940,000,000,000,000,000,000,000
14
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
xfs_get_cowextsz_hint( struct xfs_inode *ip) { xfs_extlen_t a, b; a = 0; if (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) a = ip->i_d.di_cowextsize; b = xfs_get_extsz_hint(ip); a = max(a, b); if (a == 0) return XFS_DEFAULT_COWEXTSZ_HINT; return a; }
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
205,011,313,743,282,860,000,000,000,000,000,000,000
15
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...
static unsigned int v4l2_loopback_poll(struct file *file, struct poll_table_struct *pts) { struct v4l2_loopback_opener *opener; struct v4l2_loopback_device *dev; int ret_mask = 0; MARK(); opener = file->private_data; dev = v4l2loopback_getdevice(file); switch (opener->type) { case WRITER: ret_mask = POLL...
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
97,404,359,135,216,540,000,000,000,000,000,000,000
26
add explicit format specifier to printf() invocations CWE-134
static BOOL license_get_server_rsa_public_key(rdpLicense* license) { BYTE* Exponent; BYTE* Modulus; int ModulusLength; rdpSettings* settings = license->rdp->settings; if (license->ServerCertificate->length < 1) { if (!certificate_read_server_certificate(license->certificate, settings->ServerCertificate, ...
0
[ "CWE-125" ]
FreeRDP
6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a
235,502,567,183,223,000,000,000,000,000,000,000,000
25
Fixed OOB Read in license_read_new_or_upgrade_license_packet CVE-2020-11099 thanks to @antonio-morales for finding this.
template<typename t, typename tc> CImg<T>& draw_point(const CImg<t>& points, const tc *const color, const float opacity=1) { if (is_empty() || !points) return *this; switch (points._height) { case 0 : case 1 : throw CImgArgumentException(_cimg_instance ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
87,848,035,722,253,820,000,000,000,000,000,000,000
18
Fix other issues in 'CImg<T>::load_bmp()'.
zfs_acl_release_nodes(zfs_acl_t *aclp) { zfs_acl_node_t *aclnode; while ((aclnode = list_head(&aclp->z_acl))) { list_remove(&aclp->z_acl, aclnode); zfs_acl_node_free(aclnode); } aclp->z_acl_count = 0; aclp->z_acl_bytes = 0; }
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
15,240,226,961,046,925,000,000,000,000,000,000,000
11
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
R_API int r_bin_xtr_add(RBin *bin, RBinXtrPlugin *foo) { RListIter *it; RBinXtrPlugin *xtr; if (foo->init) { foo->init (bin->user); } // avoid duplicates r_list_foreach (bin->binxtrs, it, xtr) { if (!strcmp (xtr->name, foo->name)) { return false; } } r_list_append (bin->binxtrs, foo); return true; }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
257,881,554,091,837,530,000,000,000,000,000,000,000
16
Fix #8748 - Fix oobread on string search
*/ PHP_METHOD(DateTime, __construct) { zval *timezone_object = NULL; char *time_str = NULL; int time_str_len = 0; zend_error_handling error_handling; zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_st...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
310,700,583,871,773,550,000,000,000,000,000,000,000
13
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
virtual void processLink(AnnotLink * /*link*/, Catalog * /*catalog*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
102,295,898,757,255,370,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
void _paint(const bool wait_expose=true) { if (_is_closed || !_image) return; Display *const dpy = cimg::X11_attr().display; if (wait_expose) { // Send an expose event sticked to display window to force repaint XEvent event; event.xexpose.type = Expose; event.xexpose.seria...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
164,649,611,294,567,400,000,000,000,000,000,000,000
27
.
static void event_part(IRC_SERVER_REC *server, const char *data, const char *nick) { char *params, *channel, *reason; CHANNEL_REC *chanrec; g_return_if_fail(data != NULL); if (g_ascii_strcasecmp(nick, server->nick) != 0) { /* someone else part, no need to do anything here */ return; } params = event_get_pa...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
178,887,825,286,540,350,000,000,000,000,000,000,000
22
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
CtcpParser::CtcpParser(CoreSession *coreSession, QObject *parent) : QObject(parent), _coreSession(coreSession) { QByteArray MQUOTE = QByteArray("\020"); _ctcpMDequoteHash[MQUOTE + '0'] = QByteArray(1, '\000'); _ctcpMDequoteHash[MQUOTE + 'n'] = QByteArray(1, '\n'); _ctcpMDequoteHash[MQUOTE + 'r']...
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
8,195,243,681,391,704,000,000,000,000,000,000,000
15
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
QTNEq(QTNode *a, QTNode *b) { uint32 sign = a->sign & b->sign; if (!(sign == a->sign && sign == b->sign)) return 0; return (QTNodeCompare(a, b) == 0) ? true : false; }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
54,666,388,622,156,820,000,000,000,000,000,000,000
9
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static uint64_t extract_caps(int pid) { EUID_ASSERT(); char *file; if (asprintf(&file, "/proc/%d/status", pid) == -1) errExit("asprintf"); EUID_ROOT(); // grsecurity FILE *fp = fopen(file, "re"); EUID_USER(); // grsecurity if (!fp) goto errexit; char buf[MAXBUF]; while (fgets(buf, MAXBUF, fp)) { if (s...
1
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
328,594,460,018,844,000,000,000,000,000,000,000,000
31
fixing CVE-2022-31214
virDomainChrSourceDefDispose(void *obj) { virDomainChrSourceDefPtr def = obj; size_t i; virDomainChrSourceDefClear(def); virObjectUnref(def->privateData); if (def->seclabels) { for (i = 0; i < def->nseclabels; i++) virSecurityDeviceLabelDefFree(def->seclabels[i]); VIR_F...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
236,001,433,750,071,180,000,000,000,000,000,000,000
14
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
int __ext4_handle_dirty_metadata(const char *where, unsigned int line, handle_t *handle, struct inode *inode, struct buffer_head *bh) { int err = 0; might_sleep(); set_buffer_meta(bh); set_buffer_prio(bh); if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata(handle, bh); /* Errors can...
0
[ "CWE-416" ]
linux
6934da9238da947628be83635e365df41064b09b
90,016,442,641,485,080,000,000,000,000,000,000,000
58
ext4: fix potential use after free in __ext4_journal_stop There is a use-after-free possibility in __ext4_journal_stop() in the case that we free the handle in the first jbd2_journal_stop() because we're referencing handle->h_err afterwards. This was introduced in 9705acd63b125dee8b15c705216d7186daea4625 and it is wro...
static Select *findRightmost(Select *p){ while( p->pNext ) p = p->pNext; return p; }
0
[ "CWE-20" ]
sqlite
e59c562b3f6894f84c715772c4b116d7b5c01348
198,601,712,051,180,530,000,000,000,000,000,000,000
4
Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list. FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba
static int __init split_huge_pages_debugfs(void) { debugfs_create_file("split_huge_pages", 0200, NULL, NULL, &split_huge_pages_fops); return 0; }
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
82,227,463,439,947,410,000,000,000,000,000,000,000
6
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...
png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_color palette[PNG_MAX_PALETTE_LENGTH]; int max_palette_length, num, i; #ifdef PNG_POINTER_INDEXING_SUPPORTED png_colorp pal_ptr; #endif png_debug(1, "in png_handle_PLTE"); if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) ...
1
[ "CWE-120" ]
libpng
83f4c735c88e7f451541c1528d8043c31ba3b466
70,659,591,728,744,000,000,000,000,000,000,000,000
182
[libpng16] Clean up coding style in png_handle_PLTE()
static bool get_reqs_available(struct kioctx *ctx) { struct kioctx_cpu *kcpu; bool ret = false; unsigned long flags; preempt_disable(); kcpu = this_cpu_ptr(ctx->cpu); local_irq_save(flags); if (!kcpu->reqs_available) { int old, avail = atomic_read(&ctx->reqs_available); do { if (avail < ctx->req_batch)...
0
[]
linux-stable
c4f4b82694fe48b02f7a881a1797131a6dad1364
208,443,451,513,462,700,000,000,000,000,000,000,000
32
AIO: properly check iovec sizes In Linus's tree, the iovec code has been reworked massively, but in older kernels the AIO layer should be checking this before passing the request on to other layers. Many thanks to Ben Hawkes of Google Project Zero for pointing out the issue. Reported-by: Ben Hawkes <hawkes@google.co...
void Resolver::OnError(ResolverError, const std::string&) { /* Nothing in here */ }
0
[]
inspircd
58c893e834ff20495d007709220881a3ff13f423
243,923,789,803,860,520,000,000,000,000,000,000,000
4
Fixed infinite loop cauesd by invalid dns packets
int map_attrs_merge(struct ldb_module *module, void *mem_ctx, const char ***attrs, const char * const *more_attrs) { unsigned int i, j, k; for (i = 0; *attrs && (*attrs)[i]; i++) /* noop */ ; for (j = 0; more_attrs && more_attrs[j]; j++) /* noop */ ; *attrs = talloc_realloc(mem_ctx, *attrs, const char *, ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
302,163,814,877,206,180,000,000,000,000,000,000,000
22
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
Status ConcatShape(InferenceContext* c, int num_inputs_to_concat) { return ConcatShapeHelper(c, 1 /* start_value_index */, 1 + num_inputs_to_concat /* end_value_index */, 0 /* dim_index */); }
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
205,927,873,402,047,670,000,000,000,000,000,000,000
5
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
parse_objectgroup(FILE * fp, char *name, int what, struct objgroup **ol) { int type; char token[MAXTOKEN]; char quoted_string_buffer[MAXQUOTESTR]; struct node *np; np = alloc_node(current_module); if (np == NULL) return (NULL); type = get_token(f...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
12,781,133,539,117,788,000,000,000,000,000,000,000
84
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
TRIO_PUBLIC int trio_fprintf TRIO_VARGS3((file, format, va_alist), FILE* file, TRIO_CONST char* format, TRIO_VA_DECL) { int status; va_list args; assert(VALID(file)); assert(VALID(format)); TRIO_VA_START(args, format); status = TrioFormat(file, 0, TrioOutStreamFile, form...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
187,063,249,380,774,500,000,000,000,000,000,000,000
14
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
static void nsc_profiler_print(NSC_CONTEXT_PRIV* priv) { PROFILER_PRINT_HEADER PROFILER_PRINT(priv->prof_nsc_rle_decompress_data) PROFILER_PRINT(priv->prof_nsc_decode) PROFILER_PRINT(priv->prof_nsc_rle_compress_data) PROFILER_PRINT(priv->prof_nsc_encode) PROFILER_PRINT_FOOTER }
0
[ "CWE-200", "CWE-787" ]
FreeRDP
d1112c279bd1a327e8e4d0b5f371458bf2579659
218,658,210,954,773,900,000,000,000,000,000,000,000
9
Fixed CVE-2018-8788 Thanks to Eyal Itkin from Check Point Software Technologies.
static CImg<T> row_vector(const T& a0, const T& a1, const T& a2, const T& a3, const T& a4, const T& a5, const T& a6, const T& a7, const T& a8, const T& a9, const T& a10) { CImg<T> r(11,1); r[0] = a0; r[1] = a1; r[2] = a2; r[3] = a3; r[4] = a4; ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
221,144,328,351,793,800,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static inline zend_object_value date_object_new_interval_ex(zend_class_entry *class_type, php_interval_obj **ptr TSRMLS_DC) { php_interval_obj *intern; zend_object_value retval; intern = emalloc(sizeof(php_interval_obj)); memset(intern, 0, sizeof(php_interval_obj)); if (ptr) { *ptr = intern; } zend_object_s...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
120,212,696,022,876,360,000,000,000,000,000,000,000
19
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
static size_t multipart_buffer_read(multipart_buffer *self, char *buf, size_t bytes, int *end) { size_t len, max; char *bound; /* fill buffer if needed */ if (bytes > (size_t)self->bytes_in_buffer) { fill_buffer(self); } /* look for a potential boundary match, only read data up to that point */ if ((bound = ...
0
[ "CWE-190" ]
php-src
a3924ab6542a358a3099de992b63b932a9570add
236,436,902,405,890,800,000,000,000,000,000,000,000
41
Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fix #78876: Long variables cause OOM and temp files are not cleaned Fix #78875: Long filenames cause OOM and temp files are not cleaned Update NEWS for 7.2.31 Update CREDITS for PHP 7.2.30 Update NEWS for PHP 7.2.30
f_getcharsearch(typval_T *argvars UNUSED, typval_T *rettv) { if (rettv_dict_alloc(rettv) != FAIL) { dict_T *dict = rettv->vval.v_dict; dict_add_string(dict, "char", last_csearch()); dict_add_number(dict, "forward", last_csearch_forward()); dict_add_number(dict, "until", last_csearch_until()); } }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
100,789,945,816,993,260,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.
gst_rmdemux_get_stream_by_id (GstRMDemux * rmdemux, int id) { GSList *cur; for (cur = rmdemux->streams; cur; cur = cur->next) { GstRMDemuxStream *stream = cur->data; if (stream->id == id) { return stream; } } return NULL; }
0
[]
gst-plugins-ugly
9726aaf78e6643a5955864f444852423de58de29
282,091,873,637,697,320,000,000,000,000,000,000,000
14
rmdemux: Make sure we have enough data available when parsing audio/video packets Otherwise there will be out-of-bounds reads and potential crashes. Thanks to Natalie Silvanovich for reporting. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37 Part-of: <https://gitlab.freedesktop.org/gstre...
R_API char *r_str_escape_utf32le(const char *buf, int buf_size, bool show_asciidot, bool esc_bslash) { return r_str_escape_utf (buf, buf_size, R_STRING_ENC_UTF32LE, show_asciidot, esc_bslash, false); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
278,332,764,526,817,450,000,000,000,000,000,000,000
3
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
int i2d_X509_AUX(X509 *a, unsigned char **pp) { int length; length = i2d_X509(a, pp); if (a) length += i2d_X509_CERT_AUX(a->aux, pp); return length; }
0
[]
openssl
18029a3d0739284cadb309ea0fd498379b0bcfdb
258,033,771,088,801,500,000,000,000,000,000,000,000
8
Fix a failure to NULL a pointer freed on error. Reported by the LibreSSL project as a follow on to CVE-2015-0209 Reviewed-by: Richard Levitte <levitte@openssl.org>
static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) { struct l2cap_conf_efs efs; switch (chan->mode) { case L2CAP_MODE_ERTM: efs.id = chan->local_id; efs.stype = chan->local_stype; efs.msdu = cpu_to_le16(chan->local_msdu); efs.sdu_itime = cpu_to_le32(chan->local_sdu_itime); ef...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
74,175,143,302,245,715,000,000,000,000,000,000,000
30
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static inline char *get_default_content_type(uint prefix_len, uint *len TSRMLS_DC) { char *mimetype, *charset, *content_type; uint mimetype_len, charset_len; if (SG(default_mimetype)) { mimetype = SG(default_mimetype); mimetype_len = strlen(SG(default_mimetype)); } else { mimetype = SAPI_DEFAULT_MIMETYPE; ...
0
[ "CWE-190", "CWE-79" ]
php-src
996faf964bba1aec06b153b370a7f20d3dd2bb8b
60,848,953,695,298,490,000,000,000,000,000,000,000
38
Update header handling to RFC 7230
static void SerializeGltfAsset(Asset &asset, json &o) { if (!asset.generator.empty()) { SerializeStringProperty("generator", asset.generator, o); } if (!asset.copyright.empty()) { SerializeStringProperty("copyright", asset.copyright, o); } if (asset.version.empty()) { // Just in case // `ver...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
229,309,131,150,207,260,000,000,000,000,000,000,000
24
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
GF_Box *edts_New() { ISOM_DECL_BOX_ALLOC(GF_EditBox, GF_ISOM_BOX_TYPE_EDTS); return (GF_Box *) tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
32,775,420,864,805,270,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static bool ParseLight(Light *light, std::string *err, const json &o, bool store_original_json_for_extras_and_extensions) { if (!ParseStringProperty(&light->type, err, o, "type", true)) { return false; } if (light->type == "spot") { json_const_iterator spotIt; if (!FindMember(o...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
44,062,353,284,080,450,000,000,000,000,000,000,000
57
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
GC_API GC_word GC_CALL GC_get_max_retries(void) { return GC_max_retries; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
269,748,701,707,755,220,000,000,000,000,000,000,000
4
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
flatpak_remote_state_fetch_commit_object (FlatpakRemoteState *self, FlatpakDir *dir, const char *ref, const char *checksum, const char *token, ...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
238,698,045,976,322,130,000,000,000,000,000,000,000
94
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static int co64_required(const MOVTrack *track) { if (track->entry > 0 && track->cluster[track->entry - 1].pos + track->data_offset > UINT32_MAX) return 1; return 0; }
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
60,948,478,404,952,330,000,000,000,000,000,000,000
6
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
MONGO_EXPORT void bson_swap_endian64( void *outp, const void *inp ) { const char *in = ( const char * )inp; char *out = ( char * )outp; out[0] = in[7]; out[1] = in[6]; out[2] = in[5]; out[3] = in[4]; out[4] = in[3]; out[5] = in[2]; out[6] = in[1]; out[7] = in[0]; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
21,136,135,967,162,300,000,000,000,000,000,000,000
14
don't mix up int and size_t (first pass to fix that)
static void vrend_stencil_test_enable(struct vrend_context *ctx, bool stencil_test_enable) { if (ctx->sub->stencil_test_enabled != stencil_test_enable) { ctx->sub->stencil_test_enabled = stencil_test_enable; if (stencil_test_enable) glEnable(GL_STENCIL_TEST); else glDisable(GL_STE...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
221,240,649,491,979,560,000,000,000,000,000,000,000
10
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; if (!cstate->save_fh.fh_dentry) return nfserr_nofilehandle; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->sav...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
71,667,942,477,231,990,000,000,000,000,000,000,000
38
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
TEST_F(HttpConnectionManagerImplTest, PauseResume100Continue) { proxy_100_continue_ = true; setup(false, "envoy-custom-server", false); setUpEncoderAndDecoder(false, false); sendRequestHeadersAndData(); // Stop the 100-Continue at encoder filter 1. Encoder filter 0 should not yet receive the // 100-Continu...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
318,728,226,421,897,500,000,000,000,000,000,000,000
32
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) { PadContext *s = inlink->dst->priv; AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0], w + (s->w - s->in_w), h + (s->h - s->in_h)); int plane; ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
296,436,094,240,568,250,000,000,000,000,000,000,000
24
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
bool string_to_bool(const char *s) { if (s[0] == '1' && s[1] == '\0') return true; if (strcasecmp(s, "on") == 0) return true; if (strcasecmp(s, "yes") == 0) return true; if (strcasecmp(s, "true") == 0) return true; return false; }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
55,052,991,137,677,600,000,000,000,000,000,000,000
12
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
avi_t *AVI_open_fd(FILE *fd, int getIndex) { avi_t *AVI=NULL; /* Create avi_t structure */ AVI = (avi_t *) gf_malloc(sizeof(avi_t)); if(AVI==NULL) { AVI_errno = AVI_ERR_NO_MEM; return 0; } memset((void *)AVI,0,sizeof(avi_t)); AVI->mode = AVI_MODE_READ; /* open for reading */ // file alread open AVI->f...
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
158,572,258,451,666,860,000,000,000,000,000,000,000
31
fixed #2159
int ServerDHParams::get_pSize() const { return pSz_; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
47,680,683,990,403,990,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
_copy_pdu_vars(netsnmp_pdu *pdu, /* source PDU */ netsnmp_pdu *newpdu, /* target PDU */ int drop_err, /* !=0 drop errored variable */ int skip_count, /* !=0 number of variables to skip */ int copy_count) { /* !=0 nu...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
196,913,130,360,533,640,000,000,000,000,000,000,000
55
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
void test_nghttp2_session_reply_fail(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_data_provider data_prd; my_user_data ud; memset(&callbacks, 0, sizeof(nghttp2_session_callbacks)); callbacks.send_callback = fail_send_callback; data_prd.read_callback = fixed_length_data_...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
112,751,490,722,195,520,000,000,000,000,000,000,000
17
Add nghttp2_option_set_max_outbound_ack