func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
gs_setdevice(gs_gstate * pgs, gx_device * dev) { int code = gs_setdevice_no_erase(pgs, dev); if (code == 1) code = gs_erasepage(pgs); return code; }
0
[]
ghostpdl
79cccf641486a6595c43f1de1cd7ade696020a31
101,629,549,854,723,490,000,000,000,000,000,000,000
8
Bug 699654(2): preserve LockSafetyParams in the nulldevice The nulldevice does not necessarily use the normal setpagedevice machinery, but can be set using the nulldevice operator. In which case, we don't preserve the settings from the original device (in the way setpagedevice does). Since nulldevice does nothing, th...
last_window(void) { return (one_window() && first_tabpage->tp_next == NULL); }
0
[ "CWE-416" ]
vim
ec66c41d84e574baf8009dbc0bd088d2bc5b2421
227,129,278,728,718,940,000,000,000,000,000,000,000
4
patch 8.1.2136: using freed memory with autocmd from fuzzer Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra, Dominique Pelle) Solution: Avoid using "wp" after autocommands. (closes #5041)
static int vlan_dev_stop(struct net_device *dev) { struct vlan_dev_info *vlan = vlan_dev_info(dev); struct net_device *real_dev = vlan->real_dev; dev_mc_unsync(real_dev, dev); dev_uc_unsync(real_dev, dev); if (dev->flags & IFF_ALLMULTI) dev_set_allmulti(real_dev, -1); if (dev->flags & IFF_PROMISC) dev_set_pr...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
112,852,987,033,698,060,000,000,000,000,000,000,000
18
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...
void Compute(OpKernelContext* context) override { // Read ragged_splits inputs. OpInputList ragged_nested_splits_in; OP_REQUIRES_OK(context, context->input_list("rt_nested_splits", &ragged_nested_splits_in)); const int ragged_nested_splits_len = ragged_n...
1
[ "CWE-476" ]
tensorflow
b055b9c474cd376259dde8779908f9eeaf097d93
257,139,324,383,510,850,000,000,000,000,000,000,000
40
Fix `tf.raw_ops.RaggedTensorToVariant` invalid resize. PiperOrigin-RevId: 368299574 Change-Id: I751c186325aa0bab397928845e790e60c2d90918
void CLASS canon_600_correct() { int row, col, val; static const short mul[4][2] = { { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } }; for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col=0; col < width; col++) { if ((val = BAYER(row,col) -...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
22,600,579,050,916,796,000,000,000,000,000,000,000
23
backported 0.15.4 datachecks
static int anon_vma_compatible(struct vm_area_struct *a, struct vm_area_struct *b) { return a->vm_end == b->vm_start && mpol_equal(vma_policy(a), vma_policy(b)) && a->vm_file == b->vm_file && !((a->vm_flags ^ b->vm_flags) & ~(VM_READ|VM_WRITE|VM_EXEC|VM_SOFTDIRTY)) && b->vm_pgoff == a->vm_pgoff + ((b->vm_start...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
276,876,227,608,744,400,000,000,000,000,000,000,000
8
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 ...
void Inspect::operator()(For_Ptr loop) { append_indentation(); append_token("@for", loop); append_mandatory_space(); append_string(loop->variable()); append_string(" from "); loop->lower_bound()->perform(this); append_string(loop->is_inclusive() ? " through " : " to "); loop->upper_b...
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
125,159,814,874,336,770,000,000,000,000,000,000,000
12
Fix possible bug with handling empty reference combinators Fixes #2665
R_API const char* r_config_desc(RConfig *cfg, const char *name, const char *desc) { RConfigNode *node = r_config_node_get (cfg, name); return r_config_node_desc (node, desc); }
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
260,602,535,730,472,320,000,000,000,000,000,000,000
4
Fix #7698 - UAF in r_config_set when loading a dex
xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns, int *found) { const xmlChar *ret; xmlChar *expr; if ((style == NULL) || (inst == NULL) || (name == NULL) || (inst->type != XML_ELEMENT_NODE)) return(NULL); expr = xsltGetNsProp...
0
[ "CWE-399" ]
libxslt
54977ed7966847e305a2008cb18892df26eeb065
78,017,607,714,129,580,000,000,000,000,000,000,000
25
Fix a dictionary string usage Raised in chromium, but also affecting xsltproc Also updated AUTHORS to list Chris and other contributors
GF_Err gf_isom_text_has_similar_description(GF_ISOFile *movie, u32 trackNumber, GF_TextSampleDescriptor *desc, u32 *outDescIdx, Bool *same_box, Bool *same_styles) { GF_TrackBox *trak; GF_Err e; u32 i, j, count; GF_Tx3gSampleEntryBox *txt; *same_box = *same_styles = 0; *outDescIdx = 0; if (!desc) return GF_BAD_...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
264,544,801,090,015,260,000,000,000,000,000,000,000
51
fixed #1768
static inline bool access_error(unsigned int esr, struct vm_area_struct *vma) { unsigned int mask = VM_READ | VM_WRITE | VM_EXEC; if (esr & ESR_WRITE) mask = VM_WRITE; if (esr & ESR_LNX_EXEC) mask = VM_EXEC; return vma->vm_flags & mask ? false : true; }
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
97,127,735,070,108,980,000,000,000,000,000,000,000
11
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
inline void WireFormatLite::WriteEnumNoTag(int value, io::CodedOutputStream* output) { output->WriteVarint32SignExtended(value); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
68,359,331,772,040,090,000,000,000,000,000,000,000
4
Apply patch
static int mdio_read(struct net_device *dev, int phy_id, int loc) { pegasus_t *pegasus = netdev_priv(dev); u16 res; read_mii_word(pegasus, phy_id, loc, &res); return (int)res; }
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
111,358,273,024,393,360,000,000,000,000,000,000,000
8
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
Mixin_Call_Obj Parser::parse_include_directive() { // lex identifier into `lexed` var lex_identifier(); // may error out // normalize underscores to hyphens std::string name(Util::normalize_underscores(lexed)); // create the initial mixin call object Mixin_Call_Obj call = SASS_MEMORY_NEW(Mix...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
9,328,220,265,474,735,000,000,000,000,000,000,000
17
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi) { opj_pi_comp_t *comp = NULL; opj_pi_resolution_t *res = NULL; OPJ_UINT32 index = 0; if (!pi->first) { comp = &pi->comps[pi->compno]; res = &comp->resolutions[pi->resno]; goto LABEL_SKIP; } else { pi->first = 0; } for (pi->layno = pi->poc.layno0; pi->l...
0
[ "CWE-190" ]
openjpeg
5d00b719f4b93b1445e6fb4c766b9a9883c57949
177,482,307,917,636,900,000,000,000,000,000,000,000
39
[trunk] fixed a buffer overflow in opj_tcd_init_decode_tile Update issue 431
static inline void security_bprm_committed_creds(struct linux_binprm *bprm) { }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
88,526,645,686,446,600,000,000,000,000,000,000,000
3
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int cbs_jpeg_write_scan(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc) { JPEGRawScan *scan = unit->content; int err; err = cbs_jpeg_write_scan_header(ctx, pbc, &scan->header); if (err < 0) return err...
0
[ "CWE-787" ]
FFmpeg
1812352d767ccf5431aa440123e2e260a4db2726
337,977,566,448,121,950,000,000,000,000,000,000,000
25
avcodec/cbs_jpeg: Check length for SOS Fixes: out of array access Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 Found-by: continuous fuzzing process https://github.com/google/oss...
http_PutField(struct http *to, int field, const char *string) { const char *p; CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); p = WS_Copy(to->ws, string, -1); if (p == NULL) { http_fail(to); VSLbs(to->vsl, SLT_LostHeader, TOSTRAND(string)); return; } http_SetH(to, field, p); }
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
24,080,489,489,285,140,000,000,000,000,000,000,000
13
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static void neigh_connect(struct neighbour *neigh) { struct hh_cache *hh; NEIGH_PRINTK2("neigh %p is connected.\n", neigh); neigh->output = neigh->ops->connected_output; for (hh = neigh->hh; hh; hh = hh->hh_next) hh->hh_output = neigh->ops->hh_output; }
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
121,151,724,711,255,540,000,000,000,000,000,000,000
11
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
zskiplistNode *zslCreateNode(int level, double score, sds ele) { zskiplistNode *zn = zmalloc(sizeof(*zn)+level*sizeof(struct zskiplistLevel)); zn->score = score; zn->ele = ele; return zn; }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
195,232,931,299,189,100,000,000,000,000,000,000,000
7
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static xmlNodePtr to_xml_list1(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent TSRMLS_DC) { /*FIXME: minLength=1 */ return to_xml_list(enc,data,style, parent TSRMLS_CC); }
0
[ "CWE-19" ]
php-src
c8eaca013a3922e8383def6158ece2b63f6ec483
276,312,282,784,956,420,000,000,000,000,000,000,000
4
Added type checks
void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, unsigned long start_pfn, enum memmap_context context) { struct vmem_altmap *altmap = to_vmem_altmap(__pfn_to_phys(start_pfn)); unsigned long end_pfn = start_pfn + size; pg_data_t *pgdat = NODE_DATA(nid); unsigned long pfn; unsigned ...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
58,274,577,309,730,300,000,000,000,000,000,000,000
92
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
static void address_space_set_flatview(AddressSpace *as) { FlatView *old_view = address_space_to_flatview(as); MemoryRegion *physmr = memory_region_get_flatview_root(as->root); FlatView *new_view = g_hash_table_lookup(as->uc->flat_views, physmr); assert(new_view); if (old_view == new_view) { ...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
162,740,161,518,756,580,000,000,000,000,000,000,000
28
Fix crash when mapping a big memory and calling uc_close
bash_complete_username_internal (what_to_do) int what_to_do; { return bash_specific_completion (what_to_do, rl_username_completion_function); }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
147,301,212,516,133,300,000,000,000,000,000,000,000
5
Bash-4.4 patch 7
zstopped(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); /* Mark the execution stack, and push the default result */ /* in case control returns normally. */ check_estack(5); push_mark_estack(es_stopped, no_cleanup); ++esp; make_false(esp); /* save the result */ ++esp; make_in...
0
[ "CWE-200" ]
ghostpdl
34cc326eb2c5695833361887fe0b32e8d987741c
86,075,027,338,662,560,000,000,000,000,000,000,000
17
Bug 699927: don't include operator arrays in execstack output When we transfer the contents of the execution stack into the array, take the extra step of replacing any operator arrays on the stack with the operator that reference them. This prevents the contents of Postscript defined, internal only operators (those c...
verify_callback_client(int state, X509_STORE_CTX *x509ctx) { return verify_callback(state, x509ctx, &tls_out, &client_verify_callback_called, &client_verify_optional); }
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
283,693,487,175,366,270,000,000,000,000,000,000,000
4
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
srs_set_malloc(srs_malloc_t m, srs_realloc_t r, srs_free_t f) { srs_f_malloc = m; srs_f_realloc = r; srs_f_free = f; return SRS_SUCCESS; }
0
[ "CWE-400", "CWE-703", "CWE-834" ]
postsrsd
4733fb11f6bec6524bb8518c5e1a699288c26bac
16,603,121,266,780,110,000,000,000,000,000,000,000
7
SECURITY: Fix potential denial of service attack against PostSRSd I discovered that PostSRSd could be tricked into consuming a lot of CPU time with an SRS address that has an excessively long time stamp tag, e.g. SRS0=HHHH=TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT=0@example.com
mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) { struct mysql_async_context *ctxt; size_t stacksize; DBUG_ENTER("mysql_options"); DBUG_PRINT("enter",("option: %d",(int) option)); switch (option) { case MYSQL_OPT_CONNECT_TIMEOUT: mysql->options.connect_timeout= *(uint*) arg; b...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
318,113,045,628,924,220,000,000,000,000,000,000,000
138
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
static void *fpid_next(struct seq_file *m, void *v, loff_t *pos) { if (v == (void *)1) return NULL; return seq_list_next(v, &ftrace_pids, pos); }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
48,138,575,535,757,750,000,000,000,000,000,000,000
7
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...
make_oakley_dh(uint8_t *prime, size_t len) { DH *dh = NULL; BIGNUM *p = NULL, *q = NULL, *g = NULL; p = BN_bin2bn(prime, len, NULL); if (p == NULL) goto cleanup; q = BN_new(); if (q == NULL) goto cleanup; if (!BN_rshift1(q, p)) goto cleanup; g = BN_new(); if ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
55,268,127,499,992,070,000,000,000,000,000,000,000
31
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
TEST_F(ExprMatchTest, OrNestedWithinAndMatchesCorrectly) { createMatcher(fromjson( "{$expr: {$and: [{$or: [{$eq: ['$x', 3]}, {$eq: ['$z', 5]}]}, {$eq: ['$y', 4]}]}}")); ASSERT_TRUE(matches(BSON("x" << 3 << "y" << 4))); ASSERT_TRUE(matches(BSON("z" << 5 << "y" << 4))); ASSERT_TRUE(matches(BSON("...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
244,655,931,801,924,520,000,000,000,000,000,000,000
12
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static inline void mnt_inc_writers(struct mount *mnt) { #ifdef CONFIG_SMP this_cpu_inc(mnt->mnt_pcp->mnt_writers); #else mnt->mnt_writers++; #endif }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
18,659,260,978,558,129,000,000,000,000,000,000,000
8
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
cache_user_id (KBNODE keyblock) { user_id_db_t r; const char *uid; size_t uidlen; keyid_list_t keyids = NULL; KBNODE k; for (k = keyblock; k; k = k->next) { if (k->pkt->pkttype == PKT_PUBLIC_KEY || k->pkt->pkttype == PKT_PUBLIC_SUBKEY) { keyid_list_t a = xmalloc_clear (sizeof *a); /* Hm...
0
[ "CWE-310" ]
gnupg
4bde12206c5bf199dc6e12a74af8da4558ba41bf
3,086,601,910,635,385,000,000,000,000,000,000,000
62
gpg: Distinguish between missing and cleared key flags. * include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the def...
pcsc_send_apdu_wrapped (int slot, unsigned char *apdu, size_t apdulen, unsigned char *buffer, size_t *buflen, pininfo_t *pininfo) { long err; reader_table_t slotp; size_t len, full_len; int i, n; unsigned char msgbuf[9]; int sw = SW_HOST_CARD_IO_ERROR; (voi...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
246,548,125,026,213,200,000,000,000,000,000,000,000
112
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int cli_io_handler_dump_resolvers_to_buffer(struct appctx *appctx) { struct stream_interface *si = appctx->owner; struct dns_resolvers *resolvers; struct dns_nameserver *ns; chunk_reset(&trash); switch (appctx->st2) { case STAT_ST_INIT: appctx->st2 = STAT_ST_LIST; /* let's start producing data */ ...
0
[ "CWE-125" ]
haproxy
efbbdf72992cd20458259962346044cafd9331c0
3,663,461,862,716,857,000,000,000,000,000,000,000
60
BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response() We need to make sure that the record length is not making us read past the end of the data we received. Before this patch we could for example read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly acce...
void Monitor::extract_save_mon_key(KeyRing& keyring) { EntityName mon_name; mon_name.set_type(CEPH_ENTITY_TYPE_MON); EntityAuth mon_key; if (keyring.get_auth(mon_name, mon_key)) { dout(10) << "extract_save_mon_key moving mon. key to separate keyring" << dendl; KeyRing pkey; pkey.add(mon_name, mon_ke...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
263,317,309,522,754,230,000,000,000,000,000,000,000
15
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags) { void *ret; u64 dma_mask, coherent_dma_mask; if (dev == NULL || !dev->dma_mask) return dma_alloc_coherent(dev, size, dma_handle, flags); dma_mask = *dev->dma_mask; coherent_dma_mask = dev-...
0
[]
linux-2.6
ccec6e2c4a74adf76ed4e2478091a311b1806212
163,611,288,063,225,540,000,000,000,000,000,000,000
34
Convert snd-page-alloc proc file to use seq_file Use seq_file for the proc file read/write of snd-page-alloc module. This automatically fixes bugs in the old proc code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
static gnutls_mac_algorithm_t r_jwe_get_digest_from_enc(jwa_enc enc) { gnutls_mac_algorithm_t digest; switch (enc) { case R_JWA_ENC_A128CBC: digest = GNUTLS_MAC_SHA256; break; case R_JWA_ENC_A192CBC: digest = GNUTLS_MAC_SHA384; break; case R_JWA_ENC_A256CBC: digest = GNUTL...
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
151,478,327,618,765,880,000,000,000,000,000,000,000
28
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
static int restore_confirm_stdio(int *saved_stdin, int *saved_stdout) { int r = 0; assert(saved_stdin); assert(saved_stdout); release_terminal(); if (*saved_stdin >= 0) if (dup2(*saved_stdin, STDIN_FILENO) < 0) r = -errno; if (*...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
333,916,838,714,234,750,000,000,000,000,000,000,000
21
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent, struct kobject **hstate_kobjs, struct attribute_group *hstate_attr_group) { int retval; int hi = hstate_index(h); hstate_kobjs[hi] = kobject_create_and_add(h->name, parent); if (!hstate_kobjs[hi]) return -ENOMEM; retv...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
314,470,362,337,634,870,000,000,000,000,000,000,000
17
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
inline void LegacyInt8FullyConnectedAsGEMVWorkerImpl( const RuntimeShape& input_shape, const int8_t* input_data, int32 input_offset, const RuntimeShape& filter_shape, const int8_t* filter_data, int32 filter_offset, const RuntimeShape& bias_shape, const int32* bias_data, int32 output_offset, int32 ou...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
128,593,265,990,146,420,000,000,000,000,000,000,000
205
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
void js_pushliteral(js_State *J, const char *v) { CHECKSTACK(1); STACK[TOP].type = JS_TLITSTR; STACK[TOP].u.litstr = v; ++TOP; }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
46,643,153,948,002,890,000,000,000,000,000,000,000
7
Fix 697401: Error when dropping extra arguments to lightweight functions.
xfs_bmap_local_to_extents( xfs_trans_t *tp, /* transaction pointer */ xfs_inode_t *ip, /* incore inode pointer */ xfs_fsblock_t *firstblock, /* first block allocated in xaction */ xfs_extlen_t total, /* total blocks needed by transaction */ int *logflagsp, /* inode logging flags */ int whichfork, void (*in...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
73,067,434,806,643,950,000,000,000,000,000,000,000
100
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
static void parse_new_tag(const char *arg) { static struct strbuf msg = STRBUF_INIT; const char *from; char *tagger; struct branch *s; struct tag *t; uintmax_t from_mark = 0; unsigned char sha1[20]; enum object_type type; const char *v; t = pool_alloc(sizeof(struct tag)); memset(t, 0, sizeof(struct tag)); ...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
248,737,429,664,097,800,000,000,000,000,000,000,000
79
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
start_input_gif(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) { gif_source_ptr source = (gif_source_ptr)sinfo; U_CHAR hdrbuf[10]; /* workspace for reading control blocks */ unsigned int width, height; /* image dimensions */ int colormaplen, aspectRatio; int c; /* Read and verify GIF Header */ ...
1
[ "CWE-369" ]
libjpeg-turbo
1719d12e51641cce5c77e259516649ba5ef6303c
201,180,578,183,398,080,000,000,000,000,000,000,000
144
cjpeg: Fix FPE when compressing 0-width GIF Fixes #493
R_API bool r_str_cmp_list(const char *list, const char *item, char sep) { if (!list || !item) { return false; } int i = 0, j = 0; for (; list[i] && list[i] != sep; i++, j++) { if (item[j] != list[i]) { while (list[i] && list[i] != sep) { i++; } if (!list[i]) { return false; } j = -1; c...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
132,331,868,015,026,310,000,000,000,000,000,000,000
19
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
void RGWOptionsCORS::get_response_params(string& hdrs, string& exp_hdrs, unsigned *max_age) { get_cors_response_headers(rule, req_hdrs, hdrs, exp_hdrs, max_age); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
35,538,988,455,227,020,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
random_disable_locking () { no_seed_file_locking = 1; }
0
[ "CWE-200" ]
gnupg
c6dbfe89903d0c8191cf50ecf1abb3c8458b427a
146,773,423,989,162,640,000,000,000,000,000,000,000
4
random: Hash continuous areas in the csprng pool. * cipher/random.c (mix_pool): Store the first hash at the end of the pool. -- This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG. An attacker who obtains 580 bytes of the random number from the standard RNG can trivially predict the next 20 bytes of ou...
static u32 b43_jssi_read(struct b43_wldev *dev) { u32 val = 0; val = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI1); val <<= 16; val |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI0); return val; }
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
563,363,552,515,303,850,000,000,000,000,000,000
10
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
static inline size_t xfrm_sadinfo_msgsize(void) { return NLMSG_ALIGN(4) + nla_total_size(sizeof(struct xfrmu_sadhinfo)) + nla_total_size(4); /* XFRMA_SAD_CNT */ }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
255,732,847,821,799,150,000,000,000,000,000,000,000
6
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. ...
static void nft_immediate_activate(const struct nft_ctx *ctx, const struct nft_expr *expr) { const struct nft_immediate_expr *priv = nft_expr_priv(expr); return nft_data_hold(&priv->data, nft_dreg_to_type(priv->dreg)); }
0
[ "CWE-269" ]
nf
b1a5983f56e371046dcf164f90bfaf704d2b89f6
338,681,221,219,985,060,000,000,000,000,000,000,000
7
netfilter: nf_tables_offload: incorrect flow offload action array size immediate verdict expression needs to allocate one slot in the flow offload action array, however, immediate data expression does not need to do so. fwd and dup expression need to allocate one slot, this is missing. Add a new offload_action inter...
iobuf_fdopen_nc (int fd, const char *mode) { return do_iobuf_fdopen (fd, mode, 1); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
87,991,780,139,102,730,000,000,000,000,000,000,000
4
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int imip_send(icalcomponent *ical) { icalcomponent *comp; icalproperty *prop; icalproperty_method meth; icalcomponent_kind kind; const char *argv[8], *originator, *subject; FILE *sm; pid_t pid; int r; time_t t = time(NULL); char datestr[80]; static unsigned send_count ...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
144,062,627,399,267,100,000,000,000,000,000,000,000
101
HTTP: don't overrun buffer when parsing strings with sscanf()
BufferInfo PostgreSqlStorage::bufferInfo(UserId user, const NetworkId &networkId, BufferInfo::Type type, const QString &buffer, bool create) { QSqlDatabase db = logDb(); if (!db.transaction()) { qWarning() << "PostgreSqlStorage::bufferInfo(): cannot start read only transaction!"; qWarning() << "...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
55,842,522,381,261,240,000,000,000,000,000,000,000
60
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
inline T ComputeLerp(const T top_left, const T top_right, const T bottom_left, const T bottom_right, const T_SCALE x_lerp, const T_SCALE y_lerp) { constexpr T_CALC RESOLUTION_MULT = (1 << RESOLUTION); const T_CALC top = static_cast<T_CALC>(top_left) * RESOLUTION_MULT + ...
0
[ "CWE-787" ]
tensorflow
f6c40f0c6cbf00d46c7717a26419f2062f2f8694
244,411,979,221,528,150,000,000,000,000,000,000,000
13
Validate min and max arguments to `QuantizedResizeBilinear`. PiperOrigin-RevId: 369765091 Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a
bool save_in_param(THD *thd, Item_param *param) { param->set_ignore(); return false; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
174,456,712,005,126,630,000,000,000,000,000,000,000
5
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
ref_param_write_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; ref value; int code = 0; switch (pvalue->type) { case gs_param_type_null: make_null(&value); break; ...
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
292,465,013,308,224,230,000,000,000,000,000,000,000
63
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c) { int ret; ret = build_vlc(&c->dc_vlc[0], avpriv_mjpeg_bits_dc_luminance, avpriv_mjpeg_val_dc, 12, 0); if (ret) return ret; ret = build_vlc(&c->dc_vlc[1], avpriv_mjpeg_bits_dc_chrominance, ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e07ac727c1cc9eed39e7f9117c97006f719864bd
51,374,028,618,808,410,000,000,000,000,000,000,000
27
avcodec/g2meet: Fix framebuf size Currently the code can in some cases draw tiles that hang outside the allocated buffer. This patch increases the buffer size to avoid out of array accesses. An alternative would be to fail if such tiles are encountered. I do not know if any valid files use such hanging tiles. Fixes T...
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered) { int result; IS_CONSISTENT(ht1); IS_CONSISTENT(ht2); HASH_PROTECT_RECURSION(ht1); HASH_PROTECT_RECURSION(ht2); result = zend_hash_compare_impl(ht1, ht2, compar, ordered); HASH_UNPROTECT_RECURSION(ht1); HAS...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
143,588,516,645,458,460,000,000,000,000,000,000,000
14
Fix #73832 - leave the table in a safe state if the size is too big.
test_bson_append_dbpointer (void) { bson_oid_t oid; bson_t *b; bson_t *b2; b = bson_new (); bson_oid_init_from_string (&oid, "0123abcd0123abcd0123abcd"); BSON_ASSERT (bson_append_dbpointer (b, "dbpointer", -1, "foo", &oid)); b2 = get_bson ("test28.bson"); BSON_ASSERT_BSON_EQUAL (b, b2); bson...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
3,890,495,756,680,718,000,000,000,000,000,000,000
14
CDRIVER-2269 Check for zero string length in codewscope
static Indirect *ext4_find_shared(struct inode *inode, int depth, ext4_lblk_t offsets[4], Indirect chain[4], __le32 *top) { Indirect *partial, *p; int k, err; *top = 0; /* Make k index the deepest non-null offest + 1 */ for (k = depth; k > 1 && !offsets[k-1]; k--) ; partial = ext4_get_branch(inode, k, offse...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
82,812,638,417,045,820,000,000,000,000,000,000,000
47
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix) { if (bs->drv->bdrv_check == NULL) { return -ENOTSUP; } memset(res, 0, sizeof(*res)); return bs->drv->bdrv_check(bs, res, fix); }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
312,875,202,322,386,870,000,000,000,000,000,000,000
9
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
void Process_IPFIX(void *in_buff, ssize_t in_buff_cnt, FlowSource_t *fs) { exporter_ipfix_domain_t *exporter; ssize_t size_left; uint32_t ExportTime, ObservationDomain, Sequence, flowset_length; ipfix_header_t *ipfix_header; void *flowset_header; #ifdef DEVEL static uint32_t packet_cntr = 0; #endif size_lef...
0
[]
nfdump
ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8
332,818,949,154,230,860,000,000,000,000,000,000,000
144
Fix security issues in netflow_v9.c and ipfix.c
rad_demangle_mppe_key(struct rad_handle *h, const void *mangled, size_t mlen, u_char *demangled, size_t *len) { char R[LEN_AUTH]; /* variable names as per rfc2548 */ const char *S; u_char b[16]; const u_char *A, *C; MD5_CTX Context; int Slen, i, Clen, Ppos; u_char *P; if (mlen % 16 != SALT_LEN) { generr(h...
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
174,286,050,484,609,700,000,000,000,000,000,000,000
69
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel) { DEBUGLOG(4, "ZSTD_initCStream"); return ZSTD_initCStream_srcSize(zcs, compressionLevel, ZSTD_CONTENTSIZE_UNKNOWN); }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
165,007,606,399,848,220,000,000,000,000,000,000,000
5
fixed T36302429
void udp6_proc_exit(struct net *net) { udp_proc_unregister(net, &udp6_seq_afinfo); }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
282,610,244,451,930,520,000,000,000,000,000,000,000
3
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 *lsr_read_update_value_indexed(GF_LASeRCodec *lsr, GF_Node*node, u32 fieldType, void *rep_val, u32 idx, Bool is_insert, Bool is_com, u32 *single_field_type) { Fixed *f_val; SVG_Number num; switch (fieldType) { case SVG_Points_datatype/*ITYPE_point*/: { SVG_Point *pt; ListOfXXX *res; GF_SAFEALLOC...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
6,829,107,874,163,240,000,000,000,000,000,000,000
108
fixed #2213
CImg<T>& shift_object3d(const float tx, const float ty=0, const float tz=0) { if (_height!=3 || _depth>1 || _spectrum>1) throw CImgInstanceException(_cimg_instance "shift_object3d(): Instance is not a set of 3D vertices.", cimg_in...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
90,036,516,041,143,680,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int __hidpp_send_report(struct hid_device *hdev, struct hidpp_report *hidpp_report) { struct hidpp_device *hidpp = hid_get_drvdata(hdev); int fields_count, ret; switch (hidpp_report->report_id) { case REPORT_ID_HIDPP_SHORT: fields_count = HIDPP_REPORT_SHORT_LENGTH; break; case REPORT_ID_HIDPP_LONG:...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
101,336,055,276,446,760,000,000,000,000,000,000,000
36
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) { struct sock *newsk; bool is_charged = true; newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); if (newsk != NULL) { struct sk_filter *filter; sock_copy(newsk, sk); /* SANITY */ if (likely(newsk->sk_net_refcnt)) get_net...
1
[ "CWE-704" ]
linux
9d538fa60bad4f7b23193c89e843797a1cf71ef3
105,140,890,581,498,720,000,000,000,000,000,000,000
101
net: Set sk_prot_creator when cloning sockets to the right proto sk->sk_prot and sk->sk_prot_creator can differ when the app uses IPV6_ADDRFORM (transforming an IPv6-socket to an IPv4-one). Which is why sk_prot_creator is there to make sure that sk_prot_free() does the kmem_cache_free() on the right kmem_cache slab. ...
static void zynq_slcr_reset_init(Object *obj, ResetType type) { ZynqSLCRState *s = ZYNQ_SLCR(obj); int i; DB_PRINT("RESET\n"); s->regs[R_LOCKSTA] = 1; /* 0x100 - 0x11C */ s->regs[R_ARM_PLL_CTRL] = 0x0001A008; s->regs[R_DDR_PLL_CTRL] = 0x0001A008; s->regs[R_IO_PLL_CTRL] = 0x0001A...
0
[]
qemu
98a8cc741dad9cb4738f81a994bcf8d77d619152
73,468,878,761,746,920,000,000,000,000,000,000,000
95
hw/misc/zynq_slcr: Avoid #DIV/0! error Malicious user can set the feedback divisor for the PLLs to zero, triggering a floating-point exception (SIGFPE). As the datasheet [*] is not clear how hardware behaves when these bits are zeroes, use the maximum divisor possible (128) to avoid the software FPE. [*] Zynq-7000 T...
void CModule::OnJoin(const CNick& Nick, CChan& Channel) {}
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
102,733,996,367,735,180,000,000,000,000,000,000,000
1
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
md_process_table_row(MD_CTX* ctx, MD_BLOCKTYPE cell_type, OFF beg, OFF end, const MD_ALIGN* align, int col_count) { MD_LINE line; OFF* pipe_offs = NULL; int i, j, k, n; int ret = 0; line.beg = beg; line.end = end; /* Break the line into table cells by identifying pipe ...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
54,556,840,090,573,270,000,000,000,000,000,000,000
56
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
resp_new (char *head) { char *hdr; int count, size; struct response *resp = xnew0 (struct response); resp->data = head; if (*head == '\0') { /* Empty head means that we're dealing with a headerless (HTTP/0.9) response. In that case, don't set HEADERS at all. */ return res...
0
[ "CWE-20" ]
wget
1fc9c95ec144499e69dc8ec76dbe07799d7d82cd
110,089,453,956,563,270,000,000,000,000,000,000,000
54
Fix cookie injection (CVE-2018-0494) * src/http.c (resp_new): Replace \r\n by space in continuation lines Fixes #53763 "Malicious website can write arbitrary cookie entries to cookie jar" HTTP header parsing left the \r\n from continuation line intact. The Set-Cookie code didn't check and could be tricked to write ...
void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree) { struct extent_map *em; while (1) { write_lock(&tree->map_tree.lock); em = lookup_extent_mapping(&tree->map_tree, 0, (u64)-1); if (em) remove_extent_mapping(&tree->map_tree, em); write_unlock(&tree->map_tree.lock); if (!em) break; /* on...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
87,725,013,995,537,410,000,000,000,000,000,000,000
18
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
session_worker_child_watch (GPid pid, int status, GdmSessionWorker *worker) { g_debug ("GdmSessionWorker: child (pid:%d) done (%s:%d)", (int) pid, WIFEXITED (status) ? "status" :...
1
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
47,806,532,690,566,410,000,000,000,000,000,000,000
26
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
struct usb_host_interface *usb_altnum_to_altsetting( const struct usb_interface *intf, unsigned int altnum) { int i; for (i = 0; i < intf->num_altsetting; i++) { if (intf->altsetting[i].desc.bAlternateSetting == altnum) return &intf->altsetting[i]; } return NULL; }
0
[ "CWE-400", "CWE-703" ]
linux
704620afc70cf47abb9d6a1a57f3825d2bca49cf
287,348,252,842,911,960,000,000,000,000,000,000,000
12
USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Co-developed-by...
static NTSTATUS smb1cli_pull_raw_error(const uint8_t *hdr) { uint32_t flags2 = SVAL(hdr, HDR_FLG2); NTSTATUS status = NT_STATUS(IVAL(hdr, HDR_RCLS)); if (NT_STATUS_IS_OK(status)) { return NT_STATUS_OK; } if (flags2 & FLAGS2_32_BIT_ERROR_CODES) { return status; } return NT_STATUS_DOS(CVAL(hdr, HDR_RCLS), S...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
18,661,186,844,929,457,000,000,000,000,000,000,000
15
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
freeze_jobs_list () { return 0; }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
214,763,447,204,490,400,000,000,000,000,000,000,000
4
bash-4.4-rc2 release
proto_set_cant_toggle(const int proto_id) { protocol_t *protocol; protocol = find_protocol_by_id(proto_id); protocol->can_toggle = FALSE; }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
169,630,690,134,770,380,000,000,000,000,000,000,000
7
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
int handle_request(struct ipa_extdom_ctx *ctx, struct extdom_req *req, struct berval **berval) { int ret; switch (req->input_type) { case INP_POSIX_UID: ret = handle_uid_request(req->request_type, req->data.posix_uid.uid, req->data.posix_uid.domai...
1
[ "CWE-19" ]
freeipa
c15a407cbfaed163a933ab137eed16387efe25d2
198,731,183,701,060,730,000,000,000,000,000,000,000
34
extdom: make nss buffer configurable The get*_r_wrapper() calls expect a maximum buffer size to avoid memory shortage if too many threads try to allocate buffers e.g. for large groups. With this patch this size can be configured by setting ipaExtdomMaxNssBufSize in the plugin config object cn=ipa_extdom_extop,cn=plugi...
DeleteProcessedBatch(qqueue_t *pThis, batch_t *pBatch) { int i; void *pUsr; int nEnqueued = 0; rsRetVal localRet; DEFiRet; ISOBJ_TYPE_assert(pThis, qqueue); assert(pBatch != NULL); for(i = 0 ; i < pBatch->nElem ; ++i) { pUsr = pBatch->pElem[i].pUsrp; if( pBatch->pElem[i].state == BATCH_STATE_RDY ||...
0
[ "CWE-772" ]
rsyslog
dfa88369d4ca4290db56b843f9eabdae1bfe0fd5
233,125,530,289,272,850,000,000,000,000,000,000,000
37
bugfix: memory leak when $RepeatedMsgReduction on was used bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225
static json_object *json_get_segments_jobj(json_object *hdr_jobj) { json_object *jobj_segments; if (!hdr_jobj || !json_object_object_get_ex(hdr_jobj, "segments", &jobj_segments)) return NULL; return jobj_segments; }
0
[ "CWE-787" ]
cryptsetup
52f5cb8cedf22fb3e14c744814ec8af7614146c7
113,807,624,077,075,840,000,000,000,000,000,000,000
9
Check segment gaps regardless of heap space. Segments are validated in hdr_validate_segments. Gaps in segment keys are detected when collecting offsets. But if an invalid segment is very large, larger than count, it could happen that cryptsetup is unable to allocate enough memory, not giving a clue about what actually...
void ip_flush_pending_frames(struct sock *sk) { __ip_flush_pending_frames(sk, &sk->sk_write_queue, &inet_sk(sk)->cork.base); }
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
77,764,407,360,499,460,000,000,000,000,000,000,000
4
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
Boolean isLegalUTF8(const UTF8 *source, int length) { UTF8 a; const UTF8 *srcptr = source+length; switch (length) { default: return false; /* Everything else falls through when "true"... */ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) ret...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
252,181,740,091,903,960,000,000,000,000,000,000,000
38
fixed #2061
read_symlink_stored(struct archive_read *a, struct archive_entry *entry, struct archive_string_conv *sconv) { const void *h; const char *p; struct rar *rar; int ret = (ARCHIVE_OK); rar = (struct rar *)(a->format->data); if ((h = rar_read_ahead(a, (size_t)rar->packed_size, NULL)) == NULL...
0
[ "CWE-119", "CWE-787" ]
libarchive
05caadc7eedbef471ac9610809ba683f0c698700
287,987,594,889,435,650,000,000,000,000,000,000,000
30
Issue 719: Fix for TALOS-CAN-154 A RAR file with an invalid zero dictionary size was not being rejected, leading to a zero-sized allocation for the dictionary storage which was then overwritten during the dictionary initialization. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this...
static void reg_w(struct sd *sd, u16 index, u16 value) { struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; int ret, req = 0; if (sd->gspca_dev.usb_err < 0) return; /* Avoid things going to fast for the bridge with a xhci host */ udelay(150); switch (sd->bridge) { case BRIDGE_OV511: case BRIDGE_OV511PLU...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
268,591,987,613,124,560,000,000,000,000,000,000,000
48
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, uint32_t quic_version) { struct ndpi_packet_struct *packet = &flow->packet; union ja3_info ja3; u_int8_t invalid_ja3 = 0; u_int16_t tls_version, ja3_str_len; char ja3_str[JA3_STR_LEN]; ndpi_...
1
[ "CWE-787" ]
nDPI
1ec621c85b9411cc611652fd57a892cfef478af3
257,200,396,347,775,650,000,000,000,000,000,000,000
941
Added further checks
ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC) { zend_object_handle handle = Z_OBJ_HANDLE_P(object); return EG(objects_store).object_buckets[handle].bucket.obj.refcount; }
0
[ "CWE-119", "CWE-787" ]
php-src
6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43
234,236,813,995,575,100,000,000,000,000,000,000,000
6
Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
static struct inode *find_inode_fast(struct super_block *sb, struct hlist_head *head, unsigned long ino) { struct inode *inode = NULL; repeat: hlist_for_each_entry(inode, head, i_hash) { if (inode->i_ino != ino) continue; if (inode->i_sb != sb) continue; spin_lock(&inode->i_lock); if (inode->i_stat...
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
42,747,229,716,726,270,000,000,000,000,000,000,000
22
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) { struct rt6_rtnl_dump_arg arg = { .filter.dump_exceptions = true, .filter.dump_routes = true }; const struct nlmsghdr *nlh = cb->nlh; struct net *net = sock_net(skb->sk); unsigned int h, s_h; unsigned int e = 0, s_e; struct fib6_wa...
0
[ "CWE-755" ]
linux
7b09c2d052db4b4ad0b27b97918b46a7746966fa
328,472,077,343,588,250,000,000,000,000,000,000,000
95
ipv6: fix a typo in fib6_rule_lookup() Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit. Many thanks to Yi, this trivial patch does not reflect the patient work that has been done. Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic") Signed-off-by: Eric Du...
mwifiex_free_curr_bcn(struct mwifiex_private *priv) { kfree(priv->curr_bcn_buf); priv->curr_bcn_buf = NULL; }
0
[ "CWE-269", "CWE-787" ]
linux
b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d
336,214,630,480,024,560,000,000,000,000,000,000,000
5
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length check befo...
virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, struct rte_mbuf **pkts, uint32_t count) { struct vhost_virtqueue *vq; uint32_t nb_tx = 0; VHOST_LOG_DATA(DEBUG, "(%d) %s\n", dev->vid, __func__); if (unlikely(!is_valid_virt_queue_idx(queue_id, 0, dev->nr_vring))) { VHOST_LOG_DATA(ERR, "(%d) %s: invalid v...
0
[ "CWE-665" ]
dpdk
97ecc1c85c95c13bc66a87435758e93406c35c48
99,231,903,305,206,410,000,000,000,000,000,000,000
45
vhost: fix translated address not checked Malicious guest can construct desc with invalid address and zero buffer length. That will request vhost to check both translated address and translated data length. This patch will add missed address check. CVE-2020-10725 Fixes: 75ed51697820 ("vhost: add packed ring batch deq...
int CJSON_CDECL main(void) { UNITY_BEGIN(); RUN_TEST(cjson_array_foreach_should_loop_over_arrays); RUN_TEST(cjson_array_foreach_should_not_dereference_null_pointer); RUN_TEST(cjson_get_object_item_should_get_object_items); RUN_TEST(cjson_get_object_item_case_sensitive_should_get_object_items); ...
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
235,658,916,127,822,570,000,000,000,000,000,000,000
28
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
template <class T, class It> std::unique_ptr<T> createHeaderMap(It begin, It end) { auto new_header_map = T::create(); HeaderMapImpl::initFromInitList(*new_header_map, begin, end); return new_header_map; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
186,781,189,699,188,720,000,000,000,000,000,000,000
5
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
float getVariationalRefinementGamma() const CV_OVERRIDE { return variational_refinement_gamma; }
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
115,717,605,270,190,560,000,000,000,000,000,000,000
1
video:fixed DISOpticalFlow segfault from small img
set_resigntime(dns_zone_t *zone) { dns_rdataset_t rdataset; dns_fixedname_t fixed; unsigned int resign; isc_result_t result; uint32_t nanosecs; dns_db_t *db = NULL; /* We only re-sign zones that can be dynamically updated */ if (zone->update_disabled) return; if (!inline_secure(zone) && (zone->type != dns_...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
60,007,060,042,754,910,000,000,000,000,000,000,000
44
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
Bool scan_color(char *val, u32 *clr_prim, u32 *clr_tranf, u32 *clr_mx, Bool *clr_full_range) { char *sep = strchr(val, ','); if (!sep) return GF_FALSE; sep[0] = 0; *clr_prim = gf_cicp_parse_color_primaries(val); sep[0] = ','; if (*clr_prim == (u32) -1) return GF_FALSE; val = sep+1; sep = strchr(val, ','); if ...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
254,677,922,904,909,970,000,000,000,000,000,000,000
40
fixed crashes for very long path - cf #1908
GF_Err paen_box_write(GF_Box *s, GF_BitStream *bs) { if (!s) return GF_BAD_PARAM; return gf_isom_box_write_header(s, bs); }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
17,999,124,120,123,040,000,000,000,000,000,000,000
5
fixed #2255
static int check_cfg(struct bpf_verifier_env *env) { struct bpf_insn *insns = env->prog->insnsi; int insn_cnt = env->prog->len; int ret = 0; int i, t; insn_state = kcalloc(insn_cnt, sizeof(int), GFP_KERNEL); if (!insn_state) return -ENOMEM; insn_stack = kcalloc(insn_cnt, sizeof(int), GFP_KERNEL); if (!insn_...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
154,803,343,921,817,330,000,000,000,000,000,000,000
106
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...