func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void fs_machineid(void) { union machineid_t { uint8_t u8[16]; uint32_t u32[4]; } mid; // if --machine-id flag is inactive, do nothing if (arg_machineid == 0) return; if (arg_debug) printf("Generating a new machine-id\n"); // init random number generator srand(time(NULL)); // generate random id mid.u...
0
[ "CWE-269", "CWE-94" ]
firejail
dab835e7a0eb287822016f5ae4e87f46e1d363e7
302,937,434,211,356,300,000,000,000,000,000,000,000
49
CVE-2022-31214: fixing the fix
static void mpi_unmap_card(struct pci_dev *pci) { unsigned long mem_start = pci_resource_start(pci, 1); unsigned long mem_len = pci_resource_len(pci, 1); unsigned long aux_start = pci_resource_start(pci, 2); unsigned long aux_len = AUXMEMSIZE; release_mem_region(aux_start, aux_len); release_mem_region(mem_start,...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
34,518,614,858,868,290,000,000,000,000,000,000,000
10
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...
quit(int status, const char *fmt, ...) { va_list argp; va_start(argp, fmt); fprintf(stderr, "%s: ", prg_name); vfprintf(stderr, fmt, argp); fprintf(stderr, "\n"); va_end(argp); ExitProgram(status); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
326,393,355,182,096,600,000,000,000,000,000,000,000
11
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
int kvm_ioapic_init(struct kvm *kvm) { struct kvm_ioapic *ioapic; int ret; ioapic = kzalloc(sizeof(struct kvm_ioapic), GFP_KERNEL); if (!ioapic) return -ENOMEM; spin_lock_init(&ioapic->lock); INIT_DELAYED_WORK(&ioapic->eoi_inject, kvm_ioapic_eoi_inject_work); kvm->arch.vioapic = ioapic; kvm_ioapic_reset(ioap...
0
[ "CWE-703", "CWE-125" ]
linux
81cdb259fb6d8c1c4ecfeea389ff5a73c07f5755
74,961,453,992,921,320,000,000,000,000,000,000,000
27
KVM: x86: fix out-of-bounds accesses of rtc_eoi map KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be bigger that the maximal number of VCPUs, resulting in out-of-bounds access. Found by syzkaller: BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...] Write of size 1 ...
unfreeze_jobs_list () { }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
200,364,925,368,710,880,000,000,000,000,000,000,000
3
bash-4.4-rc2 release
int Http2Session::OnDataChunkReceived(nghttp2_session* handle, uint8_t flags, int32_t id, const uint8_t* data, size_t len, void* u...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
254,582,737,447,222,880,000,000,000,000,000,000,000
78
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
ctl_putstr( const char * tag, const char * data, size_t len ) { char buffer[512]; char *cp; size_t tl; tl = strlen(tag); memcpy(buffer, tag, tl); cp = buffer + tl; if (len > 0) { INSIST(tl + 3 + len <= sizeof(buffer)); *cp++ = '='; *cp++ = '"'; memcpy(cp, data, len); cp += len; *cp++ = '"'; } ...
0
[ "CWE-22" ]
ntp
184516e143ce4448ddb5b9876dd372008cc779f6
121,663,994,364,545,070,000,000,000,000,000,000,000
23
[TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
static V9fsFidState *alloc_fid(V9fsState *s, int32_t fid) { V9fsFidState *f; for (f = s->fid_list; f; f = f->next) { /* If fid is already there return NULL */ BUG_ON(f->clunked); if (f->fid == fid) { return NULL; } } f = g_malloc0(sizeof(V9fsFidState)); f...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
24,290,146,413,128,234,000,000,000,000,000,000,000
28
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
get_normal_name(const char *s) /* for utf-8 and latin-1 */ { char buf[13]; int i; for (i = 0; i < 12; i++) { int c = s[i]; if (c == '\0') break; else if (c == '_') buf[i] = '-'; else buf[i] = tolower(c); } buf[i] = '\0'; if (st...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
218,509,196,653,517,600,000,000,000,000,000,000,000
27
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void i_set_object_type(gs_memory_t *mem, void *ptr, gs_memory_type_ptr_t type) { obj_header_t *pp; if (ptr == 0) return; pp = (obj_header_t *) ptr - 1; pp->o_type = type; }
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
126,725,427,456,861,780,000,000,000,000,000,000,000
9
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
_prolog_error(batch_job_launch_msg_t *req, int rc) { char *err_name = NULL, *path_name = NULL; char *fmt_char; int fd; if (req->std_err || req->std_out) { if (req->std_err) err_name = xstrdup(req->std_err); else err_name = xstrdup(req->std_out); if ((fmt_char = strchr(err_name, (int) '%')) && (fm...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
148,884,023,155,525,480,000,000,000,000,000,000,000
48
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */ { #ifdef HAVE_SYSLOG_H PHP_MSHUTDOWN(syslog)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif #ifdef ZTS ts_free_id(basic_globals_id); #ifdef PHP_WIN32 ts_free_id(php_win32_core_globals_id); #endif #else basic_globals_dtor(&basic_globals TSRMLS_CC); #ifdef PHP_WIN32 php_win32_core_globa...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
129,358,860,760,276,000,000,000,000,000,000,000,000
38
Fixed bug #69418 - more s->p fixes for filenames
GArray* reds_get_video_codecs(const RedsState *reds) { return reds->config->video_codecs; }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
24,175,786,591,045,080,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>
gdm_session_worker_update_environment_from_pam (GdmSessionWorker *worker) { char **environment; gsize i; environment = pam_getenvlist (worker->priv->pam_handle); for (i = 0; environment[i] != NULL; i++) { char **key_and_value; key_and_value = g_strsplit...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
103,778,707,267,343,680,000,000,000,000,000,000,000
23
Store the face and dmrc files in a cache. Refer to bug #565151.
static void __queue_exception(struct kvm_vcpu *vcpu) { kvm_x86_ops->queue_exception(vcpu, vcpu->arch.exception.nr, vcpu->arch.exception.has_error_code, vcpu->arch.exception.error_code); }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
199,140,776,625,219,800,000,000,000,000,000,000,000
6
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
std::istream& operator>> (std::istream& is, Nef_polyhedron_2<T,Items,Mark>& NP) { typedef typename Nef_polyhedron_2<T,Items,Mark>::Decorator Decorator; CGAL::PM_io_parser<Decorator> I(is, NP.pm()); if (I.check_sep("Nef_polyhedron_2<") && I.check_sep(NP.EK.output_identifier()) && I.check_sep(">")) I....
1
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
10,940,457,232,040,782,000,000,000,000,000,000,000
16
Fix Nef_2 and Nef_S2 IO
static void dvcman_free(drdynvcPlugin* drdynvc, IWTSVirtualChannelManager* pChannelMgr) { int i; IWTSPlugin* pPlugin; DVCMAN_LISTENER* listener; DVCMAN* dvcman = (DVCMAN*) pChannelMgr; UINT error; ArrayList_Free(dvcman->channels); for (i = 0; i < dvcman->num_listeners; i++) { listener = (DVCMAN_LISTENER*) dv...
0
[ "CWE-125" ]
FreeRDP
baee520e3dd9be6511c45a14c5f5e77784de1471
309,296,003,072,474,130,000,000,000,000,000,000,000
31
Fix for #4866: Added additional length checks
int ldb_msg_append_linearized_dn(struct ldb_message *msg, const char *attr_name, struct ldb_dn *dn, int flags) { char *str = ldb_dn_alloc_linearized(msg, dn); if (str == NULL) { /* we don't want to have unknown DNs added */ return LDB_ERR_OPERATIONS_ERROR; } return ldb_msg_append_steal_string(msg, attr_n...
0
[ "CWE-200" ]
samba
df487eb2d713e817660dd3b56bb26ba715fadfea
108,432,646,047,802,330,000,000,000,000,000,000,000
12
CVE-2022-32746 ldb: Add functions for appending to an ldb_message Currently, there are many places where we use ldb_msg_add_empty() to add an empty element to a message, and then call ldb_msg_add_value() or similar to add values to that element. However, this performs an unnecessary search of the message's elements to...
static NetworkInterface* getCurrentInterface(lua_State* vm) { NetworkInterface *ntop_interface; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); lua_getglobal(vm, "ntop_interface"); if((ntop_interface = (NetworkInterface*)lua_touserdata(vm, lua_gettop(vm))) == NULL) { ntop_interface...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
300,655,225,759,732,500,000,000,000,000,000,000,000
12
Security fix: prevents empty host from being used
void timelib_strtointerval(char *s, int len, timelib_time **begin, timelib_time **end, timelib_rel_time **period, int *recurrences, struct timelib_error_container **errors) { Scanner in; int t; char *e = s + len - 1; memset(&in, 0, sizeof(in)); in.errors = malloc(si...
0
[ "CWE-119" ]
php-src
12fe4e90be7bfa2a763197079f68f5568a14e071
15,354,189,998,805,638,000,000,000,000,000,000,000
115
Fixed bug #66060 (Heap buffer over-read in DateInterval)
MeanshiftGrouping(const Point3d& densKer, const std::vector<Point3d>& posV, const std::vector<double>& wV, double eps, int maxIter = 20) { densityKernel = densKer; weightsV = wV; positionsV = posV; positionsCount = (int)posV.size(); meanshiftV.resize(positionsCoun...
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
105,813,819,806,115,140,000,000,000,000,000,000,000
19
objdetect: validate feature rectangle on reading
static int get_prev_insn_idx(struct bpf_verifier_state *st, int i, u32 *history) { u32 cnt = *history; if (cnt && st->jmp_history[cnt - 1].idx == i) { i = st->jmp_history[cnt - 1].prev_idx; (*history)--; } else { i--; } return i; }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
206,119,637,896,226,700,000,000,000,000,000,000,000
13
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
int wm_SemLock(wm_Sem *s) { WaitForSingleObject(*s, 0); return 0; }
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
30,357,197,189,402,090,000,000,000,000,000,000,000
4
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
theme_adium_append_event (EmpathyChatView *view, const gchar *str) { EmpathyThemeAdiumPriv *priv = GET_PRIV (view); gchar *str_escaped; if (priv->pages_loading != 0) { queue_item (&priv->message_queue, QUEUED_EVENT, NULL, str); return; } str_escaped = g_markup_escape_text (str, -1); theme_adium_app...
0
[ "CWE-79" ]
empathy
739aca418457de752be13721218aaebc74bd9d36
61,404,926,201,438,370,000,000,000,000,000,000,000
15
theme_adium_append_message: escape alias before displaying it Not doing so can lead to nasty HTML injection from hostile users. https://bugzilla.gnome.org/show_bug.cgi?id=662035
sf_get_chunk_size (const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info) { SF_PRIVATE *psf ; SNDFILE *sndfile = iterator ? iterator->sndfile : NULL ; VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ; if (chunk_info == NULL) return SFE_BAD_CHUNK_PTR ; if (psf->get_chunk_size) return psf->get_chun...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
182,542,195,029,452,670,000,000,000,000,000,000,000
15
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static void nested_svm_init_mmu_context(struct kvm_vcpu *vcpu) { WARN_ON(mmu_is_nested(vcpu)); kvm_init_shadow_mmu(vcpu); vcpu->arch.mmu.set_cr3 = nested_svm_set_tdp_cr3; vcpu->arch.mmu.get_cr3 = nested_svm_get_tdp_cr3; vcpu->arch.mmu.get_pdptr = nested_svm_get_tdp_pdptr; vcpu->arch.mm...
0
[ "CWE-200", "CWE-399" ]
linux
cbdb967af3d54993f5814f1cee0ed311a055377d
245,551,538,190,651,700,000,000,000,000,000,000,000
12
KVM: svm: unconditionally intercept #DB This is needed to avoid the possibility that the guest triggers an infinite stream of #DB exceptions (CVE-2015-8104). VMX is not affected: because it does not save DR6 in the VMCS, it already intercepts #DB unconditionally. Reported-by: Jan Beulich <jbeulich@suse.com> Cc: stab...
void gf_isom_box_freeze_order(GF_Box *box) { u32 i=0; GF_Box *child; if (!box) return; box->internal_flags |= GF_ISOM_ORDER_FREEZE; while ((child = gf_list_enum(box->child_boxes, &i))) { gf_isom_box_freeze_order(child); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
68,300,066,506,307,450,000,000,000,000,000,000,000
12
fixed #1768
int snd_timer_close(struct snd_timer_instance *timeri) { struct snd_timer *timer = NULL; struct snd_timer_instance *slave, *tmp; if (snd_BUG_ON(!timeri)) return -ENXIO; mutex_lock(&register_mutex); list_del(&timeri->open_list); /* force to stop the timer */ snd_timer_stop(timeri); timer = timeri->timer; ...
0
[ "CWE-200" ]
sound
cec8f96e49d9be372fdb0c3836dcf31ec71e457e
282,773,542,963,602,300,000,000,000,000,000,000,000
61
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse...
static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct ndmsg *ndm; struct nlattr *tb[NDA_MAX+1]; struct net_device *dev; u8 *addr; u16 vid; int err; err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL, extack); if ...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
241,577,265,075,463,100,000,000,000,000,000,000,000
73
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
gplotRead(const char *filename) { char buf[L_BUF_SIZE]; char *rootname, *title, *xlabel, *ylabel, *ignores; l_int32 outformat, ret, version, ignore; FILE *fp; GPLOT *gplot; PROCNAME("gplotRead"); if (!filename) return (GPLOT *)ERROR_PTR("filename not defined", procName, NULL); if ((...
1
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
69,201,117,706,242,720,000,000,000,000,000,000,000
75
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
static void gf_filter_renegociate_output(GF_Filter *filter, Bool force_afchain_insert) { u32 i, j; assert(filter->nb_caps_renegociate ); safe_int_dec(& filter->nb_caps_renegociate ); gf_mx_p(filter->tasks_mx); for (i=0; i<filter->num_output_pids; i++) { GF_FilterPid *pid = gf_list_get(filter->output_pids, i); ...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
140,985,010,237,443,840,000,000,000,000,000,000,000
92
fixed crashes for very long path - cf #1908
static void lsr_read_opacity(GF_LASeRCodec *lsr, GF_Node *elt) { u32 flag; GF_FieldInfo info; GF_LSR_READ_INT(lsr, flag, 1, "opacity"); if (flag) { lsr->last_error = gf_node_get_attribute_by_tag(elt, TAG_SVG_ATT_opacity, 1, 0, &info); ((SVG_Number*)info.far_ptr)->type = SVG_NUMBER_VALUE; ((SVG_Number*)info.fa...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
15,865,642,041,744,970,000,000,000,000,000,000,000
12
fixed #2213
is_prog_in_path (const char *prog) { char *f; gboolean ret; f = g_find_program_in_path (prog); ret = (f != NULL); g_free (f); return ret; }
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
73,762,999,347,184,240,000,000,000,000,000,000,000
10
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
static const char *set_define(cmd_parms *cmd, void *dummy, const char *name, const char *value) { if (cmd->parent && ap_cstr_casecmp(cmd->parent->directive, "<VirtualHost")) { return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ", ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
267,509,040,489,345,000,000,000,000,000,000,000,000
27
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
static int pio_in_emulated(struct x86_emulate_ctxt *ctxt, unsigned int size, unsigned short port, void *dest) { struct read_cache *rc = &ctxt->io_read; if (rc->pos == rc->end) { /* refill pio read ahead */ unsigned int in_page, n; unsigned int count = ctxt->rep_prefix ? address_mask(ctxt, reg_read...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
90,872,728,234,525,810,000,000,000,000,000,000,000
34
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
void linuxMemoryWarnings(void) { if (linuxOvercommitMemoryValue() == 0) { serverLog(LL_WARNING,"WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overc...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
68,425,065,464,809,080,000,000,000,000,000,000,000
8
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info, const PointInfo *offset,TypeMetric *metrics) { MagickBooleanType status; if (annotate_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&annotate_semaphore); LockSemaphoreInfo(annotate_semaphore); status=XRenderImage(...
0
[ "CWE-125" ]
ImageMagick6
f6ffc702c6eecd963587273a429dcd608c648984
331,849,328,709,022,630,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1588
parse_DEC_TTL(char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { if (*arg == '\0') { parse_noargs_dec_ttl(ofpacts); } else { struct ofpact_cnt_ids *ids; char *cntr; ids = ofpact_put_DEC_TTL(ofpacts); ids->ofpact.raw = N...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
255,241,171,712,184,560,000,000,000,000,000,000,000
27
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static bool retry_instruction(struct x86_emulate_ctxt *ctxt, unsigned long cr2, int emulation_type) { struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt); unsigned long last_retry_eip, last_retry_addr, gpa = cr2; last_retry_eip = vcpu->arch.last_retry_eip; last_retry_addr = vcpu->arch.last_retry_addr; /* * If...
0
[ "CWE-119" ]
kvm
c300aa64ddf57d9c5d9c898a64b36877345dd4a9
101,623,023,142,488,500,000,000,000,000,000,000,000
43
KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) If the guest sets the GPA of the time_page so that the request to update the time straddles a page then KVM will write onto an incorrect page. The write is done byusing kmap atomic to get a pointer to the page for the time structure ...
sock_filter_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) { switch (func_id) { /* inet and inet6 sockets are created in a process * context so there is always a valid uid/gid */ case BPF_FUNC_get_current_uid_gid: return &bpf_get_current_uid_gid_proto; default: return bpf_base_func_proto(...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
237,227,055,071,958,550,000,000,000,000,000,000,000
12
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static int ahash_op_unaligned(struct ahash_request *req, int (*op)(struct ahash_request *)) { struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); unsigned long alignmask = crypto_ahash_alignmask(tfm); unsigned int ds = crypto_ahash_digestsize(tfm); struct ahash_request_priv *priv; int err; priv = kmall...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
193,083,982,979,519,920,000,000,000,000,000,000,000
29
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
xmlSchemaCheckFacet(xmlSchemaFacetPtr facet, xmlSchemaTypePtr typeDecl, xmlSchemaParserCtxtPtr pctxt, const xmlChar * name ATTRIBUTE_UNUSED) { int ret = 0, ctxtGiven; if ((facet == NULL) || (typeDecl == NULL)) return(-1); /* * TODO: will the parser ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
267,323,923,954,277,270,000,000,000,000,000,000,000
199
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.
brcmf_set_sharedkey(struct net_device *ndev, struct cfg80211_connect_params *sme) { struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev); struct brcmf_cfg80211_security *sec; struct brcmf_wsec_key key; s32 val; s32 err = 0; brcmf_dbg(CONN, "key len (%d)\n", sme->key_len); if (sme->key_len == 0) ...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
141,870,134,257,808,900,000,000,000,000,000,000,000
63
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
xsmp_interact (GsmClient *client) { GsmXSMPClient *xsmp = (GsmXSMPClient *) client; g_debug ("GsmXSMPClient: xsmp_interact ('%s')", xsmp->priv->description); SmsInteract (xsmp->priv->conn); }
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
77,751,349,460,528,965,000,000,000,000,000,000,000
8
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
void unlink_thd(THD *thd) { DBUG_ENTER("unlink_thd"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); thd_cleanup(thd); dec_connection_count(); mysql_mutex_lock(&LOCK_thd_remove); mysql_mutex_lock(&LOCK_thread_count); /* Used by binlog_reset_master. It would be cleaner to use DEBUG_SYNC here, b...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
69,754,504,097,363,980,000,000,000,000,000,000,000
18
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
DataWriterImpl::~DataWriterImpl() { delete lifespan_timer_; delete deadline_timer_; if (writer_ != nullptr) { logInfo(PUBLISHER, guid().entityId << " in topic: " << type_->getName()); RTPSDomain::removeRTPSWriter(writer_); } delete user_datawriter_; }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
182,201,871,224,437,370,000,000,000,000,000,000,000
13
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
process_cmd_denyall(CMD_Request *msg, char *line) { int status; msg->command = htons(REQ_DENYALL); status = parse_allow_deny(msg, line); return status; }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
74,941,136,769,473,780,000,000,000,000,000,000,000
7
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
void CmdLine::addWindowsOptions( boost::program_options::options_description& windows , boost::program_options::options_description& hidden ) { windows.add_options() ("install", "install Windows service") ("remove", "remove Windows service") ("rei...
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
288,024,160,496,203,980,000,000,000,000,000,000,000
14
SERVER-7769 - turn objcheck on by default and use new fast bson validate
ins_compl_prep(int c) { int retval = FALSE; int prev_mode = ctrl_x_mode; // Forget any previous 'special' messages if this is actually // a ^X mode key - bar ^R, in which case we wait to see what it gives us. if (c != Ctrl_R && vim_is_ctrl_x_key(c)) edit_submode_extra = NULL; // Ignore end ...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
297,105,608,230,553,370,000,000,000,000,000,000,000
124
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
option_cleanup(option_string *stmt) { option_string *ptr, *nptr; if (!stmt) return; for (ptr= stmt; ptr; ptr= nptr) { nptr= ptr->next; if (ptr->string) my_free(ptr->string, MYF(0)); if (ptr->option) my_free(ptr->option, MYF(0)); my_free(ptr, MYF(0)); } }
0
[]
mysql-server
044e3b1d07c0854c39178d3054ab0cd0a3188436
26,052,833,290,086,823,000,000,000,000,000,000,000
16
Bug #20605441 : BUFFER OVERFLOW IN MYSQLSLAP Description:- mysqlslap is a diagnostic utility designed to emulate client load for a MySQL server and to report the timing of each stage. This utility crashes when invalid values are passed to the options 'num_int_cols_opt' or 'num_chars_cols_opt' or 'engine'. Analysis:- ...
int nci_core_reset(struct nci_dev *ndev) { return __nci_request(ndev, nci_reset_req, (void *)0, msecs_to_jiffies(NCI_RESET_TIMEOUT)); }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
101,150,371,010,103,420,000,000,000,000,000,000,000
5
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
static int dynamicGetchar (gdIOCtxPtr ctx) { unsigned char b; int rv; rv = dynamicGetbuf (ctx, &b, 1); if (rv != 1) { return EOF; } else { return b; /* (b & 0xff); */ } }
0
[ "CWE-119" ]
php-src
cc08cbc84d46933c1e9e0149633f1ed5d19e45e9
295,863,386,185,892,140,000,000,000,000,000,000,000
12
Fix #73280: Stack Buffer Overflow in GD dynamicGetbuf We make sure to never pass a negative `rlen` as size to memcpy(). Cf. <https://github.com/libgd/libgd/commit/53110871>.
static struct netdev_queue *dev_pick_tx(struct net_device *dev, struct sk_buff *skb) { int queue_index; const struct net_device_ops *ops = dev->netdev_ops; if (dev->real_num_tx_queues == 1) queue_index = 0; else if (ops->ndo_select_queue) { queue_index = ops->ndo_select_queue(dev, skb); queue_index = de...
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
137,453,972,472,825,360,000,000,000,000,000,000,000
36
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are limited to /lib/modules/**. However, CAP_NET_ADMIN...
static int utab_lock(const char *filename) { char *lfile; int fd; assert(filename); if (asprintf(&lfile, "%s.lock", filename) == -1) return -1; DBG(UPDATE, mnt_debug("%s: locking", lfile)); fd = open(lfile, O_RDONLY|O_CREAT|O_CLOEXEC, S_IWUSR| S_IRUSR|S_IRGRP|S_IROTH); free(...
1
[ "CWE-399" ]
util-linux
28594c9d4fc8a4108408c5749b62933b967ba23b
67,578,567,960,296,415,000,000,000,000,000,000,000
29
libmount: block signals when update utab Signed-off-by: Karel Zak <kzak@redhat.com>
void validateServersInLatencyWindow( TestCaseResult* result, boost::optional<std::vector<ServerDescriptionPtr>> selectedServers) { // Compare the server addresses of each server in the selectedServers and // _inLatencyWindow vectors. We do not need to compare the entire server descri...
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
291,245,227,905,511,240,000,000,000,000,000,000,000
37
SERVER-50170 fix max staleness read preference parameter for server selection
Open_table_context::recover_from_failed_open() { bool result= FALSE; MDL_deadlock_discovery_repair_handler handler; /* Install error handler to mark transaction to rollback on DEADLOCK error. */ m_thd->push_internal_handler(&handler); /* Execute the action. */ switch (m_action) { case OT_BACKOF...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
61,239,357,528,684,500,000,000,000,000,000,000,000
91
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
ns_nskip(netdissect_options *ndo, register const u_char *cp) { register u_char i; if (!ND_TTEST2(*cp, 1)) return (NULL); i = *cp++; while (i) { if ((i & INDIR_MASK) == INDIR_MASK) return (cp + 1); if ((i & INDIR_MASK) == EDNS0_MASK) { int bitlen, bytelen; if ((i & ~INDIR_MASK) != EDNS0_ELT...
0
[ "CWE-399", "CWE-835" ]
tcpdump
3a76fd7c95fced2c2f8c8148a9055c3a542eff29
338,718,473,178,394,900,000,000,000,000,000,000,000
30
CVE-2017-12995/Check for DNS compression pointers that don't point backwards. This is what BIND 9.11.0-P2 does; it not only detects pointers that loop, as "point backwards" means "point before anything we've processed so far, including what we're processing right now", so the pointer can't point to itself (as that's w...
static int selinux_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { const struct cred *cred = current_cred(); int error = 0; switch (cmd) { case FIONREAD: /* fall through */ case FIBMAP: /* fall through */ case FIGETBSZ: /* fall through */ case FS_IOC_GETFLAGS: /* fall through *...
0
[ "CWE-682" ]
linux-stable
0c461cb727d146c9ef2d3e86214f498b78b7d125
296,382,043,692,282,450,000,000,000,000,000,000,000
46
selinux: fix off-by-one in setprocattr SELinux tries to support setting/clearing of /proc/pid/attr attributes from the shell by ignoring terminating newlines and treating an attribute value that begins with a NUL or newline as an attempt to clear the attribute. However, the test for clearing attributes has always bee...
validate_pattern(struct ly_ctx *ctx, const char *val_str, struct lys_type *type, struct lyd_node *node) { int rc; unsigned int i; #ifndef LY_ENABLED_CACHE pcre *precomp; #endif assert(ctx && (type->base == LY_TYPE_STRING)); if (!val_str) { val_str = ""; } if (type->der && validate...
0
[ "CWE-787" ]
libyang
f6d684ade99dd37b21babaa8a856f64faa1e2e0d
162,634,089,714,133,500,000,000,000,000,000,000,000
59
parser BUGFIX long identity name buffer overflow STRING_OVERFLOW (CWE-120)
void ExpressionNary::_doAddDependencies(DepsTracker* deps) const { for (auto&& operand : vpOperand) { operand->addDependencies(deps); } }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
278,394,634,976,306,900,000,000,000,000,000,000,000
5
SERVER-38070 fix infinite loop in agg expression
static pj_status_t ssl_write(pj_ssl_sock_t *ssock, const void *data, pj_ssize_t size, int *nwritten) { ossl_sock_t *ossock = (ossl_sock_t *)ssock; pj_status_t status = PJ_SUCCESS; *nwritten = SSL_write(ossock->ossl_ssl, data, (int)size); if (*nwritten <= 0) { /* SSL failed to process the data,...
0
[ "CWE-362", "CWE-703" ]
pjproject
d5f95aa066f878b0aef6a64e60b61e8626e664cd
255,421,363,749,376,940,000,000,000,000,000,000,000
29
Merge pull request from GHSA-cv8x-p47p-99wr * - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count. - Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport. * - Fix silly mistake: accepted active socket created without...
int get_active_server_count(void) { return slab_active_count(server_cache); }
0
[]
pgbouncer
4b92112b820830b30cd7bc91bef3dd8f35305525
334,435,360,969,385,230,000,000,000,000,000,000,000
4
add_database: fail gracefully if too long db name Truncating & adding can lead to fatal() later. It was not an issue before, but with audodb (* in [databases] section) the database name can some from network, thus allowing remote shutdown..
dsa_generate (const gcry_sexp_t genparms, gcry_sexp_t *r_skey) { gpg_err_code_t rc; unsigned int nbits; gcry_sexp_t domainsexp; DSA_secret_key sk; gcry_sexp_t l1; unsigned int qbits = 0; gcry_sexp_t deriveparms = NULL; gcry_sexp_t seedinfo = NULL; gcry_sexp_t misc_info = NULL; int flags = 0; dsa_d...
0
[ "CWE-203" ]
libgcrypt
7c2943309d14407b51c8166c4dcecb56a3628567
293,944,773,693,775,730,000,000,000,000,000,000,000
248
dsa,ecdsa: Fix use of nonce, use larger one. * cipher/dsa-common.c (_gcry_dsa_modify_k): New. * cipher/pubkey-internal.h (_gcry_dsa_modify_k): New. * cipher/dsa.c (sign): Use _gcry_dsa_modify_k. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise. * cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise. CVE-id: CVE-201...
static int imap_mbox_close(struct Mailbox *m) { struct ImapAccountData *adata = imap_adata_get(m); struct ImapMboxData *mdata = imap_mdata_get(m); /* Check to see if the mailbox is actually open */ if (!adata || !mdata) return 0; /* imap_mbox_open_append() borrows the struct ImapAccountData temporarily,...
0
[ "CWE-522", "CWE-287", "CWE-755" ]
neomutt
9c36717a3e2af1f2c1b7242035455ec8112b4b06
80,581,864,170,844,300,000,000,000,000,000,000,000
38
imap: close connection on all failures Thanks to Gabriel Salles-Loustau for spotting the problem. Co-authored-by: Kevin McCarthy <kevin@8t8.us>
passdb_preinit(pool_t pool, const struct auth_passdb_settings *set) { static unsigned int auth_passdb_id = 0; struct passdb_module_interface *iface; struct passdb_module *passdb; unsigned int idx; iface = passdb_interface_find(set->driver); if (iface == NULL || iface->verify_plain == NULL) { /* maybe it's a pl...
1
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
171,236,738,619,831,870,000,000,000,000,000,000,000
52
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
static struct dquot **ext2_get_dquots(struct inode *inode) { return EXT2_I(inode)->i_dquot; }
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
301,266,590,488,267,800,000,000,000,000,000,000,000
4
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
e_binding_bind_property_with_closures (gpointer source, const gchar *source_property, gpointer target, const gchar *target_property, GBindingFlags flags, GClosure *transform_to, GClosure *transform_from) { return camel_binding_bind_property_with_closure...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
320,599,492,014,812,100,000,000,000,000,000,000,000
11
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static ssize_t ring_active_show(struct dma_chan *c, char *page) { struct ioat2_dma_chan *ioat = to_ioat2_chan(c); /* ...taken outside the lock, no need to be precise */ return sprintf(page, "%d\n", ioat2_ring_active(ioat)); }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
154,545,695,844,557,870,000,000,000,000,000,000,000
7
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
rgw::auth::s3::LDAPEngine::authenticate( const boost::string_view& access_key_id, const boost::string_view& signature, const string_to_sign_t& string_to_sign, const signature_factory_t&, const completer_factory_t& completer_factory, const req_state* const s) const { /* boost filters and/or string_ref may ...
0
[ "CWE-79" ]
ceph
ba0790a01ba5252db1ebc299db6e12cd758d0ff9
196,318,708,126,919,520,000,000,000,000,000,000,000
40
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
int Field_blob::store(const char *from,size_t length,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; size_t copy_length, new_length; uint copy_len; char *tmp; char buff[STRING_BUFFER_USUAL_SIZE]; String tmpstr(buff,sizeof(buff), &my_charset_bin); int rc; if (!length) { bzero(ptr,F...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
124,178,423,453,534,380,000,000,000,000,000,000,000
95
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...
read_bytes(FILE *fp, void *buf, size_t bytes_to_read, int fail_on_eof, char *errbuf) { size_t amt_read; amt_read = fread(buf, 1, bytes_to_read, fp); if (amt_read != bytes_to_read) { if (ferror(fp)) { pcap_fmt_errmsg_for_errno(errbuf, PCAP_ERRBUF_SIZE, errno, "error reading dump file"); } else { ...
0
[ "CWE-20", "CWE-703", "CWE-770" ]
libpcap
87d6bef033062f969e70fa40c43dfd945d5a20ab
296,256,553,536,795,050,000,000,000,000,000,000,000
21
do sanity checks on PHB header length before allocating memory. There was no fault; but doing the check results in a more consistent error
static int put_cacheinfo(struct sk_buff *skb, unsigned long cstamp, unsigned long tstamp, u32 preferred, u32 valid) { struct ifa_cacheinfo ci; ci.cstamp = cstamp_delta(cstamp); ci.tstamp = cstamp_delta(tstamp); ci.ifa_prefered = preferred; ci.ifa_valid = valid; return nla_put(skb, IFA_CACHEINFO, sizeof(ci),...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
36,229,412,587,540,135,000,000,000,000,000,000,000
12
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
GF_Err blnk_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TextBlinkBox*ptr = (GF_TextBlinkBox*)s; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u16(bs, ptr->startcharoffset); gf_bs_write_u16(bs, ptr->endcharoffset); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
292,995,605,306,152,900,000,000,000,000,000,000,000
10
fixed #1768
static cl_error_t egg_parse_archive_extra_field(egg_handle* handle) { cl_error_t status = CL_EPARSE; const uint8_t* index = NULL; extra_field* extraField = NULL; uint32_t magic = 0; uint32_t size = 0; if (!handle) { cli_errmsg("egg_parse_archive_extra_field: Inval...
0
[ "CWE-476" ]
clamav-devel
8bb3716be9c7ab7c6a3a1889267b1072f48af87b
72,967,832,404,843,980,000,000,000,000,000,000,000
161
fuzz-22348 null deref in egg utf8 conversion Corrected memory leaks and a null dereference in the egg utf8 conversion.
PHP_FUNCTION(link) { char *topath, *frompath; size_t topath_len, frompath_len; int ret; char source_p[MAXPATHLEN]; char dest_p[MAXPATHLEN]; wchar_t *dstw, *srcw; /*First argument to link function is the target and hence should go to frompath Second argument to link function is the link itself and hence shoul...
0
[]
php-src
0e6c0654ed06751ced134515f7629c40bd979d7f
333,451,117,028,011,300,000,000,000,000,000,000,000
70
Fix #78862: link() silently truncates after a null byte on Windows Since link() is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
static int xmlInitializeDict(void) { if (xmlDictInitialized) return(1); if ((xmlDictMutex = xmlNewRMutex()) == NULL) return(0); xmlDictInitialized = 1; return(1); }
1
[ "CWE-399" ]
libxml2
8973d58b7498fa5100a876815476b81fd1a2412a
300,297,845,368,769,820,000,000,000,000,000,000,000
10
Add hash randomization to hash and dict structures Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash...
static bool cmd_desc_set_parent(RCmdDesc *cd, RCmdDesc *parent) { r_return_val_if_fail (cd && !cd->parent, false); if (parent) { cd->parent = parent; r_pvector_push (&parent->children, cd); parent->n_children++; } return true; }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
162,514,222,067,607,070,000,000,000,000,000,000,000
9
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
const char *get_cpp_ptr_rtrim() { const char *p; for (p= m_cpp_ptr; p > m_cpp_buf && my_isspace(system_charset_info, p[-1]); p--) { } return p; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
249,134,470,071,294,260,000,000,000,000,000,000,000
9
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
explicit SparseSegmentReductionMeanOp(OpKernelConstruction* context) : SparseSegmentReductionOpBase<Device, T>( context, true /*is_mean*/, false /*is_sqrtn*/, false /* has_num_segments */, T(0) /* default_value */) {}
0
[ "CWE-703", "CWE-681", "CWE-787" ]
tensorflow
db4f9717c41bccc3ce10099ab61996b246099892
272,899,771,005,904,570,000,000,000,000,000,000,000
4
Fix heap buffer overflow in UnsortedSegmentSum. When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory. Also: - Switches some indexing calculations to int64 to avoid signed intege...
rsvg_filter_primitive_tile_render (RsvgFilterPrimitive * self, RsvgFilterContext * ctx) { guchar i; gint x, y, rowstride; RsvgIRect boundarys, oboundarys; RsvgFilterPrimitiveOutput input; guchar *in_pixels; guchar *output_pixels; GdkPixbuf *output; GdkPixbuf *in; RsvgFilterPrimit...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
101,194,087,565,374,730,000,000,000,000,000,000,000
45
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static int run_e8e9_filter(struct rar5* rar, struct filter_info* flt, int extended) { const uint32_t file_size = 0x1000000; ssize_t i; circular_memcpy(rar->cstate.filtered_buf, rar->cstate.window_buf, rar->cstate.window_mask, rar->cstate.solid_offset + flt->block_start, rar->cstate.solid_offset + f...
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
131,665,535,256,092,430,000,000,000,000,000,000,000
48
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
virtio_is_ready(struct virtio_net *dev) { struct vhost_virtqueue *vq; uint32_t i; if (dev->nr_vring == 0) return 0; for (i = 0; i < dev->nr_vring; i++) { vq = dev->virtqueue[i]; if (!vq_is_ready(dev, vq)) return 0; } RTE_LOG(INFO, VHOST_CONFIG, "virtio is now ready for processing.\n"); return 1; }
0
[]
dpdk
612e17cf6d7b2bf05a687d8a9ba7be582a744e50
284,862,263,504,004,750,000,000,000,000,000,000,000
19
vhost: fix possible denial of service on SET_VRING_NUM vhost_user_set_vring_num() performs multiple allocations without checking whether data were previously allocated. It may cause a denial of service because of the memory leaks that happen if a malicious vhost-user master keeps sending VHOST_USER_SET_VRING_NUM requ...
static void bin_no_resources(RCore *r, int mode) { if (IS_MODE_JSON (mode)) { r_cons_printf ("[]"); } }
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
38,942,459,985,863,354,000,000,000,000,000,000,000
5
More fixes for the CVE-2019-14745
void ConnectionImpl::ServerStreamImpl::submitHeaders(const std::vector<nghttp2_nv>& final_headers, nghttp2_data_provider* provider) { ASSERT(stream_id_ != -1); int rc = nghttp2_submit_response(parent_.session_, stream_id_, &final_headers.data()[0], ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
297,538,180,776,440,340,000,000,000,000,000,000,000
7
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...
end_job_control () { if (interactive_shell || job_control) /* XXX - should it be just job_control? */ { terminate_stopped_jobs (); if (original_pgrp >= 0) give_terminal_to (original_pgrp, 1); } if (original_pgrp >= 0) setpgid (0, original_pgrp); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
84,920,421,580,659,390,000,000,000,000,000,000,000
13
bash-4.4-rc2 release
void release_unused_fd() { for (auto i = std::begin(fd_cache_); i != std::end(fd_cache_);) { auto &ent = (*i).second; if (ent->usecount != 0) { ++i; continue; } fd_cache_lru_.remove(ent.get()); close(ent->fd); i = fd_cache_.erase(i); } }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
203,468,490,575,261,580,000,000,000,000,000,000,000
13
Don't read too greedily
std::string ZRtp::getHelloHash(int32_t index) { std::ostringstream stm; if (index < 0 || index >= MAX_ZRTP_VERSIONS) return std::string(); uint8_t* hp = helloPackets[index].helloHash; char version[5] = {'\0'}; strncpy(version, (const char*)helloPackets[index].packet->getVersion(), ZRTP_WO...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
119,624,023,488,927,740,000,000,000,000,000,000,000
21
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
_outConst(StringInfo str, const Const *node) { WRITE_NODE_TYPE("CONST"); WRITE_OID_FIELD(consttype); WRITE_INT_FIELD(consttypmod); WRITE_OID_FIELD(constcollid); WRITE_INT_FIELD(constlen); WRITE_BOOL_FIELD(constbyval); WRITE_BOOL_FIELD(constisnull); WRITE_LOCATION_FIELD(location); appendStringInfoString(str, ...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
163,469,459,184,853,170,000,000,000,000,000,000,000
18
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...
static void mcba_usb_process_ka_can(struct mcba_priv *priv, struct mcba_usb_msg_ka_can *msg) { if (unlikely(priv->can_ka_first_pass)) { netdev_info(priv->netdev, "PIC CAN version %u.%u\n", msg->soft_ver_major, msg->soft_ver_minor); priv->can_ka_first_pass = false; } if (unlikely(priv->can_speed_...
0
[ "CWE-415" ]
linux
04c9b00ba83594a29813d6b1fb8fdc93a3915174
157,299,560,465,588,880,000,000,000,000,000,000,000
36
can: mcba_usb: mcba_usb_start_xmit(): fix double dev_kfree_skb in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analy...
Status ValidateSparseTensor(InferenceContext* c, ShapeHandle indices_shape, ShapeHandle values_shape, ShapeHandle shape_shape) { // Validate ranks. ShapeHandle unused_shape; TF_RETURN_IF_ERROR(c->WithRank(indices_shape, 2, &unused_shape)); TF_RETURN_IF_ERROR(c->WithRank(values_shape,...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
113,659,431,057,663,800,000,000,000,000,000,000,000
40
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg) { if (!memcg || mem_cgroup_is_root(memcg)) return NULL; return &memcg->tcp_mem.cg_proto; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
223,846,974,624,838,860,000,000,000,000,000,000,000
7
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static int unpack_v2KE(struct state *st, struct pluto_crypto_req *r, chunk_t *g) { struct pcr_kenonce *kn = &r->pcr_d.kn; unpack_KE(st, r, g); return kn->oakley_group; }
0
[ "CWE-20" ]
libreswan
2899351224fe2940aec37d7656e1e392c0fe07f0
181,739,004,378,768,030,000,000,000,000,000,000,000
9
SECURITY: Properly handle IKEv2 I1 notification packet without KE payload
handler::ha_analyze(THD* thd, HA_CHECK_OPT* check_opt) { DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK); mark_trx_read_write(); return analyze(thd, check_opt); }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
244,585,133,780,805,980,000,000,000,000,000,000,000
8
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static struct ifmcaddr6 *igmp6_mc_get_idx(struct seq_file *seq, loff_t pos) { struct ifmcaddr6 *im = igmp6_mc_get_first(seq); if (im) while (pos && (im = igmp6_mc_get_next(seq, im)) != NULL) --pos; return pos ? NULL : im; }
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
273,870,178,376,059,300,000,000,000,000,000,000,000
8
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
SaslResult GetSaslResult(const std::string &result_) { if (result_ == "F") return SASL_FAIL; if (result_ == "A") return SASL_ABORT; return SASL_OK; }
0
[ "CWE-284", "CWE-264" ]
inspircd
74fafb7f11b06747f69f182ad5e3769b665eea7a
292,261,801,783,015,760,000,000,000,000,000,000,000
10
m_sasl: don't allow AUTHENTICATE with mechanisms with a space
static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, struct genl_info *info) { struct mac80211_hwsim_data *data2; struct ieee80211_rx_status rx_status; const u8 *dst; int frame_data_len; void *frame_data; struct sk_buff *skb = NULL; if (!info->attrs[HWSIM_ATTR_ADDR_RECEIVER] || !info->at...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
59,185,529,621,597,060,000,000,000,000,000,000,000
83
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
pdf14_recreate_device(gs_memory_t *mem, gs_gstate * pgs, gx_device * dev, const gs_pdf14trans_t * pdf14pct) { pdf14_device * pdev = (pdf14_device *)dev; gx_device * target = pdev->target; pdf14_device * dev_proto; pdf14_device temp_dev_proto; bool has_tags = device_encodes_tags(dev);...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
243,538,342,328,263,500,000,000,000,000,000,000,000
36
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs, int exception_state) { unsigned long flags; int sstep_tries = 100; int error; int cpu; int trace_on = 0; int online_cpus = num_online_cpus(); u64 time_left; kgdb_info[ks->cpu].enter_kgdb++; kgdb_info[ks->cpu].exception_state |= exception...
1
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
337,195,331,790,425,150,000,000,000,000,000,000,000
232
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
static struct submodule *lookup_or_create_by_name(struct submodule_cache *cache, const unsigned char *gitmodules_sha1, const char *name) { struct submodule *submodule; struct strbuf name_buf = STRBUF_INIT; submodule = cache_lookup_name(cache, gitmodules_sha1, name); if (submodule) return submodule; submodule...
0
[ "CWE-88" ]
git
f6adec4e329ef0e25e14c63b735a5956dc67b8bc
295,367,132,822,549,640,000,000,000,000,000,000,000
30
submodule-config: ban submodule urls that start with dash The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be...
static noinline_for_stack int nla_put_ifalias(struct sk_buff *skb, struct net_device *dev) { char buf[IFALIASZ]; int ret; ret = dev_get_alias(dev, buf, sizeof(buf)); return ret > 0 ? nla_put_string(skb, IFLA_IFALIAS, buf) : 0; }
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
221,552,113,008,146,140,000,000,000,000,000,000,000
9
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...