func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::vector<Rect>& candidates, std::vector<int>& rejectLevels, std::vector<double>& levelWeights, double scaleFactor, Size minObjectSize, Siz...
0
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
89,247,680,062,648,230,000,000,000,000,000,000,000
123
objdetect: validate feature rectangle on reading
uint16_t mobi_buffer_get16(MOBIBuffer *buf) { if (buf->offset + 2 > buf->maxlen) { debug_print("%s", "End of buffer\n"); buf->error = MOBI_BUFFER_END; return 0; } uint16_t val; val = (uint16_t)((uint16_t) buf->data[buf->offset] << 8 | (uint16_t) buf->data[buf->offset + 1]); b...
0
[ "CWE-787" ]
libmobi
ab5bf0e37e540eac682a14e628853b918626e72b
211,695,764,468,332,120,000,000,000,000,000,000,000
11
fix oob write bug inside libmobi
validate(const char *name) { char *value = tigetstr(name); if (!VALID_STRING(value)) { if (v_opt > 1) { printf("? %s %s\n", (value == ABSENT_STRING) ? "absent" : "cancel", name); } value = 0; } return value; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
119,202,984,443,413,240,000,000,000,000,000,000,000
15
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
virDomainDiskGeometryDefFormat(virBufferPtr buf, virDomainDiskDefPtr def) { const char *trans = virDomainDiskGeometryTransTypeToString(def->geometry.trans); if (def->geometry.cylinders > 0 && def->geometry.heads > 0 && def->geometry.sectors > 0) { ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
252,439,305,919,872,700,000,000,000,000,000,000,000
21
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, int cap, int audit) { for (;;) { /* The creator of the user namespace has all caps. */ if (targ_ns != &init_user_ns && targ_ns->creator == cred->user) return 0; /* Do we have the necessary capabilities? */ if (targ_ns == cred->user-...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
49,293,325,700,923,470,000,000,000,000,000,000,000
25
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
gethttp (struct url *u, struct url *original_url, struct http_stat *hs, int *dt, struct url *proxy, struct iri *iri, int count) { struct request *req = NULL; char *type = NULL; char *user, *passwd; char *proxyauth; int statcode; int write_error; wgint contlen, contrange; struct url *conn; FI...
0
[ "CWE-200" ]
wget
a933bdd31eee9c956a3b5cc142f004ef1fa94cb3
293,921,123,092,512,900,000,000,000,000,000,000,000
901
Keep fetched URLs in POSIX extended attributes * configure.ac: Check for xattr availability * src/Makefile.am: Add xattr.c * src/ftp.c: Include xattr.h. (getftp): Set attributes if enabled. * src/http.c: Include xattr.h. (gethttp): Add parameter 'original_url', set attributes if enabled. (http_loop): Add 'orig...
PHPAPI php_url *php_url_parse_ex(char const *str, size_t length) { char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); char const *s, *e, *p, *pp, *ue; s = str; ue = s + length; /* parse scheme */ if ((e = memchr(s, ':', length)) && e != s) { /* validate scheme */ p = s; while (p < e) { /* s...
0
[ "CWE-20" ]
php-src
2d3d72412a6734e19a38ed10f385227a6238e4a6
98,010,491,538,199,680,000,000,000,000,000,000,000
241
Fix #77423: parse_url() will deliver a wrong host to user To avoid that `parse_url()` returns an erroneous host, which would be valid for `FILTER_VALIDATE_URL`, we make sure that only userinfo which is valid according to RFC 3986 is treated as such. For consistency with the existing url parsing code, we use ctype fun...
struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acctflag, struct user_struct **user, int creat_flags, int page_size_log) { struct file *file = ERR_PTR(-ENOMEM); struct inode *inode; struct path path; struct super_block *sb; struct qstr quick_string; int hstate_idx; hstate_idx =...
0
[]
linux
1bfad99ab42569807d0ca1698449cae5e8c0334a
156,775,174,576,372,860,000,000,000,000,000,000,000
77
hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete fallocate hole punch will want to unmap a specific range of pages. Modify the existing hugetlb_vmtruncate_list() routine to take a start/end range. If end is 0, this indicates all pages after start should be unmapped. This is the same as the existi...
static int kvm_handle_bad_page(struct kvm_vcpu *vcpu, gfn_t gfn, kvm_pfn_t pfn) { /* * Do not cache the mmio info caused by writing the readonly gfn * into the spte otherwise read access on readonly gfn also can * caused mmio page fault and treat it as mmio access. */ if (pfn == KVM_PFN_ERR_RO_FAULT) return...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
30,513,999,191,215,840,000,000,000,000,000,000,000
17
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static int oidc_handle_unauthenticated_user(request_rec *r, oidc_cfg *c) { /* see if we've configured OIDCUnAuthAction for this path */ switch (oidc_dir_cfg_unauth_action(r)) { case OIDC_UNAUTH_RETURN410: return HTTP_GONE; case OIDC_UNAUTH_RETURN401: return HTTP_UNAUTHORIZED; case OIDC_UNAUTH_PASS: r->user ...
0
[ "CWE-287" ]
mod_auth_openidc
21e3728a825c41ab41efa75e664108051bb9665e
115,508,854,299,390,430,000,000,000,000,000,000,000
37
release 2.1.6 : security fix: scrub headers for "AuthType oauth20" Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
int_stack_pop(int_stack* s) { int v; #ifdef ONIG_DEBUG if (s->n <= 0) { fprintf(stderr, "int_stack_pop: fail empty. %p\n", s); return 0; } #endif v = s->v[s->n]; s->n--; return v; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
130,296,372,302,273,380,000,000,000,000,000,000,000
15
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
parse_atxheader(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size) { size_t level = 0; size_t i, end, skip; while (level < size && level < 6 && data[level] == '#') level++; for (i = level; i < size && data[i] == ' '; i++); for (end = i; end < size && data[end] != '\n'; end++); skip = end; ...
0
[]
redcarpet
e5a10516d07114d582d13b9125b733008c61c242
193,176,432,269,575,140,000,000,000,000,000,000,000
32
Avoid rewinding previous inline when auto-linking When a bit like "_foo_1@bar.com" is processed, first the emphasis is rendered, then the 1 is output verbatim. When the `@` is encountered, Redcarpet tries to find the "local part" of the address and stops when it encounters an invalid char (i.e. here the `!`). The pro...
void net_dns_print(pid_t pid) { EUID_ASSERT(); // drop privileges - will not be able to read /etc/resolv.conf for --noroot option // in case the pid is that of a firejail process, use the pid of the first child process pid = switch_to_child(pid); // exit if no permission to join the sandbox check_join_permissio...
1
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
61,914,281,476,447,650,000,000,000,000,000,000,000
42
fixing CVE-2022-31214
static void check_condition(pn_event_t *e, pn_condition_t *cond) { if (pn_condition_is_set(cond)) { fprintf(stderr, "%s: %s: %s\n", pn_event_type_name(pn_event_type(e)), pn_condition_get_name(cond), pn_condition_get_description(cond)); pn_connection_close(pn_event_connection(e)); exit_code = 1...
0
[]
qpid-proton
159fac1f90d9b1ace1138d510176e7a5da54e9e9
46,254,496,632,606,660,000,000,000,000,000,000,000
8
PROTON-2014: [c] Fix example broker to warn when it fails to set up ssl - Also make send-ssl tell you the remote peer
ZEND_VM_HANDLER(172, ZEND_FUNC_GET_ARGS, UNUSED|CONST, UNUSED) { USE_OPLINE zend_array *ht; uint32_t arg_count, result_size, skip; arg_count = EX_NUM_ARGS(); if (OP1_TYPE == IS_CONST) { skip = Z_LVAL_P(RT_CONSTANT(opline, opline->op1)); if (arg_count < skip) { result_size = 0; } else { result_size = a...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
310,284,913,864,231,100,000,000,000,000,000,000,000
74
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int flags_fds(const int fds[], size_t n_socket_fds, size_t n_storage_fds, bool nonblock) { size_t i, n_fds; int r; n_fds = n_socket_fds + n_storage_fds; if (n_fds <= 0) return 0; assert(fds); /* Drops/Sets O_NONBLOCK and FD_CLOEXEC from the file ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
162,604,334,630,550,900,000,000,000,000,000,000,000
32
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *offset = &opline->op2.u.constant; if (IS_VAR != IS_VAR || container) { if (I...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
200,315,552,123,453,170,000,000,000,000,000,000,000
90
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
int router_exit_policy_rejects_all(const routerinfo_t *router) { return router->policy_is_reject_star;
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
160,933,623,610,863,520,000,000,000,000,000,000,000
4
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
int main(int argc, char **argv) { MYSQL mysql; option_string *eptr; MY_INIT(argv[0]); my_getopt_use_args_separator= TRUE; if (load_defaults("my",load_default_groups,&argc,&argv)) { my_end(0); exit(1); } my_getopt_use_args_separator= FALSE; defaults_argv=argv; if (get_options(&argc,&argv)) ...
1
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
118,371,930,247,381,820,000,000,000,000,000,000,000
144
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent) { struct aio_ring_info *info = &ioctx->ring_info; struct aio_ring *ring; unsigned long head; int ret = 0; ring = kmap_atomic(info->ring_pages[0]); dprintk("in aio_read_evt h%lu t%lu m%lu\n", (unsigned long)ring->head, (unsigned long)ring->tai...
0
[ "CWE-200" ]
linux
a70b52ec1aaeaf60f4739edb1b422827cb6f3893
284,606,124,682,138,000,000,000,000,000,000,000,000
35
vfs: make AIO use the proper rw_verify_area() area helpers We had for some reason overlooked the AIO interface, and it didn't use the proper rw_verify_area() helper function that checks (for example) mandatory locking on the file, and that the size of the access doesn't cause us to overflow the provided offset limits ...
TEST_F(AllowFailedInOrListTest, TwoGoodJwts) { EXPECT_CALL(mock_cb_, onComplete(Status::Ok)); auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, GoodToken}, {kOtherHeader, OtherGoodToken}}; context_ = Verifier::createContext(headers, parent_span_, &mock_cb_); verifier_->verify(context_); EXP...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
260,294,982,716,353,870,000,000,000,000,000,000,000
11
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
Field *get_tmp_table_field() { return result_field ? result_field : (*ref)->get_tmp_table_field(); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
324,685,071,467,790,560,000,000,000,000,000,000,000
2
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
format_and_print_line (const char *prefix, const char *line, int line_length) { int remaining_chars; char *line_dup, *token; assert (prefix != NULL); assert (line != NULL); line_dup = xstrdup (line); if (line_length <= 0) line_length = MAX_CHARS_PER_LINE - TABULATION; printf...
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
277,619,496,419,374,900,000,000,000,000,000,000,000
37
Introduce --trust-server-names. Close CVE-2010-2252.
static inline void avg_tpel_pixels_mc02_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ int i,j; for (i=0; i < height; i++) { for (j=0; j < width; j++) { dst[j] = (dst[j] + ((683*(src[j] + 2*src[j+stride] + 1)) >> 11) + 1) >> 1; } src += stride; dst += str...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
57,093,818,540,861,190,000,000,000,000,000,000,000
10
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static RList* sections(RBinFile *bf) { r_return_val_if_fail (bf && bf->o, NULL); QnxObj *qo = bf->o->bin_obj; return r_list_clone (qo->sections); }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
267,370,299,570,915,020,000,000,000,000,000,000,000
5
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
ares_channel channel() const { return resolver_->channel_; }
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
141,404,255,882,085,740,000,000,000,000,000,000,000
1
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
int set_default_file(char *datafile, int d_off, int sa_name) { char sa_dir[MAX_FILE_LEN]; struct tm rectime = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL}; int err = 0; /* Set directory where daily data files will be saved */ if (datafile[0]) { strncpy(sa_dir, datafile, MAX_FILE_LEN); } else { strncpy(sa_dir, SA_DI...
0
[ "CWE-125" ]
sysstat
fbc691eaaa10d0bcea6741d5a223dc3906106548
199,268,092,995,401,470,000,000,000,000,000,000,000
43
Fix #196 and #199: Out of bound reads security issues Check args before calling memmove() and memset() in remap_struct() function to avoid out of bound reads which would possibly lead to unknown code execution and/or sadf command crash. Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
XkbWriteKeySyms(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { register KeySym *pSym; XkbSymMapPtr symMap; xkbSymMapWireDesc *outMap; register unsigned i; symMap = &xkb->map->key_sym_map[rep->firstKeySym]; for (i = 0; i < rep->nKeySyms; i++, symMap++) { ...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
109,231,064,623,208,440,000,000,000,000,000,000,000
38
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) { const unsigned char *cursor, *limit, *marker, *start; zval **rval_ref; limit = max; cursor = *p; if (YYCURSOR >= YYLIMIT) { return 0; } if (var_hash && cursor[0] != 'R') { var_push(var_hash, rval); } start = cursor; #line 496 "ext/standard/var...
1
[ "CWE-125" ]
php-src
16b3003ffc6393e250f069aa28a78dc5a2c064b2
201,260,164,727,623,300,000,000,000,000,000,000,000
844
Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
static unsigned offset_il_node(struct mempolicy *pol, unsigned long n) { unsigned nnodes = nodes_weight(pol->v.nodes); unsigned target; int i; int nid; if (!nnodes) return numa_node_id(); target = (unsigned int)n % nnodes; nid = first_node(pol->v.nodes); for (i = 0; i < target; i++) nid = next_node(nid, po...
0
[ "CWE-787" ]
linux
aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd
100,221,722,718,028,290,000,000,000,000,000,000,000
15
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Using an empty (malformed) nodelist that is not caught during mount option parsing leads to a stack-out-of-bounds access. The option string that was used was: "mpol=prefer:,". However, MPOL_PREFERRED requires a single node number, which is not being provi...
void gic_dist_set_priority(GICState *s, int cpu, int irq, uint8_t val, MemTxAttrs attrs) { if (s->security_extn && !attrs.secure) { if (!GIC_DIST_TEST_GROUP(irq, (1 << cpu))) { return; /* Ignore Non-secure access of Group0 IRQ */ } val = 0x80 | (val >> 1); /...
0
[ "CWE-787" ]
qemu
edfe2eb4360cde4ed5d95bda7777edcb3510f76a
100,644,524,941,949,100,000,000,000,000,000,000,000
18
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register Per the ARM Generic Interrupt Controller Architecture specification (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, not 10: - 4.3 Distributor register descriptions - 4.3.15 Software Generated Interrupt Register, GICD_SG - Table 4-2...
int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags) { return bdrv_rw_co(bs, sector_num, NULL, nb_sectors, true, BDRV_REQ_ZERO_WRITE | flags); }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
287,842,283,381,364,970,000,000,000,000,000,000,000
6
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...
static void close_accept_socket(void) { BIO_printf(bio_err,"shutdown accept socket\n"); if (accept_socket >= 0) { SHUTDOWN2(accept_socket); } }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
321,075,426,016,747,030,000,000,000,000,000,000,000
8
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static void connection_handle_close_state(connection *con) { connection_read_for_eos(con); if (log_epoch_secs - con->close_timeout_ts > HTTP_LINGER_TIMEOUT) { connection_close(con); } }
0
[ "CWE-703" ]
lighttpd1.4
b03b86f47b0d5a553137f081fadc482b4af1372d
290,425,278,741,011,980,000,000,000,000,000,000,000
7
[core] fix merging large headers across mult reads (fixes #3059) (thx mitd) x-ref: "Connections stuck in Close_Wait causing 100% cpu usage" https://redmine.lighttpd.net/issues/3059
unsigned uECC_curve_num_n_bits(uECC_Curve curve) { return curve->num_n_bits; }
0
[ "CWE-415" ]
micro-ecc
1b5f5cea5145c96dd8791b9b2c41424fc74c2172
93,322,557,103,478,100,000,000,000,000,000,000,000
3
Fix for #168
GRANT_INFO *Natural_join_column::grant() { /* if (view_field) return &(table_ref->grant); return &(table_ref->table->grant);*/ /* Have to check algorithm because merged derived also has field_translation. */ //if (table_ref->effective_algorithm == DTYPE_ALGORITHM_MERGE) if (table_ref->is_merged_der...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
23,063,603,121,163,970,000,000,000,000,000,000,000
14
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
void ImapModelOpenConnectionTest::testCapabilityAfterLogin() { cleanup(); init(true); // yuck, but I can't come up with anything better... QCoreApplication::processEvents(); QCoreApplication::processEvents(); QVERIFY(SOCK->writtenStuff().isEmpty()); SOCK->fakeReading( "* OK foo\r\n" ); QVERIFY(...
0
[ "CWE-200" ]
trojita
25fffa3e25cbad85bbca804193ad336b090a9ce1
249,661,248,952,981,400,000,000,000,000,000,000,000
46
IMAP: refuse to work when STARTTLS is required but server sends PREAUTH Oops, we cannot send STARTTLS when the connection is already authenticated. This is serious enough to warrant an error; an attacker might be going after a plaintext of a message we're going to APPEND, etc. Thanks to Arnt Gulbrandsen on the imap-p...
setcolor_cont(i_ctx_t *i_ctx_p) { ref arr, *parr = &arr; es_ptr ep = esp; int i=0, code = 0, usealternate, stage, stack_depth, CIESubst = 0, IsICC = 0; unsigned int depth; PS_colour_space_t *obj; stack_depth = (int)ep[-3].value.intval; depth = (unsigned int)ep[-2].value.intval; stage = ...
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
141,155,059,452,052,350,000,000,000,000,000,000,000
70
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
static uint32_t timer_fsb_route(HPETTimer *t) { return t->config & HPET_TN_FSB_ENABLE; }
0
[ "CWE-119" ]
qemu
3f1c49e2136fa08ab1ef3183fd55def308829584
173,260,226,814,019,340,000,000,000,000,000,000,000
4
hpet: fix buffer overrun on invalid state load CVE-2013-4527 hw/timer/hpet.c buffer overrun hpet is a VARRAY with a uint8 size but static array of 32 To fix, make sure num_timers is valid using VMSTATE_VALID hook. Reported-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Michael S. Tsirkin <mst@redhat.com...
cmsPipeline* CMSEXPORT _cmsDefaultICCintents(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[], cmsHPROFILE hProfiles[], ...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
219,348,630,148,627,200,000,000,000,000,000,000,000
10
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
community_list_config_str (struct community_entry *entry) { const char *str; if (entry->any) str = ""; else { if (entry->style == COMMUNITY_LIST_STANDARD) str = community_str (entry->u.com); else str = entry->config; } return str; }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
220,816,724,620,627,830,000,000,000,000,000,000,000
15
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
GST_START_TEST (test_GstDateTime_to_g_date_time) { GDateTime *gdt1; GDateTime *gdt2; GstDateTime *dt; gdt1 = g_date_time_new_now_utc (); g_date_time_ref (gdt1); /* keep it alive for compare below */ dt = gst_date_time_new_from_g_date_time (gdt1); gdt2 = gst_date_time_to_g_date_time (dt); fail_un...
0
[ "CWE-125" ]
gstreamer
9398b7f1a75b38844ae7050b5a7967e4cdebe24f
68,448,166,772,131,260,000,000,000,000,000,000,000
17
datetime: fix potential out-of-bound read on malformed datetime string https://bugzilla.gnome.org/show_bug.cgi?id=777263
checkNum( struct berval *in, struct berval *out ) { /* parse serialNumber */ ber_len_t neg = 0, extra = 0; char first = '\0'; out->bv_val = in->bv_val; out->bv_len = 0; if ( out->bv_val[0] == '-' ) { neg++; out->bv_len++; } if ( strncasecmp( out->bv_val, "0x", STRLENOF("0x") ) == 0 ) { first = out->bv_...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
10,858,260,295,998,759,000,000,000,000,000,000,000
54
ITS#9383 remove assert in certificateListValidate
static inline int skb_unclone(struct sk_buff *skb, gfp_t pri) { might_sleep_if(gfpflags_allow_blocking(pri)); if (skb_cloned(skb)) return pskb_expand_head(skb, 0, 0, pri); return 0;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
240,730,646,244,442,880,000,000,000,000,000,000,000
9
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static struct dhcp_lease *add_lease(GDHCPServer *dhcp_server, uint32_t expire, const uint8_t *chaddr, uint32_t yiaddr) { struct dhcp_lease *lease = NULL; int ret; ret = get_lease(dhcp_server, yiaddr, chaddr, &lease); if (ret != 0) return NULL; memset(lease, 0, sizeof(*lease)); memcpy(lease->lease_mac, c...
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
106,590,187,004,974,330,000,000,000,000,000,000,000
28
gdhcp: Avoid reading invalid data in dhcp_get_option
GF_Err pmax_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_PMAXBox *ptr = (GF_PMAXBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->maxSize); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
136,962,143,297,840,150,000,000,000,000,000,000,000
10
prevent dref memleak on invalid input (#1183)
static Fixed lsr_read_fixed_clamp(GF_LASeRCodec *lsr, const char *name) { s32 val; GF_LSR_READ_INT(lsr, val, 8, name); return INT2FIX(val) / 255; }
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
187,559,182,859,623,070,000,000,000,000,000,000,000
6
fixed #2213
ssize_t red_stream_read(RedStream *s, void *buf, size_t nbyte) { ssize_t ret; #if HAVE_SASL if (s->priv->sasl.conn && s->priv->sasl.runSSF) { ret = red_stream_sasl_read(s, (uint8_t*) buf, nbyte); } else #endif ret = s->priv->read(s, buf, nbyte); return ret; }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
307,767,542,533,190,900,000,000,000,000,000,000,000
13
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
void cil_destroy_handleunknown(struct cil_handleunknown *unk) { free(unk); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
196,010,908,649,463,180,000,000,000,000,000,000,000
4
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
oc_to_str(src,dest) char *src, *dest; { int i; while ((i = (int) *src++) != 0) { if (i < 0 || i >= MAXOCLASSES) impossible("oc_to_str: illegal object class %d", i); else *dest++ = def_oc_syms[i].sym; } *dest = '\0'; }
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
75,551,700,449,459,570,000,000,000,000,000,000,000
13
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
static void io_ring_ctx_free(struct io_ring_ctx *ctx) { io_finish_async(ctx); if (ctx->sqo_mm) mmdrop(ctx->sqo_mm); io_iopoll_reap_events(ctx); io_sqe_buffer_unregister(ctx); io_sqe_files_unregister(ctx); io_eventfd_unregister(ctx); #if defined(CONFIG_UNIX) if (ctx->ring_sock) { ctx->ring_sock->file = NULL...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
272,465,990,570,339,820,000,000,000,000,000,000,000
31
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
u64 gf_isom_get_file_size(GF_ISOFile *the_file) { if (!the_file) return 0; if (the_file->movieFileMap) return gf_bs_get_size(the_file->movieFileMap->bs); #ifndef GPAC_DISABLE_ISOM_WRITE if (the_file->editFileMap) return gf_bs_get_size(the_file->editFileMap->bs); #endif return 0; }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
109,487,496,334,260,820,000,000,000,000,000,000,000
9
fixed #1706
ebews_set_phone_number_changes (EBookBackendEws *bbews, ESoapMessage *message, EContact *new, EContact *old, gchar **out_new_change_key, GCancellable *cancellable, GError **error) { gint i; gchar *new_value, *old_value; if (!message) return; for (i = 0; i < G_N_ELEMENTS (phone_field_map)...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
335,706,911,342,019,440,000,000,000,000,000,000,000
25
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool purge) { nc->receive_disabled = 0; if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_HUBPORT) { if (net_hub_flush(nc->peer)) { qemu_notify_event(); } } if (qemu_net_queue_flush(nc->incoming_queue)) { ...
0
[ "CWE-835" ]
qemu
705df5466c98f3efdd2b68d3b31dad86858acad7
35,288,955,973,492,440,000,000,000,000,000,000,000
19
net: introduce qemu_receive_packet() Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as pee...
static void init_sql_statement_names() { char *first_com= (char*) offsetof(STATUS_VAR, com_stat[0]); char *last_com= (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_END]); int record_size= (char*) offsetof(STATUS_VAR, com_stat[1]) - (char*) offsetof(STATUS_VAR, com_stat[0]); char *ptr; ...
0
[ "CWE-362" ]
server
347eeefbfc658c8531878218487d729f4e020805
50,915,953,366,294,660,000,000,000,000,000,000,000
32
don't use my_copystat in the server it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
static int git_tcp_connect_sock(char *host, int flags) { struct strbuf error_message = STRBUF_INIT; int sockfd = -1; const char *port = STR(DEFAULT_GIT_PORT); char *ep; struct hostent *he; struct sockaddr_in sa; char **ap; unsigned int nport; int cnt; get_host_and_port(&host, &port); if (flags & CONNECT_VE...
0
[]
git
a02ea577174ab8ed18f847cf1693f213e0b9c473
311,071,587,513,968,730,000,000,000,000,000,000,000
69
git_connect_git(): forbid newlines in host and path When we connect to a git:// server, we send an initial request that looks something like: 002dgit-upload-pack repo.git\0host=example.com If the repo path contains a newline, then it's included literally, and we get: 002egit-upload-pack repo .git\0host=exampl...
static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame) { FramePool *pool = avctx->internal->pool; int planes = pool->planes; int i; frame->linesize[0] = pool->linesize[0]; if (planes > AV_NUM_DATA_POINTERS) { frame->extended_data = av_mallocz(planes * sizeof(*frame->extended_da...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
53,155,680,456,265,950,000,000,000,000,000,000,000
44
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
xmlHaltParser(xmlParserCtxtPtr ctxt) { if (ctxt == NULL) return; ctxt->instate = XML_PARSER_EOF; ctxt->disableSAX = 1; while (ctxt->inputNr > 1) xmlFreeInputStream(inputPop(ctxt)); if (ctxt->input != NULL) { /* * in case there was a specific allocation deallocate before *...
0
[ "CWE-401" ]
libxml2
5a02583c7e683896d84878bd90641d8d9b0d0549
85,614,306,503,614,100,000,000,000,000,000,000,000
26
Fix memory leak in xmlParseBalancedChunkMemoryRecover When doc is NULL, namespace created in xmlTreeEnsureXMLDecl is bind to newDoc->oldNs, in this case, set newDoc->oldNs to NULL and free newDoc will cause a memory leak. Found with libFuzzer. Closes #82.
autoar_extractor_step_scan_toplevel (AutoarExtractor *self) { /* Step 0: Scan all file names in the archive * We have to check whether the archive contains a top-level directory * before performing the extraction. We emit the "scanned" signal when * the checking is completed. */ struct archive *a; struc...
0
[ "CWE-59" ]
gnome-autoar
8109c368c6cfdb593faaf698c2bf5da32bb1ace4
116,308,505,618,399,040,000,000,000,000,000,000,000
116
extractor: Do not allow symlink in parents Currently, it is still possible that some files are extracted outside of the destination dir in case of malicious archives. The checks from commit adb067e6 can be still bypassed in certain cases. See GNOME/file-roller#108 for more details. After some investigation, I am convi...
int kvm_arch_prepare_memory_region(struct kvm *kvm, struct kvm_memory_slot *memslot, const struct kvm_userspace_memory_region *mem, enum kvm_mr_change change) { return kvmppc_core_prepare_memory_region(kvm, memslot, mem); }
0
[ "CWE-476" ]
linux
ac64115a66c18c01745bbd3c47a36b124e5fd8c0
51,185,762,785,819,470,000,000,000,000,000,000,000
7
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...
fr_window_set_compression (FrWindow *window, FrCompression compression) { g_return_if_fail (window != NULL); window->priv->compression = compression; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
197,771,729,615,665,250,000,000,000,000,000,000,000
7
libarchive: sanitize filenames before extracting
static int mailimf_message_id_parse(const char * message, size_t length, size_t * indx, struct mailimf_message_id ** result) { char * value; size_t cur_token; struct mailimf_message_id * message_id; int r; int res; cur_token = * indx; r = mailimf_token_case_insensitive_parse(message, len...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
261,185,285,008,327,200,000,000,000,000,000,000,000
53
Fixed crash #274
static int download(struct SPDBDownloader *pd) { SPDBDownloaderOpt *opt = pd->opt; char *curl_cmd = NULL; char *extractor_cmd = NULL; char *abspath_to_archive = NULL; char *abspath_to_file = NULL; char *archive_name = NULL; size_t archive_name_len = 0; char *symbol_store_path = NULL; char *dbg_file = NULL; ch...
1
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
235,350,912,544,331,780,000,000,000,000,000,000,000
138
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...
static void ohci_set_hub_status(OHCIState *ohci, uint32_t val) { uint32_t old_state; old_state = ohci->rhstatus; /* write 1 to clear OCIC */ if (val & OHCI_RHS_OCIC) ohci->rhstatus &= ~OHCI_RHS_OCIC; if (val & OHCI_RHS_LPS) { int i; for (i = 0; i < ohci->num_ports; i++) ...
0
[ "CWE-835" ]
qemu
95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb
201,202,244,411,788,200,000,000,000,000,000,000,000
35
usb: ohci: limit the number of link eds The guest may builds an infinite loop with link eds. This patch limit the number of linked ed to avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
void rds_conn_shutdown(struct rds_connection *conn) { /* shut it down unless it's down already */ if (!rds_conn_transition(conn, RDS_CONN_DOWN, RDS_CONN_DOWN)) { /* * Quiesce the connection mgmt handlers before we start tearing * things down. We don't hold the mutex for the entire * duration of the shutdow...
0
[ "CWE-362" ]
linux
8c7188b23474cca017b3ef354c4a58456f68303a
293,574,526,330,100,300,000,000,000,000,000,000,000
59
RDS: fix race condition when sending a message on unbound socket Sasha's found a NULL pointer dereference in the RDS connection code when sending a message to an apparently unbound socket. The problem is caused by the code checking if the socket is bound in rds_sendmsg(), which checks the rs_bound_addr field without ...
static void intercept_id3(struct playlist *pls, uint8_t *buf, int buf_size, int *len) { /* intercept id3 tags, we do not want to pass them to the raw * demuxer on all segment switches */ int bytes; int id3_buf_pos = 0; int fill_buf = 0; struct segment *seg = current_seg...
0
[ "CWE-416" ]
FFmpeg
6959358683c7533f586c07a766acc5fe9544d8b2
193,447,188,470,146,130,000,000,000,000,000,000,000
99
avformat/hls: check segment duration value of EXTINF fix ticket: 8673 set the default EXTINF duration to 1ms if duration is smaller than 1ms Signed-off-by: Steven Liu <lq@chinaffmpeg.org> (cherry picked from commit 9dfb19baeb86a8bb02c53a441682c6e9a6e104cc)
static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ */ { /* parameters */ char *regex; /* Regular expression */ char *subject; /* String to match against */ int regex_len; int subject_len; pcre_cache_entry *pce; /* Compiled regular expression */ zval *subpats ...
0
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
167,946,846,925,062,630,000,000,000,000,000,000,000
25
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value, uint64 fixed_size) { if (!writer) return false; if (WriteID(writer, type)) return false; uint64 size = GetUIntSize(value); if (fixed_size > 0) { if (size > fixed_size) return false; size = fixed_si...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
216,449,235,722,627,870,000,000,000,000,000,000,000
22
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
e_ews_connection_remove_delegate_sync (EEwsConnection *cnc, gint pri, const gchar *mail_id, const GSList *delegate_ids, /* EwsUserId * */ GCancellable *cancellable,...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
315,053,618,183,429,080,000,000,000,000,000,000,000
28
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
Item *Item_func_lt::negated_item(THD *thd) /* a < b -> a >= b */ { return new (thd->mem_root) Item_func_ge(thd, args[0], args[1]); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
125,385,309,089,723,530,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
inline bool InitTensorDataForReduce(const int* dims, const int num_dims, const T init_value, T* data) { size_t num_elements = 1; for (int idx = 0; idx < num_dims; ++idx) { size_t current = static_cast<size_t>(dims[idx]); // Overflow prevention. if (num_elements > std:...
0
[ "CWE-119", "CWE-787" ]
tensorflow
2d88f470dea2671b430884260f3626b1fe99830a
261,069,003,650,933,500,000,000,000,000,000,000,000
16
[tflite] Ensure `ResolveAxis` properly handles negative inputs. In Python, a list `l` of length `n` allows indexing with negative indices, `l[i]`. The only constraint is that `n + i` becomes positive. Code in `ResolveAxis` assumes the constraints and only checks it using a `DCHECK`. But the macro is a no-op in non-deb...
static int jas_iccputxyz(jas_stream_t *out, jas_iccxyz_t *xyz) { jas_iccputuint32(out, xyz->x); jas_iccputuint32(out, xyz->y); jas_iccputuint32(out, xyz->z); return 0; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
130,253,500,748,917,800,000,000,000,000,000,000,000
7
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static uint32_t virtio_net_bad_features(VirtIODevice *vdev) { uint32_t features = 0; /* Linux kernel 2.6.25. It understood MAC (as everyone must), * but also these: */ features |= (1 << VIRTIO_NET_F_MAC); features |= (1 << VIRTIO_NET_F_CSUM); features |= (1 << VIRTIO_NET_F_HOST_TSO4); fea...
0
[ "CWE-119" ]
qemu
98f93ddd84800f207889491e0b5d851386b459cf
91,758,472,850,535,780,000,000,000,000,000,000,000
14
virtio-net: out-of-bounds buffer write on load CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in virtio_net_load()@hw/net/virtio-net.c > } else if (n->mac_table.in_use) { > uint8_t *buf = g_malloc0(n->mac_table.in_use); We are allocating buffer of size n->mac_table.in_use > qemu...
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-693" ]
suricata
e1ef57c848bbe4e567d5d4b66d346a742e3f77a1
221,842,676,306,645,400,000,000,000,000,000,000,000
70
stream: still inspect packets dropped by stream The detect engine would bypass packets that are set as dropped. This seems sane, as these packets are going to be dropped anyway. However, it lead to the following corner case: stream events that triggered the drop could not be matched on the rules. The packet with the ...
parse_socks(const char *data, size_t datalen, socks_request_t *req, int log_sockstype, int safe_socks, ssize_t *drain_out, size_t *want_length_out) { unsigned int len; char tmpbuf[TOR_ADDR_BUF_LEN+1]; tor_addr_t destaddr; uint32_t destip; uint8_t socksver; char *next, *startaddr; u...
0
[]
tor
19df037e53331ae528b876f225be08f198e0f8b6
139,218,985,467,463,460,000,000,000,000,000,000,000
390
Log malformed hostnames in socks5 request respecting SafeLogging
skipsubscript (string, start, flags) const char *string; int start, flags; { return (skip_matched_pair (string, start, '[', ']', flags)); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
229,611,314,070,838,240,000,000,000,000,000,000,000
6
bash-4.4-rc2 release
static void __init of_unittest_overlay_0(void) { /* device should enable */ if (of_unittest_apply_overlay_check(0, 0, 0, 1, PDEV_OVERLAY)) return; unittest(1, "overlay test %d passed\n", 0); }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
107,880,887,853,235,430,000,000,000,000,000,000,000
8
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
CImg<Tfloat> get_haar(const bool invert=false, const unsigned int nb_scales=1) const { CImg<Tfloat> res; if (nb_scales==1) { // Single scale transform if (_width>1) get_haar('x',invert,1).move_to(res); if (_height>1) { if (res) res.haar('y',invert,1); else get_haar('y',invert,1).move_to(...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
101,987,620,550,904,200,000,000,000,000,000,000,000
92
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static oe_fd_t* _hostsock_accept( oe_fd_t* sock_, struct oe_sockaddr* addr, oe_socklen_t* addrlen) { oe_fd_t* ret = NULL; sock_t* sock = _cast_sock(sock_); sockaddr_t buf; oe_socklen_t addrlen_in = 0; sock_t* new_sock = NULL; oe_errno = 0; if (!sock || (addr && !addrlen) || (ad...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
25,752,847,736,068,560,000,000,000,000,000,000,000
73
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static void php_free_ps_font(zend_rsrc_list_entry *rsrc TSRMLS_DC) { int *font = (int *) rsrc->ptr; T1_DeleteFont(*font); efree(font); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
77,607,731,647,073,265,000,000,000,000,000,000,000
7
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
GF_Err trgr_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TrackGroupBox *ptr = (GF_TrackGroupBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; return gf_isom_box_array_write(s, ptr->groups, bs);
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
288,425,226,019,508,600,000,000,000,000,000,000,000
9
prevent dref memleak on invalid input (#1183)
phar_entry_info *phar_get_entry_info(phar_archive_data *phar, char *path, int path_len, char **error, int security) /* {{{ */ { return phar_get_entry_info_dir(phar, path, path_len, 0, error, security); }
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
253,187,472,198,062,900,000,000,000,000,000,000,000
4
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
GF_Err pcmC_box_size(GF_Box *s) { s->size += 2; return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
313,228,579,209,877,020,000,000,000,000,000,000,000
5
fixed #2255
archive_read_format_rar_read_data(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { struct rar *rar = (struct rar *)(a->format->data); int ret; if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) { rar->has_encrypted_entries =...
1
[ "CWE-416" ]
libarchive
b8592ecba2f9e451e1f5cb7ab6dcee8b8e7b3f60
8,420,388,572,949,196,000,000,000,000,000,000,000
49
RAR reader: fix use after free If read_data_compressed() returns ARCHIVE_FAILED, the caller is allowed to continue with next archive headers. We need to set rar->start_new_table after the ppmd7_context got freed, otherwise it won't be allocated again. Reported by: OSS-Fuzz issue 2582
static gboolean delayed_destroys_process_cb(gpointer user_data) { while (g_delayed_destroys != NULL) { PluginInstance *plugin = (PluginInstance *)g_delayed_destroys->data; g_delayed_destroys = g_list_delete_link(g_delayed_destroys, g_delayed_destroys); g_NPP_Destroy_Now(plugin, NULL); } if (g_delay...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
302,756,434,604,502,200,000,000,000,000,000,000,000
18
Support all the new variables added
static bool bfq_has_work(struct blk_mq_hw_ctx *hctx) { struct bfq_data *bfqd = hctx->queue->elevator->elevator_data; /* * Avoiding lock: a race on bfqd->busy_queues should cause at * most a call to dispatch for nothing */ return !list_empty_careful(&bfqd->dispatch) || bfq_tot_busy_queues(bfqd) > 0;
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
305,134,180,427,754,760,000,000,000,000,000,000,000
11
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
njs_vmcode_await(njs_vm_t *vm, njs_vmcode_await_t *await, njs_promise_capability_t *pcap, njs_async_ctx_t *ctx) { size_t size; njs_int_t ret; njs_frame_t *frame; njs_value_t ctor, val, on_fulfilled, on_rejected, *value; njs_promise_t *promise; njs...
0
[ "CWE-125" ]
njs
d09868bc71f9a990445959329ad8c1b10d3898f5
95,476,053,541,154,460,000,000,000,000,000,000,000
93
Fixed njs_vmcode_interpreter() when await fails. Previously, while interpreting a user function, njs_vmcode_interpreter() might return prematurely when an error happens in await instruction. This is not correct because the current frame has to be unwound (or exception caught) first. The fix is to exit through only 5 ...
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const TensorShape& input_shape = input.shape(); const int32 input_dims = input_shape.dims(); const Tensor& segment_id = context->input(1); const TensorShape& segment_id_shape = segment_id.shape(); const...
0
[ "CWE-617", "CWE-703" ]
tensorflow
704866eabe03a9aeda044ec91a8d0c83fc1ebdbe
114,378,964,860,874,980,000,000,000,000,000,000,000
66
Fix overflow CHECK issue with `tf.raw_ops.UnsortedSegmentJoin`. PiperOrigin-RevId: 370766155 Change-Id: I33e7c6626224e1060a8a4ab51ad5d861c6d4c63e
virtual bool post_fix_fields_part_expr_processor(void *arg) { return 0; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
284,386,362,417,780,650,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....
compare_str (gconstpointer a, gconstpointer b) { return strcmp (*(const char **)a, *(const char **)b); }
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
21,623,918,707,331,924,000,000,000,000,000,000,000
5
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...
editing_arg_idx(win_T *win) { return !(win->w_arg_idx >= WARGCOUNT(win) || (win->w_buffer->b_fnum != WARGLIST(win)[win->w_arg_idx].ae_fnum && (win->w_buffer->b_ffname == NULL || !(fullpathcmp( alist_name(&WARGLIST(win)[win->w_arg_idx]), win->w_buffer->b_ffname, TRUE, TRUE) & FPC_SAME...
0
[ "CWE-416", "CWE-125" ]
vim
6f98371532fcff911b462d51bc64f2ce8a6ae682
273,682,229,521,934,120,000,000,000,000,000,000,000
10
patch 8.2.3884: crash when clearing the argument list while using it Problem: Crash when clearing the argument list while using it. Solution: Lock the argument list for ":all".
lyd_list_has_keys(struct lyd_node *list) { struct lyd_node *iter; struct lys_node_list *slist; int i; assert(list->schema->nodetype == LYS_LIST); /* even though hash is 0, it may be a valid hash, that is what we are going to check */ slist = (struct lys_node_list *)list->schema; if (!slis...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
154,373,321,320,638,660,000,000,000,000,000,000,000
35
schema tree BUGFIX do not check features while still resolving schema Fixes #723
static sig_handler signal_handler(int sig) { fprintf(stderr, "mysqltest got " SIGNAL_FMT "\n", sig); dump_backtrace(); fprintf(stderr, "Writing a core file...\n"); fflush(stderr); my_write_core(sig); #ifndef __WIN__ exit(1); // Shouldn't get here but just in case #endif }
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
30,463,058,555,935,460,000,000,000,000,000,000,000
12
WL#9072: Backport WL#8785 to 5.5
static noinline int tree_mod_log_insert_root(struct extent_buffer *old_root, struct extent_buffer *new_root, int log_removal) { struct btrfs_fs_info *fs_info = old_root->fs_info; struct tree_mod_elem *tm = NULL; struct tree_mod_elem **tm_list = NULL; int nritems = 0; int ret = 0; int i; if (!tree_mod_need_l...
0
[ "CWE-362" ]
linux
dbcc7d57bffc0c8cac9dac11bec548597d59a6a5
8,984,572,178,346,677,000,000,000,000,000,000,000
68
btrfs: fix race when cloning extent buffer during rewind of an old root While resolving backreferences, as part of a logical ino ioctl call or fiemap, we can end up hitting a BUG_ON() when replaying tree mod log operations of a root, triggering a stack trace like the following: ------------[ cut here ]------------ ...
repl_cmdline( exarg_T *eap, char_u *src, int srclen, char_u *repl, char_u **cmdlinep) { int len; int i; char_u *new_cmdline; /* * The new command line is build in new_cmdline[]. * First allocate it. * Careful: a "+cmd" argument may have been NUL terminated. */...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
338,857,683,169,198,900,000,000,000,000,000,000,000
52
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
Cached_item_field(Item_field *item) { field= item->field; buff= (uchar*) sql_calloc(length=field->pack_length()); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
293,647,059,931,950,200,000,000,000,000,000,000,000
5
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
SproutNotePlaintext SproutNotePlaintext::decrypt(const ZCNoteDecryption& decryptor, const ZCNoteDecryption::Ciphertext& ciphertext, const uint256& ephemeralKey, const uint256& h_sig, ...
0
[ "CWE-755", "CWE-787" ]
zcash
c1fbf8ab5d73cff5e1f45236995857c75ba4128d
83,450,968,409,513,660,000,000,000,000,000,000,000
19
Ignore exceptions when deserializing note plaintexts
void BN_zero_ex(BIGNUM *a) { a->top = 0; a->neg = 0; }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
337,520,505,781,731,900,000,000,000,000,000,000,000
5
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) { struct crypto_user_alg *p = nlmsg_data(in_nlh); struct crypto_alg *alg; struct sk_buff *skb; struct crypto_dump_info info; int err; if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name)) r...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
215,469,128,821,434,700,000,000,000,000,000,000,000
34
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 int kvm_s390_vm_has_attr(struct kvm *kvm, struct kvm_device_attr *attr) { int ret; switch (attr->group) { case KVM_S390_VM_MEM_CTRL: switch (attr->attr) { case KVM_S390_VM_MEM_ENABLE_CMMA: case KVM_S390_VM_MEM_CLR_CMMA: ret = sclp.has_cmma ? 0 : -ENXIO; break; case KVM_S390_VM_MEM_LIMIT_SIZE: ...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
135,943,800,332,090,770,000,000,000,000,000,000,000
72
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...