func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
g_tls_connection_base_get_base_socket (GTlsConnectionBase *tls) { GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls); g_assert (g_tls_connection_base_is_dtls (tls)); return priv->base_socket; }
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
57,932,856,538,245,500,000,000,000,000,000,000,000
8
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
lib_fromUTF8(argc, argv, self) int argc; VALUE *argv; VALUE self; { VALUE str, encodename; if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) { encodename = Qnil; } return lib_fromUTF8_core(Qnil, str, encodename); }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
59,773,188,700,363,490,000,000,000,000,000,000,000
12
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
_equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b) { COMPARE_SCALAR_FIELD(itemtype); COMPARE_NODE_FIELD(name); COMPARE_NODE_FIELD(args); COMPARE_SCALAR_FIELD(number); COMPARE_NODE_FIELD(order_family); COMPARE_NODE_FIELD(class_args); COMPARE_NODE_FIELD(storedtype); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
89,629,756,020,692,520,000,000,000,000,000,000,000
12
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void MongoStatusInfo::finalize(js::FreeOp* fop, JSObject* obj) { auto status = static_cast<Status*>(JS_GetPrivate(obj)); if (status) getScope(fop)->trackedDelete(status); }
0
[]
mongo
c53b2f233687487ef70398153af3d8d34bbc21d1
312,675,264,214,498,400,000,000,000,000,000,000,000
6
SERVER-39481 don't expose a MongoStatus constructor in JS
dtls1_heartbeat(SSL *s) { unsigned char *buf, *p; int ret; unsigned int payload = 18; /* Sequence number + random bytes */ unsigned int padding = 16; /* Use minimum padding */ /* Only send if peer supports and accepts HB requests... */ if (!(s->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED) || s->tlsext_heartbe...
0
[ "CWE-310" ]
openssl
34628967f1e65dc8f34e000f0f5518e21afbfc7b
149,554,734,697,157,460,000,000,000,000,000,000,000
73
Fix DTLS retransmission from previous session. For DTLS we might need to retransmit messages from the previous session so keep a copy of write context in DTLS retransmission buffers instead of replacing it after sending CCS. CVE-2013-6450.
int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset, ssize_t len) { handle_t *handle; ext4_lblk_t block; unsigned int max_blocks; int ret = 0; int ret2 = 0; struct buffer_head map_bh; unsigned int credits, blkbits = inode->i_blkbits; block = offset >> blkbits; /* * We can't just co...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
265,047,446,096,514,220,000,000,000,000,000,000,000
48
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static apr_status_t send_out(h2_task *task, apr_bucket_brigade* bb, int block) { apr_off_t written, left; apr_status_t status; apr_brigade_length(bb, 0, &written); H2_TASK_OUT_LOG(APLOG_TRACE2, task, bb, "h2_task send_out"); h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "send_out(before)");...
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
138,126,504,793,803,100,000,000,000,000,000,000,000
32
* Fixed keepalives counter on slave connections.
static inline bool userfaultfd_huge_must_wait(struct userfaultfd_ctx *ctx, struct vm_area_struct *vma, unsigned long address, unsigned long flags, unsigned long reason) { struct mm_struct *mm = ctx->mm; pte_t *ptep, pte; bool ret = true; VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem)); ptep = ...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
137,334,860,377,888,430,000,000,000,000,000,000,000
31
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
static void at_context_transmit(struct context *ctx, struct fw_packet *packet) { unsigned long flags; int ret; spin_lock_irqsave(&ctx->ohci->lock, flags); if (HEADER_GET_DESTINATION(packet->header[0]) == ctx->ohci->node_id && ctx->ohci->generation == packet->generation) { spin_unlock_irqrestore(&ctx->ohci-...
0
[ "CWE-399" ]
linux-2.6
8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54
271,211,333,616,460,540,000,000,000,000,000,000,000
21
firewire: ohci: handle receive packets with a data length of zero Queueing to receive an ISO packet with a payload length of zero silently does nothing in dualbuffer mode, and crashes the kernel in packet-per-buffer mode. Return an error in dualbuffer mode, because the DMA controller won't let us do what we want, and...
SCK_Receive(int sock_fd, void *buffer, unsigned int length, int flags) { int r; r = recv(sock_fd, buffer, length, get_recv_flags(flags)); if (r < 0) { handle_recv_error(sock_fd, flags); return r; } DEBUG_LOG("Received data fd=%d len=%d", sock_fd, r); return r; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
48,211,062,023,748,210,000,000,000,000,000,000,000
15
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
void HllVal::agg_parse_and_cal(FunctionContext* ctx, const HllVal& other) { doris::HllSetResolver resolver; // zero size means the src input is a HyperLogLog object if (other.len == 0) { auto* hll = reinterpret_cast<doris::HyperLogLog*>(other.ptr); uint8_t* other_ptr = ctx->allocate(doris::...
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
119,146,607,151,349,530,000,000,000,000,000,000,000
44
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
flatpak_dir_pull_untrusted_local (FlatpakDir *self, const char *src_path, const char *remote_name, const char *ref, const char **subpaths, ...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
243,851,694,844,866,660,000,000,000,000,000,000,000
261
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static MagickBooleanType ReadRectangle(Image *image,PICTRectangle *rectangle) { rectangle->top=(short) ReadBlobMSBShort(image); rectangle->left=(short) ReadBlobMSBShort(image); rectangle->bottom=(short) ReadBlobMSBShort(image); rectangle->right=(short) ReadBlobMSBShort(image); if ((EOFBlob(image) != MagickFal...
0
[ "CWE-20", "CWE-252" ]
ImageMagick
6b6bff054d569a77973f2140c0e86366e6168a6c
312,982,078,353,627,700,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1199
signed char feh_wm_get_wm_is_e(void) { static signed char e = -1; /* check if E is actually running */ if (e == -1) { /* XXX: This only covers E17 prior to 6/22/05 */ if ((XInternAtom(disp, "ENLIGHTENMENT_COMMS", True) != None) && (XInternAtom(disp, "ENLIGHTENMENT_VERSION", True) != None)) { D(("Enligh...
0
[ "CWE-61", "CWE-787" ]
feh
f7a547b7ef8fc8ebdeaa4c28515c9d72e592fb6d
308,926,118,477,567,100,000,000,000,000,000,000,000
18
Fix double-free/OOB-write while receiving IPC data If a malicious client pretends to be the E17 window manager, it is possible to trigger an out of boundary heap write while receiving an IPC message. The length of the already received message is stored in an unsigned short, which overflows after receiving 64 KB of da...
flatpak_run_app (FlatpakDecomposed *app_ref, FlatpakDeploy *app_deploy, FlatpakContext *extra_context, const char *custom_runtime, const char *custom_runtime_version, const char *custom_runtime_commit, ...
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
271,124,851,576,921,560,000,000,000,000,000,000,000
501
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
GF_Err trep_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TrackExtensionPropertiesBox *ptr = (GF_TrackExtensionPropertiesBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->trackID); return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
212,143,762,961,631,240,000,000,000,000,000,000,000
11
fixed #1587
void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){ assert( iVar>0 ); assert( (v->db->flags & SQLITE_EnableQPSG)==0 ); if( iVar>=32 ){ v->expmask |= 0x80000000; }else{ v->expmask |= ((u32)1 << (iVar-1)); } }
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
51,100,525,455,349,960,000,000,000,000,000,000,000
9
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
PixarLogSetupDecode(TIFF* tif) { static const char module[] = "PixarLogSetupDecode"; TIFFDirectory *td = &tif->tif_dir; PixarLogState* sp = DecoderState(tif); tmsize_t tbuf_size; assert(sp != NULL); /* Make sure no byte swapping happens on the data * after decompression. */ tif->tif_postdecode = _TIFFNoPostD...
0
[ "CWE-369", "CWE-787" ]
libtiff
391e77fcd217e78b2c51342ac3ddb7100ecacdd2
35,301,842,538,832,957,000,000,000,000,000,000,000
44
* libtiff/tif_pixarlog.c: fix potential buffer write overrun in PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson)
static int sg_allow_access(struct file *filp, unsigned char *cmd) { struct sg_fd *sfp = filp->private_data; if (sfp->parentdp->device->type == TYPE_SCANNER) return 0; return blk_verify_command(cmd, filp->f_mode & FMODE_WRITE); }
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
308,792,549,208,398,100,000,000,000,000,000,000,000
9
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static inline size_t ColorToNodeId(const Image *image, const PixelInfo *pixel,size_t index) { size_t id; id=(size_t) ( ((ScaleQuantumToChar(ClampToQuantum(pixel->red)) >> index) & 0x01) | ((ScaleQuantumToChar(ClampToQuantum(pixel->green)) >> index) & 0x01) << 1 | ((ScaleQuantumToChar(ClampToQuant...
0
[ "CWE-190" ]
ImageMagick
94691f00839dbdf43edb1508af945ab19b388573
205,527,012,520,971,700,000,000,000,000,000,000,000
15
https://github.com/ImageMagick/ImageMagick/issues/1750
static int nfs4_delay_interruptible(long *timeout) { might_sleep(); freezable_schedule_timeout_interruptible_unsafe(nfs4_update_delay(timeout)); if (!signal_pending(current)) return 0; return __fatal_signal_pending(current) ? -EINTR :-ERESTARTSYS; }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
223,487,911,386,856,940,000,000,000,000,000,000,000
9
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
seconds_count_format_time_units (int seconds) { int minutes; int hours; if (seconds < 0) { /* Just to make sure... */ seconds = 0; } if (seconds < 60) { /* seconds */ return seconds; } if (seconds < 60 * 60) { /* minutes */ minut...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
279,173,638,144,825,330,000,000,000,000,000,000,000
35
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
DEFUN (neighbor_filter_list, neighbor_filter_list_cmd, NEIGHBOR_CMD2 "filter-list WORD (in|out)", NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Establish BGP filters\n" "AS path access-list name\n" "Filter incoming routes\n" "Filter outgoing routes\n") { return peer_aslist_s...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
269,456,325,571,512,630,000,000,000,000,000,000,000
13
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int send_png_rect(VncState *vs, int x, int y, int w, int h, VncPalette *palette) { png_byte color_type; png_structp png_ptr; png_infop info_ptr; png_colorp png_palette = NULL; int level = tight_png_conf[vs->tight.compression].png_zlib_level; int filters = tight_pn...
1
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
26,057,262,534,628,720,000,000,000,000,000,000,000
88
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta, struct sk_buff *skb) { if (!ieee80211_is_mgmt(fc)) return 0; if (sta == NULL || !test_sta_flag(sta, WLAN_STA_MFP)) return 0; if (!ieee80211_is_robust_mgmt_frame((struct ieee80211_hdr *) skb->data)) return 0; return 1; }
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
2,316,961,273,453,733,200,000,000,000,000,000,000
15
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
static void pci_tulip_exit(PCIDevice *pci_dev) { TULIPState *s = DO_UPCAST(TULIPState, dev, pci_dev); qemu_del_nic(s->nic); qemu_free_irq(s->irq); eeprom93xx_free(&pci_dev->qdev, s->eeprom); }
0
[ "CWE-787" ]
qemu
8ffb7265af64ec81748335ec8f20e7ab542c3850
232,301,218,404,731,840,000,000,000,000,000,000,000
8
net: tulip: check frame size and r/w data length Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-...
SpiceCoreInterfaceInternal* reds_get_core_interface(RedsState *reds) { return &reds->core; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
51,437,815,957,237,450,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
void cgi_setup(const char *rootdir, int auth_required) { bool authenticated = False; char line[1024]; char *url=NULL; char *p; char *lang; if (chdir(rootdir)) { cgi_setup_error("500 Server Error", "", "chdir failed - the server is not configured correctly"); } /* Handle the possibility we might be runni...
0
[]
samba
91f4275873ebeda8f57684f09df67162ae80515a
290,584,360,118,046,150,000,000,000,000,000,000,000
95
swat: Use additional nonce on XSRF protection If the user had a weak password on the root account of a machine running SWAT, there still was a chance of being targetted by an XSRF on a malicious web site targetting the SWAT setup. Use a random nonce stored in secrets.tdb to close this possible attack window. Thanks t...
static int i40e_alloc_rings(struct i40e_vsi *vsi) { int i, qpv = i40e_enabled_xdp_vsi(vsi) ? 3 : 2; struct i40e_pf *pf = vsi->back; struct i40e_ring *ring; /* Set basic values in the rings to be used later during open() */ for (i = 0; i < vsi->alloc_queue_pairs; i++) { /* allocate space for both Tx and Rx in on...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
258,511,688,132,845,550,000,000,000,000,000,000,000
65
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
void svm_update_lbrv(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); bool enable_lbrv = svm_get_lbr_msr(svm, MSR_IA32_DEBUGCTLMSR) & DEBUGCTLMSR_LBR; bool current_enable_lbrv = !!(svm->vmcb->control.virt_ext & LBR_CTL_ENABLE_MASK); if (unlikely(is_guest_mode(vcpu) && svm->lbrv_ena...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
36,237,243,048,526,707,000,000,000,000,000,000,000
22
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 ...
static void __exit sit_cleanup(void) { rtnl_link_unregister(&sit_link_ops); xfrm4_tunnel_deregister(&sit_handler, AF_INET6); xfrm4_tunnel_deregister(&ipip_handler, AF_INET); #if IS_ENABLED(CONFIG_MPLS) xfrm4_tunnel_deregister(&mplsip_handler, AF_MPLS); #endif unregister_pernet_device(&sit_net_ops); rcu_barrier()...
0
[ "CWE-703", "CWE-772", "CWE-401" ]
linux
07f12b26e21ab359261bf75cfcb424fdc7daeb6d
257,112,842,837,830,100,000,000,000,000,000,000,000
12
net: sit: fix memory leak in sit_init_net() If register_netdev() is failed to register sitn->fb_tunnel_dev, it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev). BUG: memory leak unreferenced object 0xffff888378daad00 (size 512): comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s) ...
void Filter::UpstreamRequest::decode100ContinueHeaders(Http::HeaderMapPtr&& headers) { ScopeTrackerScopeState scope(&parent_.callbacks_->scope(), parent_.callbacks_->dispatcher()); ASSERT(100 == Http::Utility::getResponseStatus(*headers)); parent_.onUpstream100ContinueHeaders(std::move(headers), *this); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
292,626,236,352,589,800,000,000,000,000,000,000,000
6
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...
static void xennet_maybe_wake_tx(struct netfront_queue *queue) { struct net_device *dev = queue->info->netdev; struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, queue->id); if (unlikely(netif_tx_queue_stopped(dev_queue)) && netfront_tx_slot_available(queue) && likely(netif_running(dev))) netif_t...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
153,294,176,513,509,520,000,000,000,000,000,000,000
10
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
static inline void reset_deferred_meminit(pg_data_t *pgdat) { unsigned long max_initialise; unsigned long reserved_lowmem; /* * Initialise at least 2G of a node but also take into account that * two large system hashes that can take up 1GB for 0.25TB/node. */ max_initialise = max(2UL << (30 - PAGE_SHIFT), ...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
63,428,463,790,614,040,000,000,000,000,000,000,000
24
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void ReluFree(TfLiteContext* context, void* buffer) { delete reinterpret_cast<ReluOpData*>(buffer); }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
57,698,423,152,799,450,000,000,000,000,000,000,000
3
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
bool Column_definition::fix_attributes_real(uint default_length) { /* change FLOAT(precision) to FLOAT or DOUBLE */ if (!length && !decimals) { length= default_length; decimals= NOT_FIXED_DEC; } if (length < decimals && decimals != NOT_FIXED_DEC) { my_error(ER_M_BIGGER_THAN_D, MYF(0), field_name...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
150,406,111,221,912,670,000,000,000,000,000,000,000
21
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 int cdrom_read_block(struct cdrom_device_info *cdi, struct packet_command *cgc, int lba, int nblocks, int format, int blksize) { const struct cdrom_device_ops *cdo = cdi->ops; memset(&cgc->cmd, 0, sizeof(cgc->cmd)); cgc->cmd[0] = GPCMD_READ_CD; /* expected sector size - cdda,mode1,etc. */ cgc...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
321,128,326,985,784,500,000,000,000,000,000,000,000
31
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
static int stub_suspend(struct usb_device *udev, pm_message_t message) { dev_dbg(&udev->dev, "stub_suspend\n"); return 0; }
0
[ "CWE-362" ]
linux
22076557b07c12086eeb16b8ce2b0b735f7a27e7
513,549,442,504,964,900,000,000,000,000,000,000
6
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip_host updates device status without holding lock from stub probe, disconnect and rebind code paths. When multiple requests to import a device are received, these unprotected code paths step all over each other and drive fails with NULL-ptr deref and ...
FindFileSetDescriptor ( IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN UDF_VOLUME_INFO *Volume ) { EFI_STATUS Status; UINT64 Lsn; UDF_LOGICAL_VOLUME_DESCRIPTOR *LogicalVolDesc; UDF_DESCRIPTOR_TAG ...
0
[]
edk2
b9ae1705adfdd43668027a25a2b03c2e81960219
101,118,364,732,052,370,000,000,000,000,000,000,000
47
MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 The commit refines the boundary checks for file/path name string to prevent possible buffer overrun. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: ...
TEST_F(QueryPlannerTest, MultikeyComplexDoubleDotted) { // true means multikey addIndex(BSON("a.b.c" << 1 << "a.e.f" << 1 << "a.b.d" << 1 << "a.e.g" << 1), true); runQuery( fromjson("{'a.b': {$elemMatch: {c: 1, d: 1}}, " "'a.e': {$elemMatch: {f: 1, g: 1}}}")); assertNumSolution...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
99,029,272,228,469,070,000,000,000,000,000,000,000
16
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc) { int i; if (newdesc->natts < olddesc->natts) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), errmsg("cannot drop columns from view"))); for (i = 0; i < olddesc->natts; i++) { Form_pg_attribute newattr = TupleDescAttr(newdesc, i); ...
0
[ "CWE-94" ]
postgres
5579726bd60a6e7afb04a3548bced348cd5ffd89
102,684,369,268,374,100,000,000,000,000,000,000,000
46
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static inline void VectorClamp3(DDSVector3 *value) { value->x = MagickMin(1.0f,MagickMax(0.0f,value->x)); value->y = MagickMin(1.0f,MagickMax(0.0f,value->y)); value->z = MagickMin(1.0f,MagickMax(0.0f,value->z)); }
0
[ "CWE-20", "CWE-617" ]
ImageMagick
0c5b1e430a83ef793a7334bbbee408cf3c628699
160,149,776,120,655,450,000,000,000,000,000,000,000
6
Added check to prevent image being 0x0 (reported in #489).
ModuleExport size_t RegisterJP2Image(void) { char version[MagickPathExtent]; MagickInfo *entry; *version='\0'; #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE) (void) FormatLocaleString(version,MagickPathExtent,"%s",opj_version()); #endif entry=AcquireMagickInfo("JP2","JP2","JPEG-2000 File Format Syntax"...
0
[ "CWE-665" ]
ImageMagick
90c4afcde1bf3ad5aead4477716161c350b049f8
321,946,005,694,254,720,000,000,000,000,000,000,000
92
https://github.com/ImageMagick/ImageMagick/issues/1518
static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, const struct in6_addr *group) { struct sk_buff *skb; struct ipv6hdr *ip6h; struct mld_msg *mldq; struct ethhdr *eth; u8 *hopopt; unsigned long interval; skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) + ...
0
[]
linux
9f00b2e7cf241fa389733d41b615efdaa2cb0f5b
300,707,381,483,440,570,000,000,000,000,000,000,000
79
bridge: only expire the mdb entry when query is received Currently we arm the expire timer when the mdb entry is added, however, this causes problem when there is no querier sent out after that. So we should only arm the timer when a corresponding query is received, as suggested by Herbert. And he also mentioned "if...
static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep, struct dwc3_request *req) { struct scatterlist *sg = req->sg; struct scatterlist *s; int i; for_each_sg(sg, s, req->num_pending_sgs, i) { unsigned int length = req->request.length; unsigned int maxp = usb_endpoint_maxp(dep->endpoint.desc); unsigned ...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
134,827,183,441,152,080,000,000,000,000,000,000,000
40
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
InputFile::rawPixelData (int firstScanLine, const char *&pixelData, int &pixelDataSize) { try { if (_data->dsFile) { throw IEX_NAMESPACE::ArgExc ("Tried to read a raw scanline " "from a deep image."); } else if (_data->isTiled) { throw IEX_...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
279,582,632,688,186,300,000,000,000,000,000,000,000
27
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void foveon_load_raw() {}
0
[]
LibRaw
c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
240,559,708,760,193,140,000,000,000,000,000,000,000
1
additional data checks backported from 0.15.4
void CascadeClassifierImpl::read(const FileNode& node) { read_(node); }
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
220,489,983,418,969,750,000,000,000,000,000,000,000
4
objdetect: validate feature rectangle on reading
static GF_DOVIDecoderConfigurationRecord* DOVI_DuplicateConfig(GF_DOVIDecoderConfigurationRecord *cfg) { GF_DOVIDecoderConfigurationRecord* out = NULL; GF_SAFEALLOC(out, GF_DOVIDecoderConfigurationRecord); if (!out) return NULL; out->dv_version_major = cfg->dv_version_major; out->dv_version_minor = cfg->dv_versio...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
109,827,802,107,549,940,000,000,000,000,000,000,000
16
fixed #1785 (fuzz)
Item_args(Item *a) :args(tmp_arg), arg_count(1) { args[0]= a; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
39,732,291,047,470,280,000,000,000,000,000,000,000
5
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
resolve_when(struct lyd_node *node, int ignore_fail, struct lys_when **failed_when) { struct lyd_node *ctx_node = NULL, *unlinked_nodes, *tmp_node; struct lys_node *sparent; struct lyxp_set set; enum lyxp_node_type ctx_node_type; struct ly_ctx *ctx = node->schema->module->ctx; int rc = 0; a...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
123,780,936,016,852,100,000,000,000,000,000,000,000
170
schema tree BUGFIX do not check features while still resolving schema Fixes #723
void invalidateUsersFromDB(OperationContext*, const StringData dbname) override { UASSERT_NOT_IMPLEMENTED; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
148,277,554,897,089,430,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static int cma_alloc_any_port(struct idr *ps, struct rdma_id_private *id_priv) { static unsigned int last_used_port; int low, high, remaining; unsigned int rover; inet_get_local_port_range(&init_net, &low, &high); remaining = (high - low) + 1; rover = prandom_u32() % remaining + low; retry: if (last_used_port !...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
303,133,520,926,093,470,000,000,000,000,000,000,000
30
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
isdn_net_open(struct net_device *dev) { int i; struct net_device *p; struct in_device *in_dev; /* moved here from isdn_net_reset, because only the master has an interface associated which is supposed to be started. BTW: we need to call netif_start_queue, not netif_wake_queue here */ netif_start_queue(dev)...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
235,863,143,952,921,200,000,000,000,000,000,000,000
35
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static u8 __rc_to_ib_wc_status(u8 qstatus) { switch (qstatus) { case CQ_RES_RC_STATUS_OK: return IB_WC_SUCCESS; case CQ_RES_RC_STATUS_LOCAL_ACCESS_ERROR: return IB_WC_LOC_ACCESS_ERR; case CQ_RES_RC_STATUS_LOCAL_LENGTH_ERR: return IB_WC_LOC_LEN_ERR; case CQ_RES_RC_STATUS_LOCAL_PROTECTION_ERR: return IB_WC_L...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
90,490,445,476,120,570,000,000,000,000,000,000,000
25
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
bgp_update_next_hop(struct bgp_export_state *s, eattr *a, ea_list **to) { s->channel->desc->update_next_hop(s, a, to); }
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
90,632,698,903,820,570,000,000,000,000,000,000,000
4
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
isofile_add_entry(struct iso9660 *iso9660, struct isofile *file) { file->allnext = NULL; *iso9660->all_file_list.last = file; iso9660->all_file_list.last = &(file->allnext); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
234,542,952,515,967,060,000,000,000,000,000,000,000
6
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
simplify_filename(char_u *filename) { #ifndef AMIGA // Amiga doesn't have "..", it uses "/" int components = 0; char_u *p, *tail, *start; int stripping_disabled = FALSE; int relative = TRUE; p = filename; # ifdef BACKSLASH_IN_FILENAME if (p[1] == ':') // skip "x:" p += 2; # endif ...
0
[ "CWE-122" ]
vim
615ddd5342b50a6878a907062aa471740bd9a847
140,156,833,121,497,480,000,000,000,000,000,000,000
212
patch 8.2.3611: crash when using CTRL-W f without finding a file name Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero.
static bool func_states_equal(struct bpf_func_state *old, struct bpf_func_state *cur) { struct idpair *idmap; bool ret = false; int i; idmap = kcalloc(ID_MAP_SIZE, sizeof(struct idpair), GFP_KERNEL); /* If we failed to allocate the idmap, just say it's not safe */ if (!idmap) return false; for (i = ...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
309,939,755,102,236,500,000,000,000,000,000,000,000
24
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
int fetch_populated_submodules(const struct argv_array *options, const char *prefix, int command_line_option, int quiet, int max_parallel_jobs) { int i; struct submodule_parallel_fetch spf = SPF_INIT; spf.work_tree = get_git_work_tree(); spf.command_line_option = command_line_option; spf.quiet...
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
301,251,217,047,947,050,000,000,000,000,000,000,000
39
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
crypto_retrieve_X509_key_usage(krb5_context context, pkinit_plg_crypto_context plgcctx, pkinit_req_crypto_context reqcctx, X509 *x, unsigned int *ret_ku_bits, unsign...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
299,164,881,183,950,940,000,000,000,000,000,000,000
73
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
static int futex_requeue(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bu...
0
[ "CWE-269" ]
linux
54a217887a7b658e2650c3feff22756ab80c7339
129,883,524,039,831,480,000,000,000,000,000,000,000
244
futex: Make lookup_pi_state more robust The current implementation of lookup_pi_state has ambigous handling of the TID value 0 in the user space futex. We can get into the kernel even if the TID value is 0, because either there is a stale waiters bit or the owner died bit is set or we are called from the requeue_pi p...
TfLiteRegistration* Register_L2_POOL_2D() { return Register_L2_POOL_GENERIC_OPT(); }
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
100,039,338,326,061,550,000,000,000,000,000,000,000
3
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
GF_Err gf_isom_linf_write_entry(void *entry, GF_BitStream *bs) { GF_LHVCLayerInformation* ptr = (GF_LHVCLayerInformation *)entry; u32 i, count; if (!ptr) return GF_OK; gf_bs_write_int(bs, 0, 2); count=gf_list_count(ptr->num_layers_in_track); gf_bs_write_int(bs, count, 6); for (i = 0; i < count; i++) { LHVCLay...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
161,439,112,741,275,100,000,000,000,000,000,000,000
20
fixed #1785 (fuzz)
ip_invoke_with_position(argc, argv, obj, position) int argc; VALUE *argv; VALUE obj; Tcl_QueuePosition position; { struct invoke_queue *ivq; #ifdef RUBY_USE_NATIVE_THREAD struct tcltkip *ptr; #endif int *alloc_done; int thr_crit_bup; volatile VALUE current = rb_thread_current(); ...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
164,452,309,049,441,430,000,000,000,000,000,000,000
173
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, struct ecryptfs_crypt_stat *crypt_stat) { struct scatterlist dst_sg[2]; struct scatterlist src_sg[2]; struct mutex *tfm_mutex; struct blkcipher_desc desc = { .flags = CRYPTO_TFM_REQ_MAY_SLEEP }; int rc = 0; if (unlikely(ecryptf...
0
[ "CWE-119" ]
linux-2.6
6352a29305373ae6196491e6d4669f301e26492e
281,272,478,414,182,250,000,000,000,000,000,000,000
79
eCryptfs: Check Tag 11 literal data buffer size Tag 11 packets are stored in the metadata section of an eCryptfs file to store the key signature(s) used to encrypt the file encryption key. After extracting the packet length field to determine the key signature length, a check is not performed to see if the length woul...
bool dwgCompressor::decompress21(duint8 *cbuf, duint8 *dbuf, duint64 csize, duint64 dsize){ compressedBuffer = cbuf; decompBuffer = dbuf; compressedSize = csize; decompSize = dsize; compressedPos = 0; decompPos = 0; compressedGood = true; decompGood = true; duint32 length {0}; d...
0
[ "CWE-191" ]
libdxfrw
6417118874333309aa10c4e59f954c3905a6e8b5
320,372,015,897,603,900,000,000,000,000,000,000,000
75
fixed heap buffer overflow vulnerability CVE-2021-21899 as reported in TALOS-2021-1350 / CVE-2021-21899, dwgCompressor::decompress21() could be abused with a malformed DWG file to force heap buffer overflow and possibly lead to malicious code execution.
static ssize_t o2nm_node_local_store(struct config_item *item, const char *page, size_t count) { struct o2nm_node *node = to_o2nm_node(item); struct o2nm_cluster *cluster = to_o2nm_cluster_from_node(node); unsigned long tmp; char *p = (char *)page; ssize_t ret; tmp = simple_strtoul(p, &p, 0); if (!p ||...
1
[ "CWE-476", "CWE-284" ]
linux
853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
37,063,656,404,823,785,000,000,000,000,000,000,000
49
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent The subsystem.su_mutex is required while accessing the item->ci_parent, otherwise, NULL pointer dereference to the item->ci_parent will be triggered in the following situation: add node delete node sys_write vfs_write con...
void __fastcall Download(TTerminal * Terminal, const UnicodeString FileName, int UseDefaults) { TRemoteFile * File = NULL; try { Terminal->ExceptionOnFail = true; try { Terminal->ReadFile(FileName, File); } __finally { Terminal->ExceptionOnFail = false; } ...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
320,183,854,249,079,530,000,000,000,000,000,000,000
69
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
static vpx_codec_err_t ctrl_set_spatial_layer_svc(vpx_codec_alg_priv_t *ctx, va_list args) { ctx->svc_decoding = 1; ctx->svc_spatial_layer = va_arg(args, int); if (ctx->svc_spatial_layer < 0) return VPX_CODEC_INVALID_PARAM; else return VPX_CODEC_OK; }
0
[ "CWE-125" ]
libvpx
0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88
310,848,566,122,913,800,000,000,000,000,000,000,000
9
vp9: fix OOB read in decoder_peek_si_internal Profile 1 or 3 bitstreams may require 11 bytes for the header in the intra-only case. Additionally add a check on the bit reader's error handler callback to ensure it's non-NULL before calling to avoid future regressions. This has existed since at least (pre-1.4.0): 09bf...
void FontViewFinishNonStatic() { FontViewFinish(); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
45,059,325,708,308,750,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
long SSL_CTX_set_tmp_dh(SSL_CTX* ctx, DH* dh) { if (ctx->SetDH(*dh)) return SSL_SUCCESS; else return SSL_FAILURE; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
295,989,722,025,400,440,000,000,000,000,000,000,000
7
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void rand_fork(void) { rand_fork_count++; }
1
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
320,157,412,070,372,870,000,000,000,000,000,000,000
4
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
HttpStateData::peerSupportsConnectionPinning() const { if (!_peer) return true; /*If this peer does not support connection pinning (authenticated connections) return false */ if (!_peer->connection_auth) return false; const HttpReply *rep = entry->mem_obj->getReply(); /...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
235,902,116,588,452,860,000,000,000,000,000,000,000
50
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
int tty_dev_name_to_number(const char *name, dev_t *number) { struct tty_driver *p; int ret; int index, prefix_length = 0; const char *str; for (str = name; *str && !isdigit(*str); str++) ; if (!*str) return -EINVAL; ret = kstrtoint(str, 10, &index); if (ret) return ret; prefix_length = str - name; ...
0
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
227,330,003,349,194,200,000,000,000,000,000,000,000
35
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, char *page) { return sprintf(page, "0x%02x\n", to_config_usb_cfg(item)->c.bmAttributes); }
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
81,799,902,034,832,080,000,000,000,000,000,000,000
6
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
static int rr_handle_error(READ_RECORD *info, int error) { if (info->thd->killed) { info->thd->send_kill_message(); return 1; } if (error == HA_ERR_END_OF_FILE) error= -1; else { if (info->print_error) info->table->file->print_error(error, MYF(0)); if (error < 0) ...
0
[]
server
1b8bb44106f528f742faa19d23bd6e822be04f39
98,297,620,176,039,860,000,000,000,000,000,000,000
19
MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra use the correct check. before invoking handler methods we need to know that the table was opened, not only created.
int OSD::update_crush_device_class() { if (!cct->_conf->osd_class_update_on_start) { dout(10) << __func__ << " osd_class_update_on_start = false" << dendl; return 0; } string device_class; int r = store->read_meta("crush_device_class", &device_class); if (r < 0 || device_class.empty()) { device_c...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
140,199,192,138,050,390,000,000,000,000,000,000,000
31
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
void reset_term() { struct termios oldt, newt; tcgetattr( STDIN_FILENO, &oldt ); newt = oldt; newt.c_lflag |= ( ICANON | ECHO ); tcsetattr( STDIN_FILENO, TCSANOW, &newt ); }
0
[ "CWE-787" ]
aircrack-ng
ff70494dd389ba570dbdbf36f217c28d4381c6b5
68,423,637,948,110,560,000,000,000,000,000,000,000
8
Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab
processingInstructionSplit(void *ctx, const xmlChar *target, const xmlChar *data) { xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx; if ((ctxt != NULL) && (ctxt->user_sax != NULL) && (ctxt->user_sax->processingInstruction != NULL)) ctxt->user_sax->processingInstruction(ctxt->...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
268,662,411,360,742,670,000,000,000,000,000,000,000
8
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void sqlite3Fts5UnicodeAscii(u8 *aArray, u8 *aAscii){ int i = 0; int iTbl = 0; while( i<128 ){ int bToken = aArray[ aFts5UnicodeData[iTbl] & 0x1F ]; int n = (aFts5UnicodeData[iTbl] >> 5) + i; for(; i<128 && i<n; i++){ aAscii[i] = (u8)bToken; } iTbl++; } aAscii[0] = 0; ...
0
[ "CWE-787" ]
sqlite
d1d43efa4fb0f2098c0e2c5bf2e807c58d5ec05b
138,808,873,422,941,300,000,000,000,000,000,000,000
13
Prevent fts5 tokenizer unicode61 from considering '\0' to be a token characters, even if other characters of class "Cc" are. FossilOrigin-Name: b7b7bde9b7a03665e3691c6d51118965f216d2dfb1617f138b9f9e60e418ed2f
small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon, void **request_buf) { int rc = 0; rc = smb2_reconnect(smb2_command, tcon); if (rc) return rc; /* BB eventually switch this to SMB2 specific small buf size */ *request_buf = cifs_small_buf_get(); if (*request_buf == NULL) { /* BB should we add a ...
0
[ "CWE-399" ]
linux
18f39e7be0121317550d03e267e3ebd4dbfbb3ce
292,738,246,065,583,020,000,000,000,000,000,000,000
28
[CIFS] Possible null ptr deref in SMB2_tcon As Raphael Geissert pointed out, tcon_error_exit can dereference tcon and there is one path in which tcon can be null. Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> # v3.7+ Reported-by: Raphael Geissert <geissert@debian.org>
static void show_warnings(void) { if (g_warning_issued) gtk_widget_show(g_widget_warnings_area); }
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
303,165,529,910,482,250,000,000,000,000,000,000,000
5
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
spell_load_file( char_u *fname, char_u *lang, slang_T *old_lp, int silent) // no error if file doesn't exist { FILE *fd; char_u buf[VIMSPELLMAGICL]; char_u *p; int i; int n; int len; slang_T *lp = NULL; int c = 0; int res; int did_estack_push = FALSE; ...
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
322,906,534,194,886,200,000,000,000,000,000,000,000
254
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.
pmd_t *page_check_address_pmd(struct page *page, struct mm_struct *mm, unsigned long address, enum page_check_address_pmd_flag flag) { pgd_t *pgd; pud_t *pud; pmd_t *pmd, *ret = NULL; if (address & ~HPAGE_PMD_MASK) goto out; pgd = pgd_offset(mm, address); if (!pgd_present(*pgd)) g...
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
224,639,426,342,920,900,000,000,000,000,000,000,000
43
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
peer_timers_connect_set_vty (struct vty *vty, const char *ip_str, const char *time_str) { int ret; struct peer *peer; u_int32_t connect; peer = peer_lookup_vty (vty, ip_str); if (! peer) return CMD_WARNING; VTY_GET_INTEGER_RANGE ("Connect time", connect, time_str, 0, 6553...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
198,929,805,275,792,850,000,000,000,000,000,000,000
17
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
void gf_fs_push_arg(GF_FilterSession *session, const char *szArg, u32 was_found, u32 type) { if (session->flags & GF_FS_FLAG_NO_ARG_CHECK) return; if (!was_found) { Bool afound = GF_FALSE; u32 k, acount; if (!session->parsed_args) session->parsed_args = gf_list_new(); acount = gf_list_count(session->parsed...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
213,276,565,326,034,000,000,000,000,000,000,000,000
53
fixed crashes for very long path - cf #1908
restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) { int err = 0; int fpvalid; err |= __get_user (fpvalid, &sc->sc_fpvalid); conditional_used_math(fpvalid); if (! fpvalid) return err; if (current == last_task_used_math) { last_task_used_math = NULL; regs->sr |= SR_FD; } err |= _...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
209,436,951,587,957,860,000,000,000,000,000,000,000
20
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void TearDown() override { if (eds_connection_ != nullptr) { AssertionResult result = eds_connection_->close(); RELEASE_ASSERT(result, result.message()); result = eds_connection_->waitForDisconnect(); RELEASE_ASSERT(result, result.message()); eds_connection_.reset(); } }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
316,437,588,748,089,560,000,000,000,000,000,000,000
9
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
virtual void get_cache_parameters(List<Item> &parameters) { };
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
109,989,763,490,232,270,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
int Elf_(r_bin_elf_has_va)(ELFOBJ *bin) { return true; }
0
[ "CWE-125" ]
radare2
c6d0076c924891ad9948a62d89d0bcdaf965f0cd
261,990,101,012,664,900,000,000,000,000,000,000,000
3
Fix #8731 - Crash in ELF parser with negative 32bit number
GF_Box *trik_New() { ISOM_DECL_BOX_ALLOC(GF_TrickPlayBox, GF_ISOM_BOX_TYPE_TRIK); return (GF_Box *)tmp; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
320,615,496,372,330,700,000,000,000,000,000,000,000
5
fixed 2 possible heap overflows (inc. #1088)
g_tls_connection_base_dtls_handshake_async (GDtlsConnection *conn, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, ...
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
30,307,550,931,434,765,000,000,000,000,000,000,000
9
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
static int platform_drv_probe(struct device *_dev) { struct platform_driver *drv = to_platform_driver(_dev->driver); struct platform_device *dev = to_platform_device(_dev); int ret; ret = of_clk_set_defaults(_dev->of_node, false); if (ret < 0) return ret; ret = dev_pm_domain_attach(_dev, true); if (ret) go...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
281,199,690,238,720,740,000,000,000,000,000,000,000
28
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...
Value ExpressionNary::serialize(bool explain) const { const size_t nOperand = vpOperand.size(); vector<Value> array; /* build up the array */ for (size_t i = 0; i < nOperand; i++) array.push_back(vpOperand[i]->serialize(explain)); return Value(DOC(getOpName() << array)); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
311,502,231,571,776,460,000,000,000,000,000,000,000
9
SERVER-38070 fix infinite loop in agg expression
static void krb5_child_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data(subreq, struct tevent_req); struct krb5_auth_state *state = tevent_req_data(req, struct krb5_auth_state); struct krb5child_req *kr = state->kr; struct pam_data *pd = state->pd; int ret; ui...
0
[ "CWE-287" ]
sssd
fffdae81651b460f3d2c119c56d5caa09b4de42a
203,036,353,135,107,420,000,000,000,000,000,000,000
213
Fix bad password caching when using automatic TGT renewal Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856
static void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b) { /* init_cfs_bandwidth() was not called */ if (!cfs_b->throttled_cfs_rq.next) return; hrtimer_cancel(&cfs_b->period_timer); hrtimer_cancel(&cfs_b->slack_timer); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
45,193,031,018,166,690,000,000,000,000,000,000,000
9
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
R_API int r_egg_include(REgg *egg, const char *file, int format) { int sz; const ut8 *foo = (const ut8 *)r_file_slurp (file, &sz); if (!foo) { return 0; } // XXX: format breaks compiler layers switch (format) { case 'r': // raw r_egg_raw (egg, foo, sz); break; case 'a': // assembly r_buf_append_bytes (e...
0
[ "CWE-125" ]
radare2
e710401ebb4a892a87b0c709d709af8b5dcbbb01
146,840,584,698,792,100,000,000,000,000,000,000,000
20
patch #14211 heap buffer overflow in large ragg2 inputs. this should be refactored to use an RBuffer to enable dynamic resizing, but for now just patching it to bail out if we are about to overwrite the allocated statically sized buffer
void ping_unhash(struct sock *sk) { struct inet_sock *isk = inet_sk(sk); pr_debug("ping_unhash(isk=%p,isk->num=%u)\n", isk, isk->inet_num); write_lock_bh(&ping_table.lock); if (sk_hashed(sk)) { hlist_nulls_del(&sk->sk_nulls_node); sk_nulls_node_init(&sk->sk_nulls_node); sock_put(sk); isk->inet_num = 0; i...
0
[]
net
43a6684519ab0a6c52024b5e25322476cabad893
227,374,409,552,743,070,000,000,000,000,000,000,000
16
ping: implement proper locking We got a report of yet another bug in ping http://www.openwall.com/lists/oss-security/2017/03/24/6 ->disconnect() is not called with socket lock held. Fix this by acquiring ping rwlock earlier. Thanks to Daniel, Alexander and Andrey for letting us know this problem. Fixes: c319b4d76...
int usb_add_function(struct usb_configuration *config, struct usb_function *function) { int value = -EINVAL; DBG(config->cdev, "adding '%s'/%p to config '%s'/%p\n", function->name, function, config->label, config); if (!function->set_alt || !function->disable) goto done; function->config = config; lis...
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
226,248,464,618,050,800,000,000,000,000,000,000,000
51
USB: gadget: validate interface OS descriptor requests Stall the control endpoint in case provided index exceeds array size of MAX_CONFIG_INTERFACES or when the retrieved function pointer is null. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregk...