func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void addReplyBulkLongLong(redisClient *c, long long ll) { char buf[64]; int len; len = ll2string(buf,64,ll); addReplyBulkCBuffer(c,buf,len); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
19,344,673,774,806,980,000,000,000,000,000,000,000
7
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
bool is_result_field() { return true; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
76,316,284,706,011,960,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int handle_vmclear(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); gva_t gva; gpa_t vmptr; struct vmcs12 *vmcs12; struct page *page; struct x86_exception e; if (!nested_vmx_check_permission(vcpu)) return 1; if (get_vmx_mem_address(vcpu, vmcs_readl(EXIT_QUALIFICATION), vmcs_read32(VMX...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
139,090,912,570,723,370,000,000,000,000,000,000,000
57
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
void __kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) { unsigned long old, new; lockdep_assert_held_write(&kvm->arch.apicv_update_lock); if (!kvm_x86_ops.check_apicv_inhibit_reasons || !static_call(kvm_x86_check_apicv_inhibit_reasons)(bit)) return; old = new = kvm->arch.apicv_inhibit_...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
203,218,862,976,318,600,000,000,000,000,000,000,000
40
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...
int tls1_change_cipher_state(SSL *s, int which) { unsigned char *p, *mac_secret; unsigned char tmp1[EVP_MAX_KEY_LENGTH]; unsigned char tmp2[EVP_MAX_KEY_LENGTH]; unsigned char iv1[EVP_MAX_IV_LENGTH * 2]; unsigned char iv2[EVP_MAX_IV_LENGTH * 2]; unsigned char *ms, *key, *iv; EVP_CIPHER_CTX *d...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
336,530,693,118,485,270,000,000,000,000,000,000,000
262
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
is_invalid_entry (struct fileinfo *f) { struct fileinfo *cur; cur = f; char *f_name = f->name; /* If the node we're currently checking has a duplicate later, we eliminate * the current node and leave the next one intact. */ while (cur->next) { cur = cur->next; if (strcmp(f_name, cur->name) ...
0
[ "CWE-22" ]
wget
69c45cba4382fcaabe3d86876bd5463dc34f442c
7,578,989,258,614,655,000,000,000,000,000,000,000
15
Add checks for valid listing file in FTP When Wget retrieves a file through FTP, it first downloads a .listing file and parses it for information about the files and other metadata. Some servers may serve invalid .listing files. This patch checks for one such known inconsistency wherein multiple lines in a listing fil...
static int pb0100_set_autogain(struct gspca_dev *gspca_dev, __s32 val) { int err; struct sd *sd = (struct sd *) gspca_dev; struct pb0100_ctrls *ctrls = sd->sensor_priv; if (val) { if (ctrls->natural->val) val = BIT(6)|BIT(4)|BIT(0); else val = BIT(4)|BIT(0); } else val = 0; err = stv06xx_write_senso...
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
83,751,837,889,786,210,000,000,000,000,000,000,000
20
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */ { const char *p, *q; char *name; const char *endptr = val + vallen; zval *current; int namelen; int has_value; php_unserialize_data_t var_hash; int skip = 0; PHP_VAR_UNSERIALIZE_INIT(var_hash); p = val; while (p < endptr) { zval **tmp; q = p; skip = 0; whil...
0
[ "CWE-399", "CWE-74" ]
php-src
8763c6090d627d8bb0ee1d030c30e58f406be9ce
132,921,945,961,553,550,000,000,000,000,000,000,000
67
Fix bug #72681 - consume data even if we're not storing them
flatpak_context_allows_features (FlatpakContext *context, FlatpakContextFeatures features) { return (context->features & features) == features; }
0
[ "CWE-94", "CWE-74" ]
flatpak
6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b
24,497,674,816,978,246,000,000,000,000,000,000,000
5
context: Add --env-fd option This allows environment variables to be added to the context without making their values visible to processes running under a different uid, which might be significant if the variable's value is a token or some other secret value. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of...
static int formatIPTC(Image *ifile, Image *ofile) { char temp[MagickPathExtent]; unsigned int foundiptc, tagsfound; unsigned char recnum, dataset; unsigned char *readable, *str; ssize_t tagindx, taglen; int i, tagcount = (int) (sizeof(tags) / sizeof(tag_spec)...
1
[ "CWE-772" ]
ImageMagick
33d1b9590c401d4aee666ffd10b16868a38cf705
34,776,887,195,002,680,000,000,000,000,000,000,000
120
https://github.com/ImageMagick/ImageMagick/issues/1118
f_complete_add(typval_T *argvars, typval_T *rettv) { if (in_vim9script() && check_for_string_or_dict_arg(argvars, 0) == FAIL) return; rettv->vval.v_number = ins_compl_add_tv(&argvars[0], 0, FALSE); }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
136,765,486,058,775,300,000,000,000,000,000,000,000
7
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.
static uint8_t *alloc_dhcp_data_option(int code, const uint8_t *data, unsigned size) { return alloc_dhcp_option(code, data, MIN(size, 255)); }
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
340,158,819,240,075,970,000,000,000,000,000,000,000
5
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
static int cx23888_ir_tx_shutdown(struct v4l2_subdev *sd) { struct cx23888_ir_state *state = to_state(sd); struct cx23885_dev *dev = state->dev; mutex_lock(&state->tx_params_lock); /* Disable or slow down all IR Tx circuits and counters */ irqenable_tx(dev, 0); control_tx_enable(dev, false); control_tx_modulat...
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
14,821,671,888,878,244,000,000,000,000,000,000,000
18
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl *param_kernel, int ioctl_flags, struct dm_ioctl **param, int *param_flags) { struct dm_ioctl *dmi; int secure_data; const size_t minimum_data_size = offsetof(struct dm_ioctl, data); unsigned noio_flag; if (copy_from_user(param_kernel, u...
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
199,738,049,253,670,450,000,000,000,000,000,000,000
61
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
void onGoAway(Http::GoAwayErrorCode) override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
91,182,304,169,645,900,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static void netif_free_tx_queues(struct net_device *dev) { if (is_vmalloc_addr(dev->_tx)) vfree(dev->_tx); else kfree(dev->_tx);
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
253,939,943,046,312,670,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...
mrb_class_get_under_id(mrb_state *mrb, struct RClass *outer, mrb_sym name) { return class_from_sym(mrb, outer, name); }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
263,091,318,013,141,230,000,000,000,000,000,000,000
4
class.c: clear method cache after `remove_method`.
void PackLinuxElf64::updateLoader(OutputFile * /*fo*/) { if (xct_off) { return; // FIXME elfout has no values at all } upx_uint64_t const vbase = get_te64(&elfout.phdr[0].p_vaddr); unsigned start = linker->getSymbolOffset("_start"); if (get_te16(&elfout.ehdr.e_machine)==Elf64_Ehdr::EM_PPC6...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
108,807,661,042,587,300,000,000,000,000,000,000,000
23
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
bool DRW_AppId::parseDwg(DRW::Version version, dwgBuffer *buf, duint32 bs){ dwgBuffer sBuff = *buf; dwgBuffer *sBuf = buf; if (version > DRW::AC1018) {//2007+ sBuf = &sBuff; //separate buffer for strings } bool ret = DRW_TableEntry::parseDwg(version, buf, sBuf, bs); DRW_DBG("\n**********...
0
[ "CWE-191" ]
libdxfrw
fcd977cc7f8f6cc7f012e5b72d33cf7d77b3fa69
263,316,998,331,543,240,000,000,000,000,000,000,000
37
fixed heap use after free vulnerability CVE-2021-21900 as reported in TALOS-2021-1351 / CVE-2021-21900, DRW_TableEntry::parseCode had the potential to trigger an use after free exception with a malformed DXF file.
void PDFDoc::displayPageSlice(OutputDev *out, int page, double hDPI, double vDPI, int rotate, bool useMediaBox, bool crop, bool printing, int sliceX, int sliceY, int sliceW, int sliceH, bool (*abortCheckCbk)(void *data), void *abortCheckCbkData, ...
0
[ "CWE-20" ]
poppler
9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f
38,537,351,691,005,730,000,000,000,000,000,000,000
16
PDFDoc::setup: Fix return value At that point xref can have gone wrong since extractPDFSubtype() can have caused a reconstruct that broke stuff so instead of unconditionally returning true, return xref->isOk() Fixes #706
mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m) { mrb_check_frozen(mrb, c); if (include_module_at(mrb, c, find_origin(c), m, 1) < 0) { mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected"); } if (c->tt == MRB_TT_MODULE && (c->flags & MRB_FL_CLASS_IS_INHERITED)) { struct RCla...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
159,225,410,015,269,080,000,000,000,000,000,000,000
13
class.c: clear method cache after `remove_method`.
static void resume_send(h2o_http2_conn_t *conn) { if (h2o_http2_conn_get_buffer_window(conn) <= 0) return; #if 0 /* TODO reenable this check for performance? */ if (conn->scheduler.list.size == 0) return; #endif request_gathered_write(conn); }
0
[ "CWE-703" ]
h2o
1c0808d580da09fdec5a9a74ff09e103ea058dd4
70,047,015,434,019,810,000,000,000,000,000,000,000
10
h2: use after free on premature connection close #920 lib/http2/connection.c:on_read() calls parse_input(), which might free `conn`. It does so in particular if the connection preface isn't the expected one in expect_preface(). `conn` is then used after the free in `if (h2o_timeout_is_linked(&conn->_write.timeout_entr...
gdata_service_insert_entry_finish (GDataService *self, GAsyncResult *async_result, GError **error) { GSimpleAsyncResult *result = G_SIMPLE_ASYNC_RESULT (async_result); GDataEntry *entry; g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL); g_return_val_if_fail (G_IS_ASYNC_RESULT (async_result), NULL); g_return_v...
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
309,193,070,438,836,300,000,000,000,000,000,000,000
20
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
static int em_fnstcw(struct x86_emulate_ctxt *ctxt) { u16 fcw; if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM)) return emulate_nm(ctxt); ctxt->ops->get_fpu(ctxt); asm volatile("fnstcw %0": "+m"(fcw)); ctxt->ops->put_fpu(ctxt); /* force 2 byte destination */ ctxt->dst.bytes = 2; ctxt->dst.val = f...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
264,355,657,364,452,770,000,000,000,000,000,000,000
17
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 kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free, struct kvm_memory_slot *dont) { kvmppc_core_free_memslot(kvm, free, dont); }
0
[ "CWE-476" ]
linux
ac64115a66c18c01745bbd3c47a36b124e5fd8c0
398,906,005,139,491,000,000,000,000,000,000,000
5
KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM The following program causes a kernel oops: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kvm.h> main() { int fd = open("/dev/kvm", O_RDWR); ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); } This happe...
static void svm_handle_mce(struct kvm_vcpu *vcpu) { if (is_erratum_383()) { /* * Erratum 383 triggered. Guest state is corrupt so kill the * guest. */ pr_err("KVM: Guest triggered AMD Erratum 383\n"); kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu); return; } /* * On an #MC intercept the MCE handl...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
18,853,834,468,767,480,000,000,000,000,000,000,000
20
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler) { defaultHandler = handler; defaultExpandInternalEntities = XML_TRUE; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
124,932,929,233,921,490,000,000,000,000,000,000,000
6
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
void ptrace_disable(struct task_struct *child) { /* Nothing to do.. */ }
0
[ "CWE-200" ]
linux-2.6
0d0138ebe24b94065580bd2601f8bb7eb6152f56
234,011,671,695,981,060,000,000,000,000,000,000,000
4
xtensa: prevent arbitrary read in ptrace Prevent an arbitrary kernel read. Check the user pointer with access_ok() before copying data in. [akpm@linux-foundation.org: s/EIO/EFAULT/] Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: Christian Zankel <chris@zankel.net> Cc: Oleg Nesterov <oleg@redhat.com> Cc:...
static int do_cow_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; int ret; if (unlikely(anon_vma_prepare(vma))) return VM_FAULT_OOM; vmf->cow_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address); if (!vmf->cow_page) return VM_FAULT_OOM; if (mem_cgroup_try_charge(vmf->cow_page...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
332,731,630,542,340,730,000,000,000,000,000,000,000
38
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void dn_access_copy(struct sk_buff *skb, struct accessdata_dn *acc) { unsigned char *ptr = skb->data; acc->acc_userl = *ptr++; memcpy(&acc->acc_user, ptr, acc->acc_userl); ptr += acc->acc_userl; acc->acc_passl = *ptr++; memcpy(&acc->acc_pass, ptr, acc->acc_passl); ptr += acc->acc_passl; acc->acc_accl ...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
63,484,491,922,248,580,000,000,000,000,000,000,000
18
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
TmEcode StreamTcpThreadInit(ThreadVars *tv, void *initdata, void **data) { SCEnter(); StreamTcpThread *stt = SCMalloc(sizeof(StreamTcpThread)); if (unlikely(stt == NULL)) SCReturnInt(TM_ECODE_FAILED); memset(stt, 0, sizeof(StreamTcpThread)); stt->ssn_pool_id = -1; *data = (void *)stt; ...
0
[ "CWE-74" ]
suricata
ea0659de7640cf6a51de5bbd1dbbb0414e4623a0
161,660,983,443,065,850,000,000,000,000,000,000,000
72
stream: fix SYN_SENT RST/FIN injection RST injection during the SYN_SENT state could trick Suricata into marking a session as CLOSED. The way this was done is: using invalid TSECR value in RST+ACK packet. The ACK was needed to force Linux into considering the TSECR value and compare it to the TSVAL from the SYN packet...
} CImg<T>& operator=(CImg<T>&& img) { if (_is_shared) return assign(img); return img.swap(*this);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
162,396,907,449,253,890,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static int slab_mem_going_offline_callback(void *arg) { struct kmem_cache *s; down_read(&slub_lock); list_for_each_entry(s, &slab_caches, list) kmem_cache_shrink(s); up_read(&slub_lock); return 0; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
335,188,920,753,706,080,000,000,000,000,000,000,000
11
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static int stbi__sse2_available(void) { // If we're even attempting to compile this on GCC/Clang, that means // -msse2 is on, which means the compiler is allowed to use SSE2 // instructions at will, and so are we. return 1; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
184,015,525,990,584,020,000,000,000,000,000,000,000
7
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static void __perf_event_exit_context(void *__info) { struct perf_event_context *ctx = __info; struct perf_cpu_context *cpuctx = __get_cpu_context(ctx); struct perf_event *event; raw_spin_lock(&ctx->lock); ctx_sched_out(ctx, cpuctx, EVENT_TIME); list_for_each_entry(event, &ctx->event_list, event_entry) __perf_...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
75,903,108,504,619,570,000,000,000,000,000,000,000
12
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
initConfigSettings(void) { cs.bEmitMsgOnClose = 0; cs.wrkrMax = DFLT_wrkrMax; cs.bSuppOctetFram = 1; cs.iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; cs.pszInputName = NULL; cs.pszBindRuleset = NULL; cs.pszInputName = NULL; cs.lstnIP = NULL; }
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
89,809,157,643,024,050,000,000,000,000,000,000,000
11
imptcp: fix Segmentation Fault when octet count is to high
copy_subscription_attrs( cupsd_client_t *con, /* I - Client connection */ cupsd_subscription_t *sub, /* I - Subscription */ cups_array_t *ra, /* I - Requested attributes array */ cups_array_t *exclude) /* I - Private attributes array */ { ipp_attribute_t *attr; /* Current att...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
35,575,460,773,577,090,000,000,000,000,000,000,000
113
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
\param dz Depth of images in the written file. \param dc Spectrum of images in the written file. **/ static void save_empty_cimg(const char *const filename, const unsigned int nb, const unsigned int dx, const unsigned int dy=1,
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
201,299,979,124,069,920,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void handle_PORT(ctrl_t *ctrl, char *str) { int a, b, c, d, e, f; char addr[INET_ADDRSTRLEN]; struct sockaddr_in sin; if (ctrl->data_sd > 0) { uev_io_stop(&ctrl->data_watcher); close(ctrl->data_sd); ctrl->data_sd = -1; } /* Convert PORT command's argument to IP address + port */ sscanf(str, "%d,%d...
1
[ "CWE-120", "CWE-787" ]
uftpd
0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd
22,646,162,618,618,524,000,000,000,000,000,000,000
29
FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
static inline void lxc_clear_includes(struct lxc_conf *conf) { struct lxc_list *it,*next; lxc_list_for_each_safe(it, &conf->includes, next) { lxc_list_del(it); free(it->elem); free(it); } }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
190,079,036,938,128,670,000,000,000,000,000,000,000
10
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
inline void WireFormatLite::WriteInt32NoTag(int32_t value, io::CodedOutputStream* output) { output->WriteVarint32SignExtended(value); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
224,661,557,494,287,520,000,000,000,000,000,000,000
4
Apply patch
Pl_DCT::write(unsigned char* data, size_t len) { this->buf.write(data, len); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
309,049,355,086,755,200,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static BROTLI_INLINE uint16_t BROTLI_UNALIGNED_LOAD16LE(const void* p) { const uint8_t* in = (const uint8_t*)p; return (uint16_t)(in[0] | (in[1] << 8)); }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
161,099,913,335,965,510,000,000,000,000,000,000,000
4
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
option_remove_generic_policy_cb (const gchar *option_name, const gchar *value, gpointer data, GError **error) { FlatpakContext *context = data; char *t; g_autofree char *key = NULL; const char *policy_valu...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
155,453,440,926,035,040,000,000,000,000,000,000,000
28
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
TEST_CASE("Negated Class test", "[general]") { parser parser(R"( ROOT <- [^a-z_]+ )"); bool ret = parser; REQUIRE(ret == true); REQUIRE(parser.parse("ABC123")); REQUIRE_FALSE(parser.parse("ABcZ")); REQUIRE_FALSE(parser.parse("ABCZ_")); REQUIRE_FALSE(parser.parse("")); }
1
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
263,033,956,411,436,550,000,000,000,000,000,000,000
14
Fix #122
std::string quote_empty(const std::string& input) { if (input.empty()) { return "''"; } else { return input; } }
0
[ "CWE-943", "CWE-787" ]
newsbeuter
96e9506ae9e252c548665152d1b8968297128307
112,514,575,449,945,400,000,000,000,000,000,000,000
7
Sanitize inputs to bookmark-cmd (#591) Newsbeuter didn't properly shell-escape the arguments passed to bookmarking command, which allows a remote attacker to perform remote code execution by crafting an RSS item whose title and/or URL contain something interpretable by the shell (most notably subshell invocations.) T...
static void read_exp_features(struct btd_adapter *adapter) { if (mgmt_send(adapter->mgmt, MGMT_OP_READ_EXP_FEATURES_INFO, adapter->dev_id, 0, NULL, read_exp_features_complete, adapter, NULL) > 0) return; btd_error(adapter->dev_id, "Failed to read exp features info"); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
203,766,921,893,071,060,000,000,000,000,000,000,000
9
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static int __init set_ftrace_notrace(char *str) { strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); return 1; }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
255,253,996,357,528,650,000,000,000,000,000,000,000
5
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
int usb_port_resume(struct usb_device *udev, pm_message_t msg) { struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent); struct usb_port *port_dev = hub->ports[udev->portnum - 1]; int port1 = udev->portnum; int status; u16 portchange, portstatus; if (!test_and_set_bit(port1, hub->child_usage_bits)) { st...
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
49,201,469,268,432,750,000,000,000,000,000,000,000
87
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
static int load_state_from_tss16(struct kvm_vcpu *vcpu, struct tss_segment_16 *tss) { kvm_rip_write(vcpu, tss->ip); kvm_x86_ops->set_rflags(vcpu, tss->flag | 2); kvm_register_write(vcpu, VCPU_REGS_RAX, tss->ax); kvm_register_write(vcpu, VCPU_REGS_RCX, tss->cx); kvm_register_write(vcpu, VCPU_REGS_RDX, tss->dx)...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
216,349,931,709,243,540,000,000,000,000,000,000,000
30
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...
static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type, u32 mask) { int err; struct crypto_alg *alg; type &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV); type |= CRYPTO_ALG_TYPE_AEAD; mask &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV); mask |= CRYPTO_ALG_TYPE_MASK; for (;;) { al...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
284,487,808,861,771,300,000,000,000,000,000,000,000
27
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
lys_get_schema_inctx(struct lys_node *schema, struct ly_ctx *ctx) { const struct lys_module *mod, *trg_mod = NULL; struct lys_node *parent, *first_sibling = NULL, *iter = NULL; struct ly_set *parents; unsigned int index; uint32_t idx; void **ptr; if (!ctx || schema->module->ctx == ctx) { ...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
316,474,285,345,503,400,000,000,000,000,000,000,000
89
schema tree BUGFIX do not check features while still resolving schema Fixes #723
DEFUN(movD1, MOVE_DOWN1, "Cursor down. With edge touched, slide") { _movD(1); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
137,236,841,308,359,980,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
bool BitTestMatchExpression::matchesSingleElement(const BSONElement& e, MatchDetails* details) const { // Validate 'e' is a number or a BinData. if (!e.isNumber() && e.type() != BSONType::BinData) { return false; } if (e.type() == BSONType::BinD...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
100,890,935,157,118,480,000,000,000,000,000,000,000
41
SERVER-43699 $mod should not overflow for large negative values
TEST_F(QueryPlannerTest, EmptyQueryWithProjectionUsesCollscanIfIndexIsPartial) { params.options = QueryPlannerParams::GENERATE_COVERED_IXSCANS; AlwaysFalseMatchExpression matchExpr; addIndex(BSON("a" << 1), &matchExpr); runQueryAsCommand(fromjson("{find: 'testns', projection: {_id: 0, a: 1}}")); ass...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
211,604,223,019,744,560,000,000,000,000,000,000,000
10
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
MagickPrivate cl_command_queue AcquireOpenCLCommandQueue(MagickCLDevice device) { cl_command_queue queue; cl_command_queue_properties properties; assert(device != (MagickCLDevice) NULL); LockSemaphoreInfo(device->lock); if ((device->profile_kernels == MagickFalse) && (device->command_queues_in...
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
36,688,158,105,243,735,000,000,000,000,000,000,000
27
https://github.com/ImageMagick/ImageMagick/issues/790
void mono_reflection_generic_class_initialize (MonoReflectionGenericClass *type, MonoArray *methods, MonoArray *ctors, MonoArray *fields, MonoArray *properties, MonoArray *events) { MonoGenericClass *gclass; MonoDynamicGenericClass *dgclass; MonoClass *klass, *gklass; MonoType *gtype; int i; MONO_...
0
[ "CWE-20" ]
mono
cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
60,690,630,589,943,460,000,000,000,000,000,000,000
80
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
__acquires(nfnl_queue_pernet(seq_file_net(s))->instances_lock) { spin_lock(&nfnl_queue_pernet(seq_file_net(s))->instances_lock); return get_idx(s, *pos); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
181,807,796,255,736,820,000,000,000,000,000,000,000
5
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static BOOL update_read_window_icon_order(wStream* s, WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* window_icon) { WINPR_UNUSED(orderInfo); window_icon->iconInfo = (ICON_INFO*)calloc(1, sizeof(ICON_INFO)); if (!window_icon->iconInfo) return FALSE; return update_read_...
0
[ "CWE-125" ]
FreeRDP
6b2bc41935e53b0034fe5948aeeab4f32e80f30f
181,465,501,492,240,100,000,000,000,000,000,000,000
11
Fix #6010: Check length in read_icon_info
cifs_strict_readv(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos) { struct inode *inode = file_inode(iocb->ki_filp); struct cifsInodeInfo *cinode = CIFS_I(inode); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifsFileInfo *cfile = (struct cifsFileInfo *) iocb-...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
289,476,740,850,137,460,000,000,000,000,000,000,000
39
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
int mingw_access(const char *filename, int mode) { wchar_t wfilename[MAX_PATH]; if (xutftowcs_path(wfilename, filename) < 0) return -1; /* X_OK is not supported by the MSVCRT version */ return _waccess(wfilename, mode & ~X_OK); }
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
129,197,032,378,147,340,000,000,000,000,000,000,000
8
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
MagickExport ImageInfo *DestroyImageInfo(ImageInfo *image_info) { assert(image_info != (ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); if (image_info->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image_info->filename); if (image_info->size !...
0
[ "CWE-665" ]
ImageMagick6
27b1c74979ac473a430e266ff6c4b645664bc805
110,617,789,440,242,020,000,000,000,000,000,000,000
42
https://github.com/ImageMagick/ImageMagick/issues/1522
for(i = 0 ; i < inppblk.nParams ; ++i) { if(!pvals[i].bUsed) continue; if(!strcmp(inppblk.descr[i].name, "endpoint")) { inst->pszEndpoint = (uchar*)es_str2cstr(pvals[i].val.d.estr, NULL); } else if(!strcmp(inppblk.descr[i].name, "basicauthfile")) { inst->pszBasicAuthFile = (uchar*)es_str2cstr(pvals[i].v...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
179,216,570,683,728,550,000,000,000,000,000,000,000
28
net bugfix: potential buffer overrun
void __put_task_struct(struct task_struct *tsk) { WARN_ON(!tsk->exit_state); WARN_ON(atomic_read(&tsk->usage)); WARN_ON(tsk == current); security_task_free(tsk); exit_creds(tsk); delayacct_tsk_free(tsk); put_signal_struct(tsk->signal); if (!profile_handoff_task(tsk)) free_task(tsk); }
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
112,445,440,114,420,730,000,000,000,000,000,000,000
14
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
writeRandomBytes_dev_urandom(void *target, size_t count) { int success = 0; /* full count bytes written? */ size_t bytesWrittenTotal = 0; const int fd = open("/dev/urandom", O_RDONLY); if (fd < 0) { return 0; } do { void *const currentTarget = (void *)((char *)target + bytesWrittenTotal); cons...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
277,771,047,613,596,880,000,000,000,000,000,000,000
25
xmlparse.c: Deny internal entities closing the doctype
ncp_reply_dword(struct ncp_server *server, int offset) { return get_unaligned((__le32 *)ncp_reply_data(server, offset)); }
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
134,652,805,703,755,880,000,000,000,000,000,000,000
4
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
QPDFObjectHandle::replaceStreamData(std::string const& data, QPDFObjectHandle const& filter, QPDFObjectHandle const& decode_parms) { assertStream(); PointerHolder<Buffer> b = new Buffer(data.length()); unsigned char* bp = b->getBuffer(); memcpy(bp, data.c_str(), data.length()); dynam...
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
285,425,497,258,929,330,000,000,000,000,000,000,000
11
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
static inline wait_queue_head_t *sk_sleep(struct sock *sk) { return sk->sk_sleep; }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
104,274,546,247,158,930,000,000,000,000,000,000,000
4
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_conn_request *ev = (void *) skb->data; int mask = hdev->link_mode; struct inquiry_entry *ie; struct hci_conn *conn; __u8 flags = 0; BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, ev->link_type); mas...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
293,757,412,845,520,640,000,000,000,000,000,000,000
94
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static void _php_date_tzinfo_dtor(void *tzinfo) { timelib_tzinfo **tzi = (timelib_tzinfo **)tzinfo;
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
281,799,885,810,759,030,000,000,000,000,000,000,000
6
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static int insert_page(struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot) { struct mm_struct *mm = vma->vm_mm; int retval; pte_t *pte; spinlock_t *ptl; retval = -EINVAL; if (PageAnon(page)) goto out; retval = -ENOMEM; flush_dcache_page(page); pte = get_locked_pte(mm, addr, ...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
231,186,999,887,357,250,000,000,000,000,000,000,000
34
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
get_options(int *argc,char ***argv) { int ho_error; char *tmp_string; MY_STAT sbuf; /* Stat information for the data file */ DBUG_ENTER("get_options"); if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option))) exit(ho_error); if (debug_info_flag) my_end_arg= MY_CHECK_ERROR | MY_...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
10,649,216,496,893,460,000,000,000,000,000,000,000
363
WL#9072: Backport WL#8785 to 5.5
static int smtp_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { return Curl_pp_getsock(&conn->proto.smtpc.pp, socks, numsocks); }
0
[ "CWE-200", "CWE-119", "CWE-787" ]
curl
ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628
111,000,321,725,412,920,000,000,000,000,000,000,000
5
smtp: use the upload buffer size for scratch buffer malloc ... not the read buffer size, as that can be set smaller and thus cause a buffer overflow! CVE-2018-0500 Reported-by: Peter Wu Bug: https://curl.haxx.se/docs/adv_2018-70a2.html
static void clear_smacro(SMacro *s) { free_smacro_members(s); /* Wipe everything except the next pointer */ memset(&s->next + 1, 0, sizeof *s - sizeof s->next); }
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
35,861,880,645,126,957,000,000,000,000,000,000,000
6
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
_PUBLIC_ enum ndr_err_code ndr_push_dns_string(struct ndr_push *ndr, int ndr_flags, const char *s) { return ndr_push_dns_string_list(ndr, &ndr->dns_string_list, ndr_flags, s); }
1
[ "CWE-400" ]
samba
cc3a67760cf9faaad3af73b1eed9e2ef85276633
66,925,982,749,908,760,000,000,000,000,000,000,000
9
CVE-2020-10745: ndr/dns-utils: prepare for NBT compatibility NBT has a funny thing where it sometimes needs to send a trailing dot as part of the last component, because the string representation is a user name. In DNS, "example.com", and "example.com." are the same, both having three components ("example", "com", "")...
void test_base64_encode(void) { char buffer[16]; size_t len = mutt_b64_encode(buffer, clear, sizeof(clear) - 1, sizeof(buffer)); if (!TEST_CHECK(len == sizeof(encoded) - 1)) { TEST_MSG("Expected: %zu", sizeof(encoded) - 1); TEST_MSG("Actual : %zu", len); } if (!TEST_CHECK(strcmp(buffer, encoded) ==...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
neomutt
6f163e07ae68654d7ac5268cbb7565f6df79ad85
20,506,236,603,419,600,000,000,000,000,000,000,000
15
Check outbuf length in mutt_to_base64() The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c. Thanks to Jeriko One for the bug report.
logger_command_cb (const void *pointer, void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { /* make C compiler happy */ (void) pointer; (void) data; (void) argv_eol; if ((argc == 1) || ((argc == 2) && (weechat_strcasecmp (...
0
[ "CWE-119", "CWE-787" ]
weechat
f105c6f0b56fb5687b2d2aedf37cb1d1b434d556
245,298,102,825,489,500,000,000,000,000,000,000,000
37
logger: call strftime before replacing buffer local variables
void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark) { const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data; struct dst_entry *dst; struct flowi6 fl6; memset(&fl6, 0, sizeof(fl6)); fl6.flowi6_oif = oif; fl6.flowi6_mark = mark; fl6.daddr = iph->daddr; fl6.saddr = iph->saddr; fl6.flowl...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
310,293,901,008,211,860,000,000,000,000,000,000,000
17
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
static enum integrity_status evm_verify_hmac(struct dentry *dentry, const char *xattr_name, char *xattr_value, size_t xattr_value_len, struct integrity_iint_cache *iint) { struct evm_ima_xattr_data *xattr_data = NULL; struct evm_ima_xattr_data calc; enum integrity_status evm_s...
0
[ "CWE-241", "CWE-19" ]
linux
613317bd212c585c20796c10afe5daaa95d4b0a1
49,679,206,364,024,440,000,000,000,000,000,000,000
80
EVM: Use crypto_memneq() for digest comparisons This patch fixes vulnerability CVE-2016-2085. The problem exists because the vm_verify_hmac() function includes a use of memcmp(). Unfortunately, this allows timing side channel attacks; specifically a MAC forgery complexity drop from 2^128 to 2^12. This patch changes ...
qemuProcessFindDomainDiskByAliasOrQOM(virDomainObjPtr vm, const char *alias, const char *qomid) { size_t i; if (alias && *alias == '\0') alias = NULL; if (alias) alias = qemuAliasDiskDriveSkipPrefix(alias); fo...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
290,480,465,311,964,740,000,000,000,000,000,000,000
26
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static MemTxResult memory_region_read_with_attrs_accessor(struct uc_struct *uc, MemoryRegion *mr, hwaddr addr, uint64_t *value, unsigned size, ...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
96,134,916,377,826,360,000,000,000,000,000,000,000
15
Fix crash when mapping a big memory and calling uc_close
flatpak_dir_get_config (FlatpakDir *self, const char *key, GError **error) { GKeyFile *config; g_autofree char *ostree_key = NULL; if (!flatpak_dir_maybe_ensure_repo (self, NULL, error)) return NULL; if (self->repo == NULL) { g_set_error (error,...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
271,569,638,028,061,000,000,000,000,000,000,000,000
22
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 ...
security_allow_program_as_root( char *name, char *path) { gboolean r; char *prefix = g_strdup_printf("%s:%s", get_pname(), name); r = security_file_check_path(prefix, path); g_free(prefix); return r; }
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
44,454,477,042,152,790,000,000,000,000,000,000,000
11
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
int line6_write_data(struct usb_line6 *line6, unsigned address, void *data, unsigned datalen) { struct usb_device *usbdev = line6->usbdev; int ret; unsigned char *status; int count; if (address > 0xffff || datalen > 0xffff) return -EINVAL; status = kmalloc(sizeof(*status), GFP_KERNEL); if (!status) ...
0
[ "CWE-476" ]
linux
0b074ab7fc0d575247b9cc9f93bb7e007ca38840
26,554,602,543,478,590,000,000,000,000,000,000,000
58
ALSA: line6: Assure canceling delayed work at disconnection The current code performs the cancel of a delayed work at the late stage of disconnection procedure, which may lead to the access to the already cleared state. This patch assures to call cancel_delayed_work_sync() at the beginning of the disconnection proced...
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { return Field_datetimef::get_TIME(ltime, ptr, fuzzydate); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
334,459,089,864,770,900,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static errno_t safe_remove_old_ccache_file(const char *old_ccache_file, const char *new_ccache_file) { int ret; size_t old_offset = 0; size_t new_offset = 0; if (new_ccache_file == NULL) { DEBUG(1, ("Missing new ccache file, " "old cc...
0
[ "CWE-287" ]
sssd
fffdae81651b460f3d2c119c56d5caa09b4de42a
267,048,646,715,557,770,000,000,000,000,000,000,000
42
Fix bad password caching when using automatic TGT renewal Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856
static int ablk_cbc_init(struct crypto_tfm *tfm) { return ablk_init_common(tfm, "__driver-cbc-aes-aesni"); }
0
[ "CWE-119", "CWE-787" ]
linux
ccfe8c3f7e52ae83155cb038753f4c75b774ca8a
20,355,395,568,842,887,000,000,000,000,000,000,000
4
crypto: aesni - fix memory usage in GCM decryption The kernel crypto API logic requires the caller to provide the length of (ciphertext || authentication tag) as cryptlen for the AEAD decryption operation. Thus, the cipher implementation must calculate the size of the plaintext output itself and cannot simply use cryp...
void vrend_inject_tcs(struct vrend_sub_context *sub_ctx, int vertices_per_patch) { struct pipe_stream_output_info so_info; memset(&so_info, 0, sizeof(so_info)); struct vrend_shader_selector *sel = vrend_create_shader_state(&so_info, false, PIPE_...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
312,324,507,521,314,350,000,000,000,000,000,000,000
28
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
fst_rx_config(struct fst_port_info *port) { int i; int pi; unsigned int offset; unsigned long flags; struct fst_card_info *card; pi = port->index; card = port->card; spin_lock_irqsave(&card->card_lock, flags); for (i = 0; i < NUM_RX_BUFFER; i++) { offset = BUF_OFFSET(rxBuffer[pi][i][0]); FST_WRW(card, rx...
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
80,641,772,594,105,410,000,000,000,000,000,000,000
23
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
static void nf_tables_expr_destroy(const struct nft_ctx *ctx, struct nft_expr *expr) { if (expr->ops->destroy) expr->ops->destroy(ctx, expr); module_put(expr->ops->type->owner); }
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
334,710,157,761,852,100,000,000,000,000,000,000,000
7
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, int vert) { int dashStep = *dashStepP; int on = *onP; int w, wstart; dashStep++; if (dashStep == gdDashSize) { dashStep = 0; on = !on; } if (on) { if (vert) { wstart = y - wid / 2; ...
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
330,421,812,106,425,060,000,000,000,000,000,000,000
31
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
isc_httpdmgr_create(isc_nm_t *nm, isc_mem_t *mctx, isc_sockaddr_t *addr, isc_httpdclientok_t *client_ok, isc_httpdondestroy_t *ondestroy, void *cb_arg, isc_httpdmgr_t **httpdmgrp) { isc_result_t result; isc_httpdmgr_t *httpdmgr = NULL; REQUIRE(nm != NULL); REQUIRE(mctx != NULL); REQUIRE(httpdmgr...
0
[]
bind9
d4c5d1c650ae0e97a083b0ce7a705c20fc001f07
226,057,143,397,617,900,000,000,000,000,000,000,000
44
Fix statistics channel multiple request processing with non-empty bodies When the HTTP request has a body part after the HTTP headers, it is not getting processed and is being prepended to the next request's data, which results in an error when trying to parse it. Improve the httpd.c:process_request() function with t...
static MSUSB_PIPE_DESCRIPTOR* msusb_mspipe_new() { return (MSUSB_PIPE_DESCRIPTOR*)calloc(1, sizeof(MSUSB_PIPE_DESCRIPTOR)); }
0
[ "CWE-190" ]
FreeRDP
9f77fc3dd2394373e1be753952b00dafa1a9b7da
286,269,363,881,544,200,000,000,000,000,000,000,000
4
Fixed int overflow in msusb_mspipes_read Thanks to hac425
static void ipv6_del_addr(struct inet6_ifaddr *ifp) { struct inet6_ifaddr *ifa, *ifn; struct inet6_dev *idev = ifp->idev; int state; int deleted = 0, onlink = 0; unsigned long expires = jiffies; spin_lock_bh(&ifp->state_lock); state = ifp->state; ifp->state = INET6_IFADDR_STATE_DEAD; spin_unlock_bh(&ifp->stat...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
153,542,658,250,538,160,000,000,000,000,000,000,000
120
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...
static inline int mailimf_cfws_fws_comment_parse(const char * message, size_t length, size_t * indx) { size_t cur_token; int r; cur_token = * indx; r = mailimf_fws_parse(message, length, &cur_token); if ((r != MAILIMF_NO_ERROR) && (r != MAILIMF_ERROR_PARSE)) return r; r = mailimf_comment_parse...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
105,504,274,281,435,170,000,000,000,000,000,000,000
20
Fixed crash #274
static int sqfs_disk_read(__u32 block, __u32 nr_blocks, void *buf) { ulong ret; if (!ctxt.cur_dev) return -1; ret = blk_dread(ctxt.cur_dev, ctxt.cur_part_info.start + block, nr_blocks, buf); if (ret != nr_blocks) return -1; return ret; }
0
[ "CWE-787" ]
u-boot
2ac0baab4aff1a0b45067d0b62f00c15f4e86856
50,631,464,989,392,070,000,000,000,000,000,000,000
15
fs/squashfs: sqfs_read: Prevent arbitrary code execution Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent...
static void ims_pcu_destroy_application_mode(struct ims_pcu *pcu) { if (pcu->setup_complete) { pcu->setup_complete = false; mb(); /* make sure flag setting is not reordered */ if (pcu->gamepad) ims_pcu_destroy_gamepad(pcu); ims_pcu_destroy_buttons(pcu); ims_pcu_destroy_backlight(pcu); if (pcu->device...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
218,326,993,298,380,770,000,000,000,000,000,000,000
16
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
AP_DECLARE(int) ap_rflush(request_rec *r) { conn_rec *c = r->connection; apr_bucket *b; ap_filter_t *f; old_write_filter_ctx *ctx; apr_status_t rv; f = insert_old_write_filter(r); ctx = f->ctx; b = apr_bucket_flush_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, b); ...
0
[ "CWE-703" ]
httpd
be0f5335e3e73eb63253b050fdc23f252f5c8ae3
301,120,030,056,858,760,000,000,000,000,000,000,000
21
*) SECURITY: CVE-2015-0253 (cve.mitre.org) core: Fix a crash introduced in with ErrorDocument 400 pointing to a local URL-path with the INCLUDES filter active, introduced in 2.4.11. PR 57531. [Yann Ylavic] Submitted By: ylavic Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/http...
static void mark_insn_zext(struct bpf_verifier_env *env, struct bpf_reg_state *reg) { s32 def_idx = reg->subreg_def; if (def_idx == DEF_NOT_SUBREG) return; env->insn_aux_data[def_idx - 1].zext_dst = true; /* The dst will be zero extended, so won't be sub-register anymore. */ reg->subreg_def = DEF_NOT_SUB...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
252,778,981,495,778,260,000,000,000,000,000,000,000
12
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...
static VirtIOSerialPort *find_port_by_name(char *name) { VirtIOSerial *vser; QLIST_FOREACH(vser, &vserdevices.devices, next) { VirtIOSerialPort *port; QTAILQ_FOREACH(port, &vser->ports, next) { if (port->name && !strcmp(port->name, name)) { return port; ...
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
324,404,967,445,438,870,000,000,000,000,000,000,000
15
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>