func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GF_Err segr_box_read(GF_Box *s, GF_BitStream *bs) { u32 i, k; FDSessionGroupBox *ptr = (FDSessionGroupBox *)s; ISOM_DECREASE_SIZE(ptr, 2); ptr->num_session_groups = gf_bs_read_u16(bs); if (ptr->size < ptr->num_session_groups) { GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid number of entries %d in ...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
288,691,141,486,311,130,000,000,000,000,000,000,000
41
fixed #2255
gopherReadReply(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data) { GopherStateData *gopherState = (GopherStateData *)data; StoreEntry *entry = gopherState->entry; int clen; int bin; size_t read_sz = BUFSIZ; #if USE_DELAY_POOLS DelayId delayId =...
0
[ "CWE-400" ]
squid
780c4ea1b4c9d2fb41f6962aa6ed73ae57f74b2b
65,620,472,528,316,290,000,000,000,000,000,000,000
102
Improve handling of Gopher responses (#1022)
static int uvc_parse_streaming(struct uvc_device *dev, struct usb_interface *intf) { struct uvc_streaming *streaming = NULL; struct uvc_format *format; struct uvc_frame *frame; struct usb_host_interface *alts = &intf->altsetting[0]; unsigned char *_buffer, *buffer = alts->extra; int _buflen, buflen = alts->extra...
0
[ "CWE-120" ]
linux-2.6
233548a2fd934a0220db8b1521c0bc88c82e5e53
135,087,067,344,315,410,000,000,000,000,000,000,000
239
V4L/DVB (8207): uvcvideo: Fix a buffer overflow in format descriptor parsing Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
xmlParseTextDecl(xmlParserCtxtPtr ctxt) { xmlChar *version; const xmlChar *encoding; int oldstate; /* * We know that '<?xml' is here. */ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) { SKIP(5); } else { xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_STARTED, NULL); ...
0
[ "CWE-776" ]
libxml2
8598060bacada41a0eb09d95c97744ff4e428f8e
1,474,217,015,069,217,400,000,000,000,000,000,000
69
Patch for security issue CVE-2021-3541 This is relapted to parameter entities expansion and following the line of the billion laugh attack. Somehow in that path the counting of parameters was missed and the normal algorithm based on entities "density" was useless.
PLy_push_execution_context(void) { PLyExecutionContext *context = PLy_malloc(sizeof(PLyExecutionContext)); context->curr_proc = NULL; context->scratch_ctx = AllocSetContextCreate(TopTransactionContext, "PL/Python scratch context", ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INI...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
113,244,981,105,942,560,000,000,000,000,000,000,000
14
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
ico_load_layer (FILE *fp, gint32 image, gint32 icon_num, guchar *buffer, gint maxsize, IcoLoadInfo *info) { gint width, height; gint32 layer; guint32 first_bytes; GimpDrawable *d...
0
[]
gimp
323ecb73f7bf36788fb7066eb2d6678830cd5de7
241,451,860,897,443,360,000,000,000,000,000,000,000
49
Bug 773233 - CVE-2007-3126 - Gimp 2.3.14 allows context-dependent attackers... ...to cause a denial of service (crash) via an ICO file with an InfoHeader containing a Height of zero Add some error handling to ico-load.c and bail out on zero width or height icons. Also some formatting cleanup. (cherry picked from com...
lsquic_qeh_settings (struct qpack_enc_hdl *qeh, unsigned max_table_size, unsigned dyn_table_size, unsigned max_risked_streams, int server) { enum lsqpack_enc_opts enc_opts; assert(qeh->qeh_flags & QEH_INITIALIZED); if (qeh->qeh_flags & QEH_HAVE_SETTINGS) { LSQ_WARN("settings alrea...
0
[ "CWE-476", "CWE-269" ]
lsquic
a74702c630e108125e71898398737baec8f02238
325,482,743,200,506,250,000,000,000,000,000,000,000
35
Release 3.1.0
static bool llsec_key_id_equal(const struct ieee802154_llsec_key_id *a, const struct ieee802154_llsec_key_id *b) { if (a->mode != b->mode) return false; if (a->mode == IEEE802154_SCF_KEY_IMPLICIT) return ieee802154_addr_equal(&a->device_addr, &b->device_addr); if (a->id != b->id) return false; sw...
0
[ "CWE-416" ]
linux
1165affd484889d4986cf3b724318935a0b120d8
262,011,064,445,953,600,000,000,000,000,000,000,000
23
net: mac802154: Fix general protection fault syzbot found general protection fault in crypto_destroy_tfm()[1]. It was caused by wrong clean up loop in llsec_key_alloc(). If one of the tfm array members is in IS_ERR() range it will cause general protection fault in clean up function [1]. Call Trace: crypto_free_aead ...
static inline void *get_freepointer_safe(struct kmem_cache *s, void *object) { unsigned long freepointer_addr; void *p; if (!debug_pagealloc_enabled_static()) return get_freepointer(s, object); freepointer_addr = (unsigned long)object + s->offset; probe_kernel_read(&p, (void **)freepointer_addr, sizeof(p)); r...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
219,877,239,184,882,120,000,000,000,000,000,000,000
12
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { CallInfo *ci = L->ci; const char *msg; va_list argp; luaC_checkGC(L); /* error message uses memory */ va_start(argp, fmt); msg = luaO_pushvfstring(L, fmt, argp); /* format message */ va_end(argp); if (isLua(ci)) { /* if Lua function, add so...
0
[ "CWE-787" ]
lua
42d40581dd919fb134c07027ca1ce0844c670daf
286,709,536,620,449,370,000,000,000,000,000,000,000
15
Save stack space while handling errors Because error handling (luaG_errormsg) uses slots from EXTRA_STACK, and some errors can recur (e.g., string overflow while creating an error message in 'luaG_runerror', or a C-stack overflow before calling the message handler), the code should use stack slots with parsimony. Thi...
void GraphConstructor::RemapNodeDefInputs( NodeDef* node_def, std::vector<bool>* input_already_exists) { DCHECK_EQ(input_already_exists->size(), node_def->input_size()); std::set<TensorId> control_inputs; std::vector<int> inputs_to_remove; for (int i = 0; i < node_def->input_size(); ++i) { auto iter = ...
0
[ "CWE-125", "CWE-369", "CWE-908" ]
tensorflow
0cc38aaa4064fd9e79101994ce9872c6d91f816b
165,188,077,234,458,050,000,000,000,000,000,000,000
28
Prevent unitialized memory access in `GraphConstructor::MakeEdge` The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr...
intrusive_ptr<Expression> ExpressionReplaceOne::parse(ExpressionContext* const expCtx, BSONElement expr, const VariablesParseState& vps) { auto [input, find, replacement] = parseExpressionReplaceBase(opName, ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
309,898,713,362,840,200,000,000,000,000,000,000,000
7
SERVER-49404 Enforce additional checks in $arrayToObject
size_t vmxnet_tx_pkt_get_total_len(struct VmxnetTxPkt *pkt) { assert(pkt); return pkt->hdr_len + pkt->payload_len; }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
181,532,987,098,777,670,000,000,000,000,000,000,000
6
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static int ip_mc_check_igmp_csum(struct sk_buff *skb) { unsigned int len = skb_transport_offset(skb) + sizeof(struct igmphdr); unsigned int transport_len = ip_transport_len(skb); struct sk_buff *skb_chk; if (!ip_mc_may_pull(skb, len)) return -EINVAL; skb_chk = skb_checksum_trimmed(skb, transport_len, ...
0
[ "CWE-362" ]
linux
23d2b94043ca8835bd1e67749020e839f396a1c2
20,912,170,247,041,316,000,000,000,000,000,000,000
19
igmp: Add ip_mc_list lock in ip_check_mc_rcu I got below panic when doing fuzz test: Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9...
void CiffComponent::add(UniquePtr component) { doAddComponent(std::move(component)); }
0
[ "CWE-125" ]
exiv2
9628f82084ed30d494ddd4f7360d233801e22967
268,834,054,214,160,680,000,000,000,000,000,000,000
4
Avoid integer overflow. (cherry picked from commit c0ecc2ae36f34462be98623deb85ba1747ae2175)
static SQInteger weakref_ref(HSQUIRRELVM v) { if(SQ_FAILED(sq_getweakrefval(v,1))) return SQ_ERROR; return 1; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
310,698,062,610,023,770,000,000,000,000,000,000,000
6
fix in thread.call
static void mutt_convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s) { char bufo[BUFO_SIZE]; ICONV_CONST char *ib; char *ob; size_t ibl, obl; if (!bufi) { if (cd != (iconv_t)(-1)) { ob = bufo, obl = sizeof (bufo); iconv (cd, 0, 0, &ob, &obl); if (ob != bufo) state_prefi...
0
[ "CWE-120" ]
mutt
e5ed080c00e59701ca62ef9b2a6d2612ebf765a5
312,713,359,255,037,850,000,000,000,000,000,000,000
38
Fix uudecode buffer overflow. mutt_decode_uuencoded() used each line's initial "length character" without any validation. It would happily read past the end of the input line, and with a suitable value even past the length of the input buffer. As I noted in ticket 404, there are several other changes that could be a...
int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, int ignore_error) { static struct snd_device_ops dev_ops = { .dev_free = snd_usb_mixer_dev_free }; struct usb_mixer_interface *mixer; int err; strcpy(chip->card->mixername, "USB Mixer"); mixer = kzalloc(sizeof(*mixer), GFP_KERNEL); if (!mix...
0
[ "CWE-674" ]
sound
19bce474c45be69a284ecee660aa12d8f1e88f18
176,397,493,962,354,440,000,000,000,000,000,000,000
75
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers e...
SECURITY_STATUS SEC_ENTRY DeleteSecurityContext(PCtxtHandle phContext) { char* Name = NULL; SECURITY_STATUS status; SecurityFunctionTableA* table; Name = (char*) sspi_SecureHandleGetUpperPointer(phContext); if (!Name) return SEC_E_SECPKG_NOT_FOUND; table = sspi_GetSecurityFunctionTableAByNameA(Name); if (!...
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
34,805,596,036,818,940,000,000,000,000,000,000,000
23
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 void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net) { }
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
18,806,022,725,996,310,000,000,000,000,000,000,000
3
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
psf_fclose (SF_PRIVATE *psf) { int retval ; if (psf->virtual_io) return 0 ; if (psf->file.do_not_close_descriptor) { psf->file.handle = NULL ; return 0 ; } ; if ((retval = psf_close_handle (psf->file.handle)) == -1) psf_log_syserr (psf, GetLastError ()) ; psf->file.handle = NULL ; return retval ; } /...
0
[ "CWE-369", "CWE-189" ]
libsndfile
725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6
281,478,678,360,165,830,000,000,000,000,000,000,000
18
src/file_io.c : Prevent potential divide-by-zero. Closes: https://github.com/erikd/libsndfile/issues/92
static inline int do_one_broadcast(struct sock *sk, struct netlink_broadcast_data *p) { struct netlink_sock *nlk = nlk_sk(sk); int val; if (p->exclude_sk == sk) goto out; if (nlk->pid == p->pid || p->group - 1 >= nlk->ngroups || !test_bit(p->group - 1, nlk->groups)) goto out; if (!net_eq(sock_ne...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
179,492,584,809,989,680,000,000,000,000,000,000,000
60
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
amgtar_backup( application_argument_t *argument) { int dumpin; char *cmd = NULL; char *qdisk; char *incrname; char line[32768]; amregex_t *rp; off_t dump_size = -1; char *type; char startchr; int dataf = 1; int me...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
65,127,393,156,760,920,000,000,000,000,000,000,000
225
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
flatpak_dir_resolve_p2p_refs (FlatpakDir *self, FlatpakDirResolve **resolves, GCancellable *cancellable, GError **error) { g_autoptr(GPtrArray) latest_resolves = g_ptr_array_new_with_free_func ((GDestroy...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
107,045,594,285,558,760,000,000,000,000,000,000,000
54
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 ...
TEST_F(RouterTest, ApplicationProtocols) { callbacks_.streamInfo().filterState()->setData( Network::ApplicationProtocols::key(), std::make_unique<Network::ApplicationProtocols>(std::vector<std::string>{"foo", "bar"}), StreamInfo::FilterState::StateType::ReadOnly, StreamInfo::FilterState::LifeSpan::F...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
304,981,134,217,856,350,000,000,000,000,000,000,000
35
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static OPJ_BOOL opj_j2k_are_all_used_components_decoded(opj_j2k_t *p_j2k, opj_event_mgr_t * p_manager) { OPJ_UINT32 compno; OPJ_BOOL decoded_all_used_components = OPJ_TRUE; if (p_j2k->m_specific_param.m_decoder.m_numcomps_to_decode) { for (compno = 0; compno < p_j2k->m_speci...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
123,195,239,389,304,330,000,000,000,000,000,000,000
34
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
static bool cpu_has_sgx(void) { return cpuid_eax(0) >= 0x12 && (cpuid_eax(0x12) & BIT(0)); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
118,751,862,071,251,700,000,000,000,000,000,000,000
4
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static void get_kvmclock(struct kvm *kvm, struct kvm_clock_data *data) { struct kvm_arch *ka = &kvm->arch; unsigned seq; do { seq = read_seqcount_begin(&ka->pvclock_sc); __get_kvmclock(kvm, data); } while (read_seqcount_retry(&ka->pvclock_sc, seq)); }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
317,186,178,923,025,000,000,000,000,000,000,000
10
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
xmlRelaxNGNormExtSpace(xmlChar * value) { xmlChar *start = value; xmlChar *cur = value; if (value == NULL) return; while (IS_BLANK_CH(*cur)) cur++; if (cur == start) { do { while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++; if (*cur =...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
281,443,750,330,523,540,000,000,000,000,000,000,000
43
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
UsbOnHubInterrupt ( IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Result ) { USB_INTERFACE *HubIf; EFI_USB_IO_PROTOCOL *UsbIo; EFI_USB_ENDPOINT_DESCRIPTOR *EpDesc; EFI_STATUS ...
0
[ "CWE-787" ]
edk2
acebdf14c985c5c9f50b37ece0b15ada87767359
145,868,566,664,041,310,000,000,000,000,000,000,000
86
MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value...
static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { #if !defined(TIFFDefaultStripSize) #define TIFFDefaultStripSize(tiff,request) (8192UL/TIFFScanlineSize(tiff)) #endif const char *mode, *option; CompressionType compression; EndianType ...
0
[ "CWE-369" ]
ImageMagick
728dc6a600cf4cbdac846964c85cc04339db8ac1
211,960,547,291,220,670,000,000,000,000,000,000,000
859
Fix TIFF divide by zero (bug report from Donghai Zhu)
gboolean mono_verifier_is_enabled_for_class (MonoClass *klass) { return verify_all || (verifier_mode > MONO_VERIFIER_MODE_OFF && !(klass->image->assembly && klass->image->assembly->in_gac) && klass->image != mono_defaults.corlib);
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
257,432,995,149,097,750,000,000,000,000,000,000,000
4
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
Win32_static() { wait_event = CreateEvent(0,FALSE_WIN,FALSE_WIN,0); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
24,625,252,654,967,337,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ptr_t GC_unix_get_mem(word bytes) { # if defined(MMAP_SUPPORTED) /* By default, we try both sbrk and mmap, in that order. */ static GC_bool sbrk_failed = FALSE; ptr_t result = 0; if (!sbrk_failed) result = GC_unix_sbrk_get_mem(bytes); if (0 == result) { sbrk_failed = TRUE; result...
1
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
51,258,660,604,676,490,000,000,000,000,000,000,000
21
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...
static int sysvipc_msg_proc_show(struct seq_file *s, void *it) { struct user_namespace *user_ns = seq_user_ns(s); struct msg_queue *msq = it; seq_printf(s, "%10d %10d %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lu %10lu %10lu\n", msq->q_perm.key, msq->q_perm.id, msq->q_perm.mode, msq->q_cb...
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
8,103,949,696,534,248,000,000,000,000,000,000,000
24
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state c...
int SSL_CTX_set_srp_username(SSL_CTX *ctx,char *name) { return tls1_ctx_ctrl(ctx,SSL_CTRL_SET_TLS_EXT_SRP_USERNAME,0,name); }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
105,185,790,978,643,920,000,000,000,000,000,000,000
4
Add SRP support.
GF_Descriptor *gf_isom_get_root_od(GF_ISOFile *movie) { GF_Descriptor *desc; GF_ObjectDescriptor *od; GF_InitialObjectDescriptor *iod; GF_IsomObjectDescriptor *isom_od; GF_IsomInitialObjectDescriptor *isom_iod; GF_ESD *esd; GF_ES_ID_Inc *inc; u32 i; u8 useIOD; if (!movie || !movie->moov) return NULL; if (!m...
1
[ "CWE-401", "CWE-787" ]
gpac
984787de3d414a5f7d43d0b4584d9469dff2a5a5
33,856,851,796,878,356,000,000,000,000,000,000,000
111
fixed #1784 (fuzz)
PHP_METHOD(Phar, getVersion) { PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_STRING(phar_obj->arc.archive->version, 1); }
0
[ "CWE-119" ]
php-src
13ad4d3e971807f9a58ab5933182907dc2958539
94,551,642,392,603,950,000,000,000,000,000,000,000
10
Fix bug #71354 - remove UMR when size is 0
static void opj_j2k_read_int16_to_int32(const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data; OPJ_UINT32 i; OPJ_UINT32 l_temp; for (i = 0; i < p_nb_elem; ++i) { opj_...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
206,424,919,663,413,350,000,000,000,000,000,000,000
16
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
kafka_check_supported_api_version(packet_info *pinfo, proto_item *ti, kafka_query_response_t *matcher) { const kafka_api_info_t *api_info; api_info = kafka_get_api_info(matcher->api_key); if (api_info != NULL && !kafka_is_api_version_supported(api_info, matcher->api_version)) { col_append_str(pinfo...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
118,749,521,168,325,880,000,000,000,000,000,000,000
24
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static void cmd_parse_status(struct ImapAccountData *adata, char *s) { unsigned int litlen = 0; char *mailbox = imap_next_word(s); /* We need a real tokenizer. */ if (imap_get_literal_count(mailbox, &litlen) == 0) { if (imap_cmd_step(adata) != IMAP_RES_CONTINUE) { adata->status = IMAP_FATAL; ...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
213,181,728,285,728,040,000,000,000,000,000,000,000
121
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
SCTP_STATIC void sctp_destroy_sock(struct sock *sk) { struct sctp_endpoint *ep; SCTP_DEBUG_PRINTK("sctp_destroy_sock(sk: %p)\n", sk); /* Release our hold on the endpoint. */ ep = sctp_sk(sk)->ep; sctp_endpoint_free(ep); atomic_dec(&sctp_sockets_allocated); }
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
201,921,141,903,396,100,000,000,000,000,000,000,000
11
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
copy_class(mrb_state *mrb, mrb_value dst, mrb_value src) { struct RClass *dc = mrb_class_ptr(dst); struct RClass *sc = mrb_class_ptr(src); /* if the origin is not the same as the class, then the origin and the current class need to be copied */ if (sc->flags & MRB_FL_CLASS_IS_PREPENDED) { struct RClass...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
77,362,902,674,877,100,000,000,000,000,000,000,000
28
class.c: clear method cache after `remove_method`.
static void command_port_read_callback(struct urb *urb) { struct usb_serial_port *command_port = urb->context; struct whiteheat_command_private *command_info; int status = urb->status; unsigned char *data = urb->transfer_buffer; int result; command_info = usb_get_serial_port_data(command_port); if (!command_inf...
1
[ "CWE-362", "CWE-119" ]
linux
6817ae225cd650fb1c3295d769298c38b1eba818
167,620,947,223,044,780,000,000,000,000,000,000,000
47
USB: whiteheat: Added bounds checking for bulk command response This patch fixes a potential security issue in the whiteheat USB driver which might allow a local attacker to cause kernel memory corrpution. This is due to an unchecked memcpy into a fixed size buffer (of 64 bytes). On EHCI and XHCI busses it's possible ...
static int parse_part_values(void **ret_buffer, size_t *ret_buffer_len, value_t **ret_values, size_t *ret_num_values) { char *buffer = *ret_buffer; size_t buffer_len = *ret_buffer_len; uint16_t tmp16; size_t exp_size; uint16_t pkg_length; uint16_t pkg_type; size_t pkg_numval...
0
[ "CWE-835" ]
collectd
f6be4f9b49b949b379326c3d7002476e6ce4f211
306,797,733,819,497,930,000,000,000,000,000,000,000
106
network plugin: Fix endless loop DOS in parse_packet() When correct 'Signature part' is received by Collectd, configured without AuthFile option, condition for endless loop occurs due to missing increase of pointer to next unprocessed part. This is a forward-port of #2233. Fixes: CVE-2017-7401 Closes: #2174 Signed-o...
bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) { static map<CService, vector<unsigned char> > mapReuseKey; RandAddSeedPerfmon(); if (fDebug) { printf("%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); printf("received: %s (%d bytes)\n", strCommand.c...
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
250,149,094,868,436,440,000,000,000,000,000,000,000
536
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
static void __set_retrans_timer(struct l2cap_chan *chan) { if (!delayed_work_pending(&chan->monitor_timer) && chan->retrans_timeout) { l2cap_set_timer(chan, &chan->retrans_timer, msecs_to_jiffies(chan->retrans_timeout)); } }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
17,959,848,795,308,710,000,000,000,000,000,000,000
8
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 void iowarrior_callback(struct urb *urb) { struct iowarrior *dev = urb->context; int intr_idx; int read_idx; int aux_idx; int offset; int status = urb->status; int retval; switch (status) { case 0: /* success */ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: return; default: goto e...
0
[ "CWE-416" ]
linux
edc4746f253d907d048de680a621e121517f484b
273,414,932,318,938,240,000,000,000,000,000,000,000
66
USB: iowarrior: fix use-after-free on disconnect A recent fix addressing a deadlock on disconnect introduced a new bug by moving the present flag out of the critical section protected by the driver-data mutex. This could lead to a racing release() freeing the driver data before disconnect() is done with it. Due to in...
MagickExport char *InterpretImageProperties(ImageInfo *image_info,Image *image, const char *embed_text,ExceptionInfo *exception) { #define ExtendInterpretText(string_length) \ DisableMSCWarning(4127) \ { \ size_t length=(string_length); \ if ((size_t) (q-interpret_text+length+1) >= extent) \ { \ extent+...
0
[ "CWE-125" ]
ImageMagick
dd84447b63a71fa8c3f47071b09454efc667767b
278,896,232,799,233,240,000,000,000,000,000,000,000
562
Prevent buffer overflow (bug report from Ibrahim el-sayed)
static int cma_iw_acquire_dev(struct rdma_id_private *id_priv, const struct rdma_id_private *listen_id_priv) { struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; const struct ib_gid_attr *sgid_attr; struct cma_device *cma_dev; enum ib_gid_type gid_type; int ret = -ENODEV; union ib_gid gid...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
105,786,780,748,601,830,000,000,000,000,000,000,000
59
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static void cleargps(libraw_gps_info_t*q) { for (int i = 0; i < 3; i++) q->latitude[i] = q->longtitude[i] = q->gpstimestamp[i] = 0.f; q->altitude = 0.f; q->altref = q->latref = q->longref = q->gpsstatus = q->gpsparsed = 0; }
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
239,309,048,152,160,660,000,000,000,000,000,000,000
7
fixed two more problems found by fuzzer
compose_group_alphaless_nonknockout(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape, int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag, byte *nos_ptr, bool nos_is...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
227,430,795,566,968,070,000,000,000,000,000,000,000
15
Bug 701795: Segv due to image mask issue
static int count(struct cstate *g, Renode *node) { int min, max, n; if (!node) return 0; switch (node->type) { default: return 1; case P_CAT: return count(g, node->x) + count(g, node->y); case P_ALT: return count(g, node->x) + count(g, node->y) + 2; case P_REP: min = node->m; max = node->n; if (min == max)...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
64,695,372,407,318,100,000,000,000,000,000,000,000
21
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
int ssl3_accept(SSL *s) { BUF_MEM *buf; unsigned long alg_k, Time = (unsigned long)time(NULL); void (*cb) (const SSL *ssl, int type, int val) = NULL; int ret = -1; int new_state, state, skip = 0; RAND_add(&Time, sizeof(Time), 0); ERR_clear_error(); clear_sys_error(); if (s->info_ca...
0
[ "CWE-190" ]
openssl
a004e72b95835136d3f1ea90517f706c24c03da7
276,894,242,946,778,230,000,000,000,000,000,000,000
669
Avoid some undefined pointer arithmetic A common idiom in the codebase is: if (p + len > limit) { return; /* Too long */ } Where "p" points to some malloc'd data of SIZE bytes and limit == p + SIZE "len" here could be from some externally supplied data (e.g. from a TLS message). The rules of C pointer arithmet...
add_connection (NMConnectionList *self, NMConnectionEditor *editor, NMConnection *connection, ConnectionAddedFn callback, gpointer user_data) { NMExportedConnection *exported = NULL; NMConnectionScope scope; gboolean success = FALSE; scope = nm_connec...
1
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
164,502,455,550,204,190,000,000,000,000,000,000,000
71
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
int msPostGISLayerClose(layerObj *layer) { #ifdef USE_POSTGIS if (layer->debug) { msDebug("msPostGISLayerClose called: %s\n", layer->data); } if( layer->layerinfo ) { msPostGISFreeLayerInfo(layer); } return MS_SUCCESS; #else msSetError( MS_MISCERR, "PostGIS support is not available....
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
301,056,850,691,263,560,000,000,000,000,000,000,000
20
Fix potential SQL Injection with postgis TIME filters (#4834)
static void sock_def_readable(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); rcu_read_unlock(); }
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
211,651,782,230,924,700,000,000,000,000,000,000,000
12
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
void X509_STORE_CTX_set_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->untrusted=sk; }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
306,877,849,173,129,600,000,000,000,000,000,000,000
4
Backport OCSP fixes.
static int rose_del_node(struct rose_route_struct *rose_route, struct net_device *dev) { struct rose_node *rose_node; struct rose_neigh *rose_neigh; int i, err = 0; spin_lock_bh(&rose_node_list_lock); spin_lock_bh(&rose_neigh_list_lock); rose_node = rose_node_list; while (rose_node != NULL) { if ((rose_nod...
0
[ "CWE-20" ]
linux
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
148,940,133,538,122,760,000,000,000,000,000,000,000
72
rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the definition of ROSE as using 10-digit (5-byte) addresses. Use them consistently. Validate all implicit and explicit facilities lengths. ...
static UINT gdi_MapSurfaceToOutput(RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput) { UINT rc = ERROR_INTERNAL_ERROR; gdiGfxSurface* surface; EnterCriticalSection(&context->mux); surface = (gdiGfxSurface*)context->GetSurfaceData(context, surfa...
0
[ "CWE-190" ]
FreeRDP
e08a23f93136f59a52651f66d064b8d4303872e1
306,711,390,832,024,870,000,000,000,000,000,000,000
22
Fixed missing input sanitation for GFX surfaces. Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
PosibErr<Decode *> Decode::get_new(const String & key, const Config * c) { StackPtr<Decode> ptr; if (key == "iso-8859-1") ptr.reset(new DecodeDirect<Uni8>); else if (key == "ucs-2") ptr.reset(new DecodeDirect<Uni16>); else if (key == "ucs-4") ptr.reset(new DecodeDirect<Uni32>); ...
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
114,603,031,477,511,250,000,000,000,000,000,000,000
17
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
static struct list_head *cuse_conntbl_head(dev_t devt) { return &cuse_conntbl[(MAJOR(devt) + MINOR(devt)) % CUSE_CONNTBL_LEN]; }
0
[ "CWE-399" ]
linux
2c5816b4beccc8ba709144539f6fdd764f8fa49c
280,226,476,354,102,580,000,000,000,000,000,000,000
4
cuse: fix memory leak The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc, and the original ref count is never dropped. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")...
scoped_refptr<base::TaskRunner> CreatePrinterHandlerTaskRunner() { // USER_VISIBLE because the result is displayed in the print preview dialog. #if !defined(OS_WIN) static constexpr base::TaskTraits kTraits = { base::MayBlock(), base::TaskPriority::USER_VISIBLE}; #endif #if defined(USE_CUPS) // CUPS is thr...
0
[]
electron
ea1f402417022c59c0794e97c87e6be2553989e7
49,470,491,372,371,560,000,000,000,000,000,000,000
20
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) (#33350) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary mai...
pch_newfirst (void) { return p_newfirst; }
0
[ "CWE-59" ]
patch
44a987e02f04b9d81a0db4a611145cad1093a2d3
30,912,856,071,140,083,000,000,000,000,000,000,000
4
Add line number overflow checking * bootstrap.conf: use intprops module. * src/common.h: Define LINENUM_MIN and LINENUM_MAX macros. * src/pch.c (another_hunk): Add line number overflow checking. Based on Robert C. Seacord's INT32-C document for integer overflow checking and Tobias Stoeckmann's "integer overflows and ...
gst_rtsp_watch_set_flushing (GstRTSPWatch * watch, gboolean flushing) { g_return_if_fail (watch != NULL); g_mutex_lock (&watch->mutex); watch->flushing = flushing; g_cond_signal (&watch->queue_not_full); if (flushing) { GstRTSPSerializedMessage *msg; while ((msg = gst_queue_array_pop_head_struct (wa...
0
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
210,352,132,362,974,400,000,000,000,000,000,000,000
16
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
//! Return a \c 1x14 image containing specified values. static CImg<T> 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, const T& a11, const T& a12, const...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
41,965,621,591,620,346,000,000,000,000,000,000,000
11
Fix other issues in 'CImg<T>::load_bmp()'.
appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, const char *ptr, const char *end, STRING_POOL *pool) { DTD * const dtd = _dtd; /* save one level of indirection */ for (;;) { const char *next; int tok = XmlAttributeValueTok(enc, ptr, e...
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
282,639,759,195,561,560,000,000,000,000,000,000,000
148
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
EffectContext::~EffectContext() { ASSERT(owner()->HasStackOverflow() || owner()->current_block() == NULL || (owner()->environment()->length() == original_length_ && owner()->environment()->frame_type() == JS_FUNCTION)); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
111,250,043,098,288,870,000,000,000,000,000,000,000
6
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
proto_itoa(int proto) { const char * protocol; switch(proto) { case IPPROTO_UDP: protocol = "UDP"; break; case IPPROTO_TCP: protocol = "TCP"; break; #ifdef IPPROTO_UDPLITE case IPPROTO_UDPLITE: protocol = "UDPLITE"; break; #endif /* IPPROTO_UDPLITE */ default: protocol = "*UNKNOWN*"; } return prot...
0
[ "CWE-476" ]
miniupnp
f321c2066b96d18afa5158dfa2d2873a2957ef38
26,545,938,558,946,240,000,000,000,000,000,000,000
20
upnp_redirect(): accept NULL desc argument
AE_1_TransportConnect(PRIVATE_NETWORKKEY ** network, PRIVATE_ASSOCIATIONKEY ** association, int nextState, void *params) { DUL_ASSOCIATESERVICEPARAMETERS * service; OFCondition cond = EC_Normal; service = (DUL_ASSOCIATESERVICEPARAMETERS *) params; clearPDUCache(association); cond = req...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
333,488,932,402,562,800,000,000,000,000,000,000,000
13
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
void sendBidirectionalDataAndCleanShutdown() { sendBidirectionalData("hello", "hello", "there!", "there!"); // Send a second set of data to make sure for example headers are only sent once. sendBidirectionalData(",bye", "hello,bye", "ack", "there!ack"); // Send an end stream. This should result in ha...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
120,049,036,602,400,140,000,000,000,000,000,000,000
18
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static unsigned short coolkey_get_key_id(unsigned long object_id) { char char_index = (object_id >> 16) & 0xff; if (char_index >= '0' && char_index <= '9') { return (u8)(char_index - '0'); } if (char_index >= 'A' && char_index <= 'Z') { return (u8)(char_index - 'A' + 10); } if (char_index >= 'a' && char_index...
0
[ "CWE-415" ]
OpenSC
c246f6f69a749d4f68626b40795a4f69168008f4
255,697,793,067,329,300,000,000,000,000,000,000,000
13
coolkey: Make sure the object ID is unique when filling list Thanks to oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) { unsigned i, new_nr; struct kioctx_table *table, *old; struct aio_ring *ring; spin_lock(&mm->ioctx_lock); rcu_read_lock(); table = rcu_dereference(mm->ioctx_table); while (1) { if (table) for (i = 0; i < table->nr; i++) if (!table->...
0
[ "CWE-399" ]
linux
d558023207e008a4476a3b7bb8706b2a2bf5d84f
32,747,553,147,136,533,000,000,000,000,000,000,000
55
aio: prevent double free in ioctx_alloc ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring() fails to do so it would call aio_free_ring() before returning, but ioctx_alloc() would call aio_free_ring() again causing a double free of the ring. This is easily reproducible from userspace. Signed-...
normalizeLines(XML_Char *s) { XML_Char *p; for (;; s++) { if (*s == XML_T('\0')) return; if (*s == 0xD) break; } p = s; do { if (*s == 0xD) { *p++ = 0xA; if (*++s == 0xA) s++; } else *p++ = *s++; } while (*s); *p = XML_T('\0'); }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
296,616,874,224,934,160,000,000,000,000,000,000,000
21
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
int ssl3_get_client_key_exchange(SSL *s) { int i,al,ok; long n; unsigned long alg_k; unsigned char *p; #ifndef OPENSSL_NO_RSA RSA *rsa=NULL; EVP_PKEY *pkey=NULL; #endif #ifndef OPENSSL_NO_DH BIGNUM *pub=NULL; DH *dh_srvr, *dh_clnt = NULL; #endif #ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; #endif /* OPENSSL_NO_...
0
[ "CWE-310" ]
openssl
ce325c60c74b0fa784f5872404b722e120e5cab0
29,296,579,195,322,434,000,000,000,000,000,000,000
848
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
Item_string(THD *thd, const char *str, size_t length, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE) :Item_literal(thd) { str_value.set_or_copy_aligned(str, length, cs); fix_and_set_name_from_value(thd, dv, Metadata(&str_value)); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
201,753,223,148,175,800,000,000,000,000,000,000,000
7
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 ...
pkinit_alg_agility_kdf(krb5_context context, krb5_data *secret, krb5_data *alg_oid, krb5_const_principal party_u_info, krb5_const_principal party_v_info, krb5_enctype enctype, krb5_d...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
144,022,034,965,580,030,000,000,000,000,000,000,000
154
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
com_delimiter(String *buffer MY_ATTRIBUTE((unused)), char *line) { char buff[256], *tmp; strmake(buff, line, sizeof(buff) - 1); tmp= get_arg(buff, 0); if (!tmp || !*tmp) { put_info("DELIMITER must be followed by a 'delimiter' character or string", INFO_ERROR); return 0; } else { if (...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
238,118,481,620,361,440,000,000,000,000,000,000,000
26
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type) { png_byte buf[4]; png_size_t size; png_debug(1, "in png_write_sBIT"); /* Make sure we don't depend upon the order of PNG_COLOR_8 */ if ((color_type & PNG_COLOR_MASK_COLOR) != 0) { png_byte maxbits; maxbits = ...
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
74,289,653,246,951,740,000,000,000,000,000,000,000
54
[libpng16] Reject attempt to write over-length PLTE chunk
get_collation(Oid collation, Oid actual_datatype) { List *result; HeapTuple ht_coll; Form_pg_collation coll_rec; char *nsp_name; char *coll_name; if (!OidIsValid(collation)) return NIL; /* easy case */ if (collation == get_typcollation(actual_datatype)) return NIL; /* just let it default */ ...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
161,650,939,589,804,600,000,000,000,000,000,000,000
26
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...
onig_bbuf_init(BBuf* buf, int size) { if (size <= 0) { size = 0; buf->p = NULL; } else { buf->p = (UChar* )xmalloc(size); if (IS_NULL(buf->p)) return(ONIGERR_MEMORY); } buf->alloc = size; buf->used = 0; return 0; }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
110,473,467,937,713,850,000,000,000,000,000,000,000
15
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
void fx_TypedArray_prototype_fill(txMachine* the) { mxMutableTypedArrayDeclarations; txInteger delta = dispatch->value.typedArray.dispatch->size; txInteger start = (txInteger)fxArgToIndex(the, 1, 0, length); txInteger end = (txInteger)fxArgToIndex(the, 2, length, length); start *= delta; end *= delta; start += v...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
22,802,655,542,210,215,000,000,000,000,000,000,000
24
XS: #896
scanner_create_variables (parser_context_t *context_p, /**< context */ uint32_t option_flags) /**< combination of scanner_create_variables_flags_t bits */ { scanner_info_t *info_p = context_p->next_scanner_info_p; const uint8_t *next_data_p = (const uint8_t *) (info_p + 1); uint8_t info_...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
61,618,435,203,475,370,000,000,000,000,000,000,000
546
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
http_client_check_sync_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { CheckSyncData *data = user_data; data->op_res = goa_http_client_check_finish (GOA_HTTP_CLIENT (source_object), res, data->error); g_main_loop_quit (data->loop); }
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
105,940,759,145,335,860,000,000,000,000,000,000,000
7
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
format_POP_QUEUE(const struct ofpact_null *a OVS_UNUSED, struct ds *s) { ds_put_format(s, "%spop_queue%s", colors.value, colors.end); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
260,731,815,838,699,350,000,000,000,000,000,000,000
4
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
systable_getnext(SysScanDesc sysscan) { HeapTuple htup; if (sysscan->irel) { htup = index_getnext(sysscan->iscan, ForwardScanDirection); /* * We currently don't need to support lossy index operators for any * system catalog scan. It could be done here, using the scan keys to * drive the operator call...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
138,441,717,779,410,850,000,000,000,000,000,000,000
23
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
brcmf_get_netinfo_array(struct brcmf_pno_scanresults_le *pfn_v1) { struct brcmf_pno_scanresults_v2_le *pfn_v2; struct brcmf_pno_net_info_le *netinfo; switch (pfn_v1->version) { default: WARN_ON(1); /* fall-thru */ case cpu_to_le32(1): netinfo = (struct brcmf_pno_net_info_le *)(pfn_v1 + 1); break; case cp...
0
[ "CWE-119", "CWE-787" ]
linux
8f44c9a41386729fea410e688959ddaa9d51be7c
92,397,707,369,401,870,000,000,000,000,000,000,000
20
brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx() The lower level nl80211 code in cfg80211 ensures that "len" is between 25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from "len" so thats's max of 2280. However, the action_frame->data[] buffer is only BRCMF_FIL_ACTION_FRAME_SI...
bool FromkLinuxSockAddrUn(const struct klinux_sockaddr_un *input, struct sockaddr_un *output) { if (!input || !output) { return false; } output->sun_family = AF_UNIX; InitializeToZeroArray(output->sun_path); ReinterpretCopyArray( output->sun_path, input->klinux_sun_path, ...
0
[ "CWE-787" ]
asylo
bda9772e7872b0d2b9bee32930cf7a4983837b39
121,209,009,214,046,260,000,000,000,000,000,000,000
12
Check input length in FromLinuxSockAddr PiperOrigin-RevId: 333785506 Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9
static void ecryptfs_copy_mount_wide_flags_to_inode_flags( struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_mount_crypt_stat *mount_crypt_stat) { if (mount_crypt_stat->flags & ECRYPTFS_XATTR_METADATA_ENABLED) crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_...
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
281,506,798,891,054,050,000,000,000,000,000,000,000
18
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
JsVar *jslNewTokenisedStringFromLexer(JslCharPos *charFrom, size_t charTo) { // New method - tokenise functions // save old lex JsLex *oldLex = lex; JsLex newLex; lex = &newLex; // work out length size_t length = 0; jslInit(oldLex->sourceVar); jslSeekToP(charFrom); int lastTk = LEX_EOF; while (lex...
0
[ "CWE-787" ]
Espruino
bed844f109b6c222816740555068de2e101e8018
227,923,885,877,146,340,000,000,000,000,000,000,000
65
remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426)
void __init zone_sizes_init(void) { unsigned long max_zone_pfns[MAX_NR_ZONES]; memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); #ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA] = min(MAX_DMA_PFN, max_low_pfn); #endif #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32] = min(MAX_DMA32_PFN, max_low_pfn); #endif max_...
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
4,987,846,483,007,803,000,000,000,000,000,000,000
19
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
static gboolean try_preload(TGAContext *ctx, GError **err) { if (!ctx->hdr) { if (ctx->in->size >= sizeof(TGAHeader)) { ctx->hdr = g_try_malloc(sizeof(TGAHeader)); if (!ctx->hdr) { g_set_error_literal(err, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_M...
1
[ "CWE-119" ]
gdk-pixbuf
6ddca835100107e6b5841ce9d56074f6d98c387e
78,035,693,881,714,040,000,000,000,000,000,000,000
118
io-tga: Colormaps are always present, so always parse them. We might end up with a colormap with 0 entries, but whatever, it's a colormap.
xfs_attr3_leaf_compact( struct xfs_da_args *args, struct xfs_attr3_icleaf_hdr *ichdr_dst, struct xfs_buf *bp) { struct xfs_attr_leafblock *leaf_src; struct xfs_attr_leafblock *leaf_dst; struct xfs_attr3_icleaf_hdr ichdr_src; struct xfs_trans *trans = args->trans; char *tmpbuffer; trace_xfs_attr_leaf_compac...
0
[ "CWE-476" ]
linux
bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a
158,100,406,681,721,980,000,000,000,000,000,000,000
53
xfs: don't call xfs_da_shrink_inode with NULL bp xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops if we try. This also seems to fix a flaw where th...
ExecPostprocessPlan(EState *estate) { ListCell *lc; /* * Make sure nodes run forward. */ estate->es_direction = ForwardScanDirection; /* * Run any secondary ModifyTable nodes to completion, in case the main * query did not fetch all rows from them. (We do this to ensure that * such nodes have predict...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
136,598,275,320,878,190,000,000,000,000,000,000,000
32
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
decode_openflow11_instruction(const struct ofp11_instruction *inst, enum ovs_instruction_type *type) { uint16_t len = ntohs(inst->len); switch (inst->type) { case CONSTANT_HTONS(OFPIT11_EXPERIMENTER): return OFPERR_OFPBIC_BAD_EXPERIMENTER; #define DEFINE_INST(ENUM, ST...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
300,031,507,637,878,320,000,000,000,000,000,000,000
26
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
poppler_document_get_page_mode (PopplerDocument *document) { Catalog *catalog; g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), POPPLER_PAGE_MODE_UNSET); catalog = document->doc->getCatalog (); if (catalog && catalog->isOk ()) return convert_page_mode (catalog->getPageMode ()); return POPPLER_PAGE...
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
70,577,336,130,609,290,000,000,000,000,000,000,000
12
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
int picolcd_reset(struct hid_device *hdev) { struct picolcd_data *data = hid_get_drvdata(hdev); struct hid_report *report = picolcd_out_report(REPORT_RESET, hdev); unsigned long flags; int error; if (!data || !report || report->maxfield != 1) return -ENODEV; spin_lock_irqsave(&data->lock, flags); if (hdev->p...
0
[ "CWE-119", "CWE-787" ]
linux
844817e47eef14141cf59b8d5ac08dd11c0a9189
320,491,455,814,440,000,000,000,000,000,000,000,000
33
HID: picolcd: sanity check report size in raw_event() callback The report passed to us from transport driver could potentially be arbitrarily large, therefore we better sanity-check it so that raw_data that we hold in picolcd_pending structure are always kept within proper bounds. Cc: stable@vger.kernel.org Reported-...
struct i915_lut_handle *i915_lut_handle_alloc(void) { return kmem_cache_alloc(global.slab_luts, GFP_KERNEL); }
0
[ "CWE-416" ]
linux
7dc40713618c884bf07c030d1ab1f47a9dc1f310
278,376,158,269,860,000,000,000,000,000,000,000,000
4
drm/i915: Introduce a mutex for file_priv->context_idr Define a mutex for the exclusive use of interacting with the per-file context-idr, that was previously guarded by struct_mutex. This allows us to reduce the coverage of struct_mutex, with a view to removing the last bits coordinating GEM context later. (In the sho...
MagickExport void ConvertRGBToHSB(const Quantum red,const Quantum green, const Quantum blue,double *hue,double *saturation,double *brightness) { double b, delta, g, max, min, r; /* Convert RGB to HSB colorspace. */ assert(hue != (double *) NULL); assert(saturation != (double *) ...
0
[ "CWE-369" ]
ImageMagick6
90255f0834eead08d59f46b0bda7b1580451cc0f
188,679,751,616,564,160,000,000,000,000,000,000,000
47
https://github.com/ImageMagick/ImageMagick/issues/3077
CDelayedTranslation CModule::t_d(const CString& sEnglish, const CString& sContext) const { return CDelayedTranslation("znc-" + GetModName(), sContext, sEnglish); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
283,344,846,969,289,660,000,000,000,000,000,000,000
4
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816