func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void ssl_cert_free(CERT *c) { int i; if (c == NULL) return; CRYPTO_DOWN_REF(&c->references, &i, c->lock); REF_PRINT_COUNT("CERT", c); if (i > 0) return; REF_ASSERT_ISNT(i < 0); EVP_PKEY_free(c->dh_tmp); ssl_cert_clear_certs(c); OPENSSL_free(c->conf_sigalgs); OP...
0
[ "CWE-835" ]
openssl
758754966791c537ea95241438454aa86f91f256
317,303,518,967,550,800,000,000,000,000,000,000,000
27
Fix invalid handling of verify errors in libssl In the event that X509_verify() returned an internal error result then libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY. That return code is supposed to only ever be returned i...
xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){ xmlNodePtr cur = NULL; long val; xmlChar str[30]; xmlDocPtr doc; if (nargs == 0) { cur = ctxt->context->node; } else if (nargs == 1) { xmlXPathObjectPtr obj; xmlNodeSetPtr nodelist; int i, ret; if ((ctxt->value == NULL) || ...
0
[ "CWE-200" ]
libxslt
ecb6bcb8d1b7e44842edde3929f412d46b40c89f
46,825,734,619,003,980,000,000,000,000,000,000,000
63
Fix generate-id() to not expose object addresses As pointed out by Chris Evans <scarybeasts@gmail.com> it's better security wise to not expose object addresses directly, use a diff w.r.t. the document root own address to avoid this * libxslt/functions.c: fix IDs generation code
kex_input_kexinit(int type, u_int32_t seq, void *ctxt) { struct ssh *ssh = ctxt; struct kex *kex = ssh->kex; const u_char *ptr; u_int i; size_t dlen; int r; debug("SSH2_MSG_KEXINIT received"); if (kex == NULL) return SSH_ERR_INVALID_ARGUMENT; ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL); ptr = sshpkt_ptr...
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
334,909,269,205,396,570,000,000,000,000,000,000,000
51
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
int caf_info(caf_reader_t *reader, int64_t chunk_size) { char *buf, *key, *val, *end; size_t len; if (chunk_size < 4 || (buf = malloc(chunk_size)) == 0) return -1; pcm_read(&reader->io, buf, chunk_size); key = buf + 4; end = buf + chunk_size; do { if ((val = key + strlen(key...
0
[ "CWE-703" ]
fdkaac
4ec1422bd951a137225ffa4052da120e2ab0a0f4
263,575,325,397,160,230,000,000,000,000,000,000,000
24
wav/caf parser: ensure fmt/desc chunk fixes https://github.com/nu774/fdkaac/issues/52
int ha_myisam::repair(THD *thd, MI_CHECK &param, bool do_optimize) { int error=0; uint local_testflag=param.testflag; bool optimize_done= !do_optimize, statistics_done=0; const char *old_proc_info=thd->proc_info; char fixed_name[FN_REFLEN]; MYISAM_SHARE* share = file->s; ha_rows rows= file->state->records...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
183,320,601,350,456,100,000,000,000,000,000,000,000
170
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
render_child_if_filter_primitive (RsvgNode *node, gpointer data) { RsvgFilterContext *filter_ctx = data; if (node_is_filter_primitive (node)) { RsvgFilterPrimitive *primitive; primitive = rsvg_rust_cnode_get_impl (node); rsvg_filter_primitive_render (node, primitive, filter_ctx); }...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
61,900,527,028,643,270,000,000,000,000,000,000,000
13
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static int ctnetlink_dump_zone_id(struct sk_buff *skb, int attrtype, const struct nf_conntrack_zone *zone, int dir) { if (zone->id == NF_CT_DEFAULT_ZONE_ID || zone->dir != dir) return 0; if (nla_put_be16(skb, attrtype, htons(zone->id))) goto nla_put_failure; return 0; nla_put_failure: return -1; }
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
47,315,560,437,790,970,000,000,000,000,000,000,000
12
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
static void write_bin_response(conn *c, void *d, int hlen, int keylen, int dlen) { if (!c->noreply || c->cmd == PROTOCOL_BINARY_CMD_GET || c->cmd == PROTOCOL_BINARY_CMD_GETK) { add_bin_header(c, 0, hlen, keylen, dlen); if(dlen > 0) { add_iov(c, d, dlen); } conn_se...
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
265,692,443,610,344,800,000,000,000,000,000,000,000
13
Fix segfault on specially crafted packet.
date_s_parse(int argc, VALUE *argv, VALUE klass) { VALUE str, comp, sg, opt; rb_scan_args(argc, argv, "03:", &str, &comp, &sg, &opt); if (!NIL_P(opt)) argc--; switch (argc) { case 0: str = rb_str_new2("-4712-01-01"); case 1: comp = Qtrue; case 2: sg = INT2FIX(DEFAULT_SG); } ...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
263,538,251,421,641,330,000,000,000,000,000,000,000
26
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
write_out_new_ascii_header (const char *magic_string, struct cpio_file_stat *file_hdr, int out_des) { char ascii_header[110]; char *p; p = stpcpy (ascii_header, magic_string); to_ascii_or_warn (p, file_hdr->c_ino, 8, LG_16, file_hdr->c_name, _("inode number")); p += 8; to_ascii_or_warn (p, fil...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
301,781,803,381,465,850,000,000,000,000,000,000,000
58
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
do_compose_alphaless_group16(pdf14_buf *tos, pdf14_buf *nos, int x0, int x1, int y0, int y1, gs_memory_t *memory, gx_device *dev) { pdf14_device *pdev = (pdf14_device *)dev; bool overprint = pdev->overprint; bool additive = pdev->ctx->additive; g...
0
[ "CWE-476" ]
ghostpdl
7870f4951bcc6a153f317e3439e14d0e929fd231
82,329,949,182,797,690,000,000,000,000,000,000,000
130
Bug 701795: Segv due to image mask issue
static int entersafe_preinstall_rsa_2048(sc_card_t *card,u8 key_id) { u8 sbuf[SC_MAX_APDU_BUFFER_SIZE]; sc_apdu_t apdu; int ret=0; static u8 const rsa_key_e[] = { 'E', 0x04, 0x01, 0x00, 0x01, 0x00 }; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); /* create rsa item in IKF */ sbuf[0] = 0x04; /* key len e...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
21,403,988,847,323,194,000,000,000,000,000,000,000
62
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start) { struct super_block *sb = inode->i_sb; int depth = ext_depth(inode); struct ext4_ext_path *path; handle_t *handle; int i, err; ext_debug("truncate since %u\n", start); /* probably first extent we're gonna free will be last in block */ h...
0
[ "CWE-703" ]
linux
667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3
283,701,279,321,868,940,000,000,000,000,000,000,000
134
ext4: reimplement convert and split_unwritten Reimplement ext4_ext_convert_to_initialized() and ext4_split_unwritten_extents() using ext4_split_extent() Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Tested-by: Allison Henderson <achender@linux.vnet.ibm.com>
static int cma_use_port(enum rdma_ucm_port_space ps, struct rdma_id_private *id_priv) { struct rdma_bind_list *bind_list; unsigned short snum; int ret; lockdep_assert_held(&lock); snum = ntohs(cma_port(cma_src_addr(id_priv))); if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) return -EACCES; bind_l...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
214,984,193,065,112,280,000,000,000,000,000,000,000
23
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
void CLASS adobe_coeff (const char *t_make, const char *t_model) { static const struct { const char *prefix; short t_black, t_maximum, trans[12]; } table[] = { { "AGFAPHOTO DC-833m", 0, 0, /* DJC */ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, { "Apple QuickTake", 0, 0, /* DJC */ { 21...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
32,608,099,047,317,645,000,000,000,000,000,000,000
827
cumulated data checks patch
void sock_unregister(int family) { BUG_ON(family < 0 || family >= NPROTO); spin_lock(&net_family_lock); rcu_assign_pointer(net_families[family], NULL); spin_unlock(&net_family_lock); synchronize_rcu(); printk(KERN_INFO "NET: Unregistered protocol family %d\n", family); }
0
[ "CWE-476" ]
linux
bc909d9ddbf7778371e36a651d6e4194b1cc7d4c
335,582,816,729,440,370,000,000,000,000,000,000,000
12
sendmmsg/sendmsg: fix unsafe user pointer access Dereferencing a user pointer directly from kernel-space without going through the copy_from_user family of functions is a bad idea. Two of such usages can be found in the sendmsg code path called from sendmmsg, added by commit c71d8ebe7a4496fb7231151cb70a6baa0cb56f9a u...
CopyLedNamesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info) { keymap->num_leds = info->num_led_names; for (xkb_led_index_t idx = 0; idx < info->num_led_names; idx++) { LedNameInfo *ledi = &info->led_names[idx]; if (ledi->name == XKB_ATOM_NONE) continue; keymap->leds...
0
[ "CWE-476" ]
libxkbcommon
badb428e63387140720f22486b3acbd3d738859f
233,238,911,147,403,440,000,000,000,000,000,000,000
14
keycodes: don't try to copy zero key aliases Move the aliases copy to within the (num_key_aliases > 0) block. Passing info->aliases into this fuction with invalid aliases will cause log messages but num_key_aliases stays on 0. The key_aliases array is never allocated and remains NULL. We then loop through the aliases...
decnet_print(netdissect_options *ndo, register const u_char *ap, register u_int length, register u_int caplen) { register const union routehdr *rhp; register int mflags; int dst, src, hops; u_int nsplen, pktlen; const u_char *nspp; if (length < sizeof(struct shorthdr)) { ND_PRINT((ndo...
0
[ "CWE-125" ]
tcpdump
c6e0531b5def26ecf912e8de6ade86cbdaed3751
56,337,747,666,406,360,000,000,000,000,000,000,000
111
CVE-2017-12899/DECnet: Fix bounds checking. If we're skipping over padding before the *real* flags, check whether the real flags are in the captured data before fetching it. This fixes a buffer over-read discovered by Kamil Frankowicz. Note one place where we don't need to do bounds checking as it's already been don...
static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags) { VM_BUG_ON(!is_vm_hugetlb_page(vma)); VM_BUG_ON(vma->vm_flags & VM_MAYSHARE); set_vma_private_data(vma, get_vma_private_data(vma) | flags); }
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
288,648,647,241,747,000,000,000,000,000,000,000,000
7
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static void cp2112_gpio_poll_callback(struct work_struct *work) { struct cp2112_device *dev = container_of(work, struct cp2112_device, gpio_poll_worker.work); struct irq_data *d; u8 gpio_mask; u8 virqs = (u8)dev->irq_mask; u32 irq_type; int irq, virq, ret; ret = cp2112_gpio_get_all(&dev->gc); if (ret ==...
0
[ "CWE-388" ]
linux
8e9faa15469ed7c7467423db4c62aeed3ff4cae3
284,524,833,008,984,200,000,000,000,000,000,000,000
60
HID: cp2112: fix gpio-callback error handling In case of a zero-length report, the gpio direction_input callback would currently return success instead of an errno. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@k...
static int v9fs_drop_inode(struct inode *inode) { struct v9fs_session_info *v9ses; v9ses = v9fs_inode2v9ses(inode); if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) return generic_drop_inode(inode); /* * in case of non cached mode always drop the * the inode because we want the inode attribut...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
28,635,082,600,672,550,000,000,000,000,000,000,000
13
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
static struct ip_tunnel * ipgre_tunnel_lookup(struct net_device *dev, __be32 remote, __be32 local, __be32 key, __be16 gre_proto) { struct net *net = dev_net(dev); int link = dev->ifindex; unsigned h0 = HASH(remote); unsigned h1 = HASH(key); struct ip_tunnel *t, *cand = NULL; struct ipgre_net...
0
[]
linux-2.6
c2892f02712e9516d72841d5c019ed6916329794
96,765,576,453,686,090,000,000,000,000,000,000,000
121
gre: fix netns vs proto registration ordering GRE protocol receive hook can be called right after protocol addition is done. If netns stuff is not yet initialized, we're going to oops in net_generic(). This is remotely oopsable if ip_gre is compiled as module and packet comes at unfortunate moment of module loading. ...
ofputil_make_flow_mod_table_id(bool flow_mod_table_id) { struct nx_flow_mod_table_id *nfmti; struct ofpbuf *msg; msg = ofpraw_alloc(OFPRAW_NXT_FLOW_MOD_TABLE_ID, OFP10_VERSION, 0); nfmti = ofpbuf_put_zeros(msg, sizeof *nfmti); nfmti->set = flow_mod_table_id; return msg; }
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
3,800,448,980,989,794,400,000,000,000,000,000,000
10
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int __init ext4_init_fs(void) { int i, err; ratelimit_state_init(&ext4_mount_msg_ratelimit, 30 * HZ, 64); ext4_li_info = NULL; mutex_init(&ext4_li_mtx); /* Build-time check for flags consistency */ ext4_check_flag_values(); for (i = 0; i < EXT4_WQ_HASH_SZ; i++) init_waitqueue_head(&ext4__ioend_wq[i])...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
90,375,024,955,757,010,000,000,000,000,000,000,000
72
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
bool qemu_chr_fe_init(CharBackend *b, CharDriverState *s, Error **errp) { int tag = 0; if (s->is_mux) { tag = mux_chr_new_handler_tag(s, errp); if (tag < 0) { return false; } } b->tag = tag; b->chr = s; return true; }
1
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
293,002,100,146,561,600,000,000,000,000,000,000,000
16
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static void csi_M(struct vc_data *vc, unsigned int nr) { if (nr > vc->vc_rows - vc->state.y) nr = vc->vc_rows - vc->state.y; else if (!nr) nr=1; con_scroll(vc, vc->state.y, vc->vc_bottom, SM_UP, nr); vc->vc_need_wrap = 0; }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
100,128,004,708,744,090,000,000,000,000,000,000,000
9
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color) { if (!im->trueColor) { if((color < -1) || (color >= gdMaxColors)) { return; } if (im->transparent != -1) { im->alpha[im->transparent] = gdAlphaOpaque; } if (color != -1) { im->alpha[color] = gdAlphaTransparent; } } im->transpa...
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
135,494,720,753,498,320,000,000,000,000,000,000,000
15
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
void PreScanOutputDev::drawMaskedImage(GfxState *state, Object * /*ref*/, Stream * /*str*/, int /*width*/, int /*height*/, GfxImageColorMap *colorMap, GBool /*interpolate*/, Stream * /*maskStr*/, int /*maskWidth*/, int /*maskHeight*/, GBool /*...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
102,133,830,890,936,930,000,000,000,000,000,000,000
24
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static u32 av1_uvlc(GF_BitStream *bs, const char *fname) { u32 res; u8 leadingZeros = 0; while (1) { Bool done = gf_bs_read_int(bs, 1); if (done) break; leadingZeros++; } if (leadingZeros >= 32) { return 0xFFFFFFFF; } res = gf_bs_read_int(bs, leadingZeros) + (1 << leadingZeros) - 1; gf_bs_log(bs, 2*l...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
238,012,794,111,992,600,000,000,000,000,000,000,000
17
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
ProcessHelpString ( IN CHAR16 *StringPtr, OUT CHAR16 **FormattedString, OUT UINT16 *EachLineWidth, IN UINTN RowCount ) { UINTN Index; CHAR16 *OutputString; UINTN TotalRowNum; UINTN CheckedNum; UINT16 GlyphWidth; UINT16 LineWidth; UINT16 MaxStringLen; UINT16 Stri...
0
[]
edk2
f1d78c489a39971b5aac5d2fc8a39bfa925c3c5d
90,254,069,411,280,650,000,000,000,000,000,000,000
57
MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1611 Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.do...
bool rtas_indicator_present(int token, int *maxindex) { int proplen, count, i; const struct indicator_elem { __be32 token; __be32 maxindex; } *indicators; indicators = of_get_property(rtas.dev, "rtas-indicators", &proplen); if (!indicators) return false; count = proplen / sizeof(struct indicator_elem); ...
0
[ "CWE-862" ]
linux
bd59380c5ba4147dcbaad3e582b55ccfd120b764
103,048,809,077,471,780,000,000,000,000,000,000,000
24
powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which al...
CImg<typename cimg::superset<t,long>::type> get_distance_dijkstra(const T& value, const CImg<t>& metric, const bool is_high_connectivity, CImg<to>& return_path) const { if (is_empty()) return return_path.assign(); if (!is_sameXYZ(metric)) throw CImgArgumentException...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
186,840,178,813,455,840,000,000,000,000,000,000,000
161
.
static void gtextfield_redraw(GGadget *g) { GTextField *gt = (GTextField *) g; if ( gt->vsb!=NULL ) _ggadget_redraw((GGadget *) (gt->vsb)); if ( gt->hsb!=NULL ) _ggadget_redraw((GGadget *) (gt->hsb)); _ggadget_redraw(g); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
59,597,851,954,861,470,000,000,000,000,000,000,000
8
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
int X509_supported_extension(X509_EXTENSION *ex) { /* This table is a list of the NIDs of supported extensions: * that is those which are used by the verify process. If * an extension is critical and doesn't appear in this list * then the verify process will normally reject the certificate. * The list must be...
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
251,067,130,567,577,440,000,000,000,000,000,000,000
38
Backport OCSP fixes.
R_API int r_core_cmd_task_sync(RCore *core, const char *cmd, bool log) { RCoreTask *task = core->main_task; char *s = strdup (cmd); if (!s) { return 0; } task->cmd = s; task->cmd_log = log; task->state = R_CORE_TASK_STATE_BEFORE_START; int res = r_core_task_run_sync (core, task); free (s); return res; }
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
252,135,177,068,742,360,000,000,000,000,000,000,000
13
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
virtual void updateFillOpacity(GfxState *state) { }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
3,080,459,073,569,035,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_governance_rule_order) { { // Governance rule for topic *HelloWorldTopic* with enable_read/write_access_contrl set to false // Governance rule for topic * with enable_read/write_access_contrl set to true // Permission denied for ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
24,066,298,074,040,490,000,000,000,000,000,000,000
144
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
iasecc_compute_signature_at(struct sc_card *card, const unsigned char *in, size_t in_len, unsigned char *out, size_t out_len) { struct sc_context *ctx = card->ctx; struct iasecc_private_data *prv = (struct iasecc_private_data *) card->drv_data; struct sc_security_env *env = &prv->security_env; struct sc_apdu apdu...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
325,527,015,466,827,400,000,000,000,000,000,000,000
53
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static BROTLI_INLINE BROTLI_BOOL SafeReadDistance( BrotliDecoderState* s, BrotliBitReader* br) { return ReadDistanceInternal(1, s, br); }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
28,452,378,560,953,410,000,000,000,000,000,000,000
4
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
int CodedSizeLength(uint64 Length, unsigned int SizeLength, bool bSizeFinite) { unsigned int CodedSize; if (bSizeFinite) { // prepare the head of the size (000...01xxxxxx) // optimal size if (Length < 127) // 2^7 - 1 CodedSize = 1; else if (Length < 16383) // 2^14 - 1 CodedSize = 2; ...
0
[ "CWE-200" ]
libebml
24e5cd7c666b1ddd85619d60486db0a5481c1b90
46,500,238,380,944,890,000,000,000,000,000,000,000
34
EbmlElement: don't read beyond end of buffer when reading variable length integers
inline void Add(int left_shift, const uint8* input1_data, const Dims<4>& input1_dims, int32 input1_offset, int32 input1_multiplier, int input1_shift, const uint8* input2_data, const Dims<4>& input2_dims, int32 input2_offset, int32 input2_multiplier, int in...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
244,711,139,435,997,200,000,000,000,000,000,000,000
37
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
selaComputeCompositeParameters(const char *fileout) { char *str, *nameh1, *nameh2, *namev1, *namev2; char buf[L_BUFSIZE]; l_int32 size, size1, size2, len; SARRAY *sa; SELA *selabasic, *selacomb; selabasic = selaAddBasic(NULL); selacomb = selaAddDwaCombs(NULL); sa = sarrayCreate(64); for (s...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
275,966,667,114,091,050,000,000,000,000,000,000,000
40
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
**/ CImg<Tdouble> get_stats(const unsigned int variance_method=1) const { if (is_empty()) return CImg<doubleT>(); const ulongT siz = size(); const longT off_end = (longT)siz; double S = 0, S2 = 0, P = 1; longT offm = 0, offM = 0; T m = *_data, M = m; cimg_pragma_openmp...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
13,414,257,770,985,302,000,000,000,000,000,000,000
43
.
enhanced_recursion( const char *p, TBOOLEAN brace, char *fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint) { TBOOLEAN wasitalic, wasbold; /* Keep track of the style of the font passed in at this recursion level */ wasitalic = (strs...
0
[ "CWE-787" ]
gnuplot
963c7df3e0c5266efff260d0dff757dfe03d3632
149,342,336,659,596,960,000,000,000,000,000,000,000
391
Better error handling for faulty font syntax A missing close-quote in an enhanced text font specification could cause a segfault. Bug #2303
int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) { int ret = 0, size = 0; const char *name = NULL; char *value = NULL; struct iattr newattrs; umode_t new_mode = inode->i_mode, old_mode = inode->i_mode; switch (type) { case ACL_TYPE_ACCESS: name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) {...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
97,432,801,475,607,870,000,000,000,000,000,000,000
67
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
TEST_F(HeaderToMetadataTest, NoEmptyValues) { const std::string config = R"EOF( request_rules: - header: x-version on_header_present: metadata_namespace: envoy.lb key: version type: STRING )EOF"; initializeFilter(config); Http::TestRequestHeaderMapImpl headers{{"x-version", ""}}; EXPECT...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
234,943,624,880,987,300,000,000,000,000,000,000,000
16
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...
static int hid_match_usage(struct hid_device *hid, struct hid_usage *usage) { const struct hid_usage_id *id = hid->driver->usage_table; if (!id) /* NULL means all */ return 1; for (; id->usage_type != HID_ANY_ID - 1; id++) if ((id->usage_hid == HID_ANY_ID || id->usage_hid == usage->hid) && (id->usage_t...
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
334,276,246,731,833,670,000,000,000,000,000,000,000
17
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
int __init atmpvc_init(void) { return sock_register(&pvc_family_ops); }
0
[ "CWE-200" ]
linux
3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a
78,523,494,685,475,320,000,000,000,000,000,000,000
4
atm: fix info leak via getsockname() The ATM code fails to initialize the two padding bytes of struct sockaddr_atmpvc inserted for alignment. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@dave...
CImg<T>& RGBtoxyY(const bool use_D65=true) { return RGBtoXYZ(use_D65).XYZtoxyY(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
182,129,068,968,912,750,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int lua_ap_get_server_name_for_url(lua_State *L) { const char *servername; request_rec *r; luaL_checktype(L, 1, LUA_TUSERDATA); r = ap_lua_check_request_rec(L, 1); servername = ap_get_server_name_for_url(r); lua_pushstring(L, servername); return 1; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
106,116,461,179,900,360,000,000,000,000,000,000,000
10
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
static long mng_get_long(unsigned char *p) { return ((long) (((png_uint_32) p[0] << 24) | ((png_uint_32) p[1] << 16) | ((png_uint_32) p[2] << 8) | (png_uint_32) p[3])); }
0
[ "CWE-476" ]
ImageMagick
816ecab6c532ae086ff4186b3eaf4aa7092d536f
151,007,391,955,650,440,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/58
dns_resolve_impl(edge_connection_t *exitconn, int is_resolve, or_circuit_t *oncirc, char **hostname_out, int *made_connection_pending_out) { cached_resolve_t *resolve; cached_resolve_t search; pending_connection_t *pending_connection; const routerinfo_t *me; tor_addr_t addr; ...
0
[ "CWE-399" ]
tor
62637fa22405278758febb1743da9af562524d4c
257,509,316,056,027,100,000,000,000,000,000,000,000
143
Avoid hard (impossible?)-to-trigger double-free in dns_resolve() Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch.
static int hello_callback(sd_bus_message *reply, void *userdata, sd_bus_error *error) { const char *s; sd_bus *bus; int r; assert(reply); bus = reply->bus; assert(bus); assert(IN_SET(bus->state, BUS_HELLO, BUS_CLOSING)); r = sd_bus_message_get_errno(repl...
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
230,962,252,485,442,320,000,000,000,000,000,000,000
47
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
void shuffle(vector<DNSResourceRecord>& rrs) { vector<DNSResourceRecord>::iterator first, second; for(first=rrs.begin();first!=rrs.end();++first) if(first->d_place==DNSResourceRecord::ANSWER && first->qtype.getCode() != QType::CNAME) // CNAME must come first break; for(second=first;second!=rrs.end();++...
0
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
240,863,204,731,660,770,000,000,000,000,000,000,000
26
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels
static void deposit_prealloc_pte(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; pgtable_trans_huge_deposit(vma->vm_mm, vmf->pmd, vmf->prealloc_pte); /* * We are going to consume the prealloc table, * count that as nr_ptes. */ atomic_long_inc(&vma->vm_mm->nr_ptes); vmf->prealloc_pte = NULL; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
60,849,821,952,748,070,000,000,000,000,000,000,000
12
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int btrfs_uuid_scan_kthread(void *data) { struct btrfs_fs_info *fs_info = data; struct btrfs_root *root = fs_info->tree_root; struct btrfs_key key; struct btrfs_path *path = NULL; int ret = 0; struct extent_buffer *eb; int slot; struct btrfs_root_item root_item; u32 item_size; struct btrfs_trans_handle...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
194,886,287,330,838,400,000,000,000,000,000,000,000
128
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...
HttpHdrRange::HttpHdrRange() : clen(HttpHdrRangeSpec::UnknownPosition) {}
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
257,051,770,685,261,340,000,000,000,000,000,000,000
2
Handle more Range requests (#790) Also removed some effectively unused code.
static int gs_can_open(struct net_device *netdev) { struct gs_can *dev = netdev_priv(netdev); struct gs_usb *parent = dev->parent; int rc, i; struct gs_device_mode *dm; u32 ctrlmode; rc = open_candev(netdev); if (rc) return rc; if (atomic_add_return(1, &parent->active_channels) == 1) { for (i = 0; i < GS_...
1
[ "CWE-400", "CWE-401" ]
linux
fb5be6a7b4863ecc44963bb80ca614584b6c7817
43,681,195,204,274,230,000,000,000,000,000,000,000
117
can: gs_usb: gs_can_open(): prevent memory leak In gs_can_open() if usb_submit_urb() fails the allocated urb should be released. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off...
static int tipc_udp_rcast_disc(struct tipc_bearer *b, struct sk_buff *skb) { struct udp_media_addr src = {0}; struct udp_media_addr *dst; dst = (struct udp_media_addr *)&b->bcast_addr.value; if (tipc_udp_is_mcast_addr(dst)) return 0; src.port = udp_hdr(skb)->source; if (ip_hdr(skb)->version == 4) { struct ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
16,688,856,044,252,000,000,000,000,000,000,000,000
36
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
*/ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) { struct bfq_queue *bfqq; struct request *next_rq; enum bfqq_expiration reason = BFQQE_BUDGET_TIMEOUT; bfqq = bfqd->in_service_queue; if (!bfqq) goto new_queue; bfq_log_bfqq(bfqd, bfqq, "select_queue: already in-service queue"); /* * Do ...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
15,234,806,002,808,811,000,000,000,000,000,000,000
201
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...
PS_CREATE_SID_FUNC(files) { char *sid; int maxfail = 3; PS_FILES_DATA; do { sid = php_session_create_id((void **)&data, newlen TSRMLS_CC); /* Check collision */ if (ps_files_key_exists(data, sid TSRMLS_CC) == SUCCESS) { if (sid) { efree(sid); sid = NULL; } if (!(maxfail--)) { return NULL...
1
[ "CWE-264" ]
php-src
b80d73ce154e7f740f9ada446f45dbcdac38a64b
307,413,633,031,405,380,000,000,000,000,000,000,000
22
fix crash, enable session_id and fix test
static void claim_allocations(int cpu, struct sched_domain *sd) { struct sd_data *sdd = sd->private; WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd); *per_cpu_ptr(sdd->sd, cpu) = NULL; if (atomic_read(&(*per_cpu_ptr(sdd->sg, cpu))->ref)) *per_cpu_ptr(sdd->sg, cpu) = NULL; if (atomic_read(&(*per_cpu_ptr(sdd->sg...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
180,879,143,564,953,850,000,000,000,000,000,000,000
13
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static BOOL update_gdi_cache_bitmap_v2(rdpContext* context, CACHE_BITMAP_V2_ORDER* cacheBitmapV2) { rdpBitmap* bitmap; rdpBitmap* prevBitmap; rdpCache* cache = context->cache; rdpSettings* settings = context->settings; bitmap = Bitmap_Alloc(context); if (!bitmap) return FALSE; if (!cacheBitmapV2->bitmapBpp)...
0
[ "CWE-125" ]
FreeRDP
0b6b92a25a77d533b8a92d6acc840a81e103684e
116,439,686,628,885,120,000,000,000,000,000,000,000
41
Fixed CVE-2020-11525: Out of bounds read in bitmap_cache_new Thanks to Sunglin and HuanGMz from Knownsec 404
megasas_ld_list_query(struct megasas_instance *instance, u8 query_type) { int ret = 0, ld_index = 0, ids = 0; struct megasas_cmd *cmd; struct megasas_dcmd_frame *dcmd; struct MR_LD_TARGETID_LIST *ci; dma_addr_t ci_h = 0; u32 tgtid_count; ci = instance->ld_targetid_list_buf; ci_h = instance->ld_targetid_list_bu...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
90,038,863,050,908,100,000,000,000,000,000,000,000
98
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
ex_submagic(exarg_T *eap) { int magic_save = p_magic; p_magic = (eap->cmdidx == CMD_smagic); do_sub(eap); p_magic = magic_save; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
235,835,479,178,002,000,000,000,000,000,000,000,000
8
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
gst_asf_demux_push_obj (GstASFDemux * demux, guint32 obj_id) { const gchar *nick; nick = gst_asf_get_guid_nick (asf_object_guids, obj_id); if (g_str_has_prefix (nick, "ASF_OBJ_")) nick += strlen ("ASF_OBJ_"); if (demux->objpath == NULL) { demux->objpath = g_strdup (nick); } else { gchar *newpath...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
208,105,079,155,630,580,000,000,000,000,000,000,000
20
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
int XMLRPC_AddValueToVector(XMLRPC_VALUE target, XMLRPC_VALUE source) { if(target && source) { if(target->type == xmlrpc_vector && target->v && target->v->q && target->v->type != xmlrpc_vector_none) { /* guard against putting value of unknown type into vector */ switch(source->type...
1
[ "CWE-125" ]
php-src
780ff63c377dc79de2c04d6b341913ab0102135b
128,411,862,911,203,500,000,000,000,000,000,000,000
36
MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when given bad data).
int ssl23_get_client_hello(SSL *s) { char buf_space[11]; /* Request this many bytes in initial read. * We can detect SSL 3.0/TLS 1.0 Client Hellos * ('type == 3') correctly only when the following * is in a single record, which is not guaranteed by ...
1
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
193,385,684,388,095,100,000,000,000,000,000,000,000
374
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
SpoolssEnumForms_q(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep _U_) { dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data; guint32 level; proto_item *hidden_item; hidden_item = proto_tree_add_uint( tree, hf_form, tvb, offset, 0, 1); PROTO_ITEM_...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
138,469,736,460,520,560,000,000,000,000,000,000,000
35
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
static void __exit hid_exit(void) { usb_deregister(&hid_driver); usbhid_quirks_exit(); }
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
292,885,015,565,181,650,000,000,000,000,000,000,000
5
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
static void i40e_rm_default_mac_filter(struct i40e_vsi *vsi, u8 *macaddr) { struct i40e_aqc_remove_macvlan_element_data element; struct i40e_pf *pf = vsi->back; /* Only appropriate for the PF main VSI */ if (vsi->type != I40E_VSI_MAIN) return; memset(&element, 0, sizeof(element)); ether_addr_copy(element.mac_...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
18,047,913,932,267,548,000,000,000,000,000,000,000
24
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static struct digest_algo *digest_algo_get_by_algo(enum hash_algo algo) { struct digest_algo *d = NULL; struct digest_algo *tmp; int priority = -1; list_for_each_entry(tmp, &digests, list) { if (tmp->base.algo != algo) continue; if (tmp->base.priority <= priority) continue; d = tmp; priority = tmp-...
0
[ "CWE-200" ]
barebox
0a9f9a7410681e55362f8311537ebc7be9ad0fbe
241,368,281,796,834,250,000,000,000,000,000,000,000
19
crypto: digest: use crypto_memneq() When verifying a digest it is important not to leak timing information through memcmp(). Use crypto_memneq() instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
static uint64_t megasas_fw_time(void) { struct tm curtime; qemu_get_timedate(&curtime, 0); return ((uint64_t)curtime.tm_sec & 0xff) << 48 | ((uint64_t)curtime.tm_min & 0xff) << 40 | ((uint64_t)curtime.tm_hour & 0xff) << 32 | ((uint64_t)curtime.tm_mday & 0xff) << 24 | ((uint...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
189,268,249,428,173,000,000,000,000,000,000,000,000
12
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
fillPixels (Array2D<unsigned int> &pi, Array2D<half> &ph, Array2D<float> &pf, int width, int height) { for (int y = 0; y < height; ++y) for (int x = 0; x < width; ++x) { pi[y][x] = x % 100 + 100 * (y % 100); ph[y][x] = sin (doub...
0
[ "CWE-770" ]
openexr
d80f11f4f55100d007ae80a162bf257ec291612c
246,474,019,217,174,700,000,000,000,000,000,000,000
14
More efficient handling of filled channels reading tiles with scanline API (#830) * refactor channel filling in InputFile API with tiled source Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * handle edge-case of empty framebuffer Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
_outPath(StringInfo str, const Path *node) { WRITE_NODE_TYPE("PATH"); _outPathInfo(str, (const Path *) node); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
295,095,630,198,267,820,000,000,000,000,000,000,000
6
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) { int extra_size = get_extra_isize(inode); if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { if (ri->i_addr[extra_size]) inode->i_rdev = old_decode_dev( le32_to_cpu(ri->i_a...
0
[ "CWE-125" ]
linux
e34438c903b653daca2b2a7de95aed46226f8ed3
196,823,332,150,463,200,000,000,000,000,000,000,000
14
f2fs: fix to do sanity check with node footer and iblocks This patch adds to do sanity check with below fields of inode to avoid reported panic. - node footer - iblocks https://bugzilla.kernel.org/show_bug.cgi?id=200223 - Overview BUG() triggered in f2fs_truncate_inode_blocks() when un-mounting a mounted f2fs image ...
TEST_F(HttpConnectionManagerImplTest, FilterShouldUseSantizedPath) { setup(false, ""); // Enable path sanitizer normalize_path_ = true; const std::string original_path = "/x/%2E%2e/z"; const std::string normalized_path = "/z"; auto* filter = new MockStreamFilter(); EXPECT_CALL(filter_factory_, createFil...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
339,175,550,690,072,230,000,000,000,000,000,000,000
33
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
void manager_set_show_status(Manager *m, ShowStatus mode) { assert(m); assert(IN_SET(mode, SHOW_STATUS_AUTO, SHOW_STATUS_NO, SHOW_STATUS_YES, SHOW_STATUS_TEMPORARY)); if (!MANAGER_IS_SYSTEM(m)) return; if (m->show_status != mode) log_debug("%s showing of...
0
[ "CWE-20" ]
systemd
531ac2b2349da02acc9c382849758e07eb92b020
110,090,992,946,159,030,000,000,000,000,000,000,000
17
If the notification message length is 0, ignore the message (#4237) Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
verdict_instance_lookup(struct nfnl_queue_net *q, u16 queue_num, int nlportid) { struct nfqnl_instance *queue; queue = instance_lookup(q, queue_num); if (!queue) return ERR_PTR(-ENODEV); if (queue->peer_portid != nlportid) return ERR_PTR(-EPERM); return queue; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
197,787,156,933,130,100,000,000,000,000,000,000,000
13
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
bool Item_func::count_string_result_length(enum_field_types field_type_arg, Item **items, uint nitems) { if (agg_arg_charsets_for_string_result(collation, items, nitems, 1)) return true; if (is_temporal_type(field_type_arg)) count_datetime_length(field_type_arg, it...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
269,933,982,484,886,120,000,000,000,000,000,000,000
14
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
__acquires(&current->sighand->siglock) { if (arch_ptrace_stop_needed(exit_code, info)) { /* * The arch code has something special to do before a * ptrace stop. This is allowed to block, e.g. for faults * on user stack pages. We can't keep the siglock while * calling arch_ptrace_stop, so we must releas...
0
[]
linux-2.6
da48524eb20662618854bb3df2db01fc65f3070c
184,138,569,548,882,450,000,000,000,000,000,000,000
80
Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code Userland should be able to trust the pid and uid of the sender of a signal if the si_code is SI_TKILL. Unfortunately, the kernel has historically allowed sigqueueinfo() to send any si_code at all (as long as it was negative - to distinguish i...
mc_clear(mrb_state *mrb) { static const struct mrb_cache_entry ce_zero ={0}; for (int i=0; i<MRB_METHOD_CACHE_SIZE; i++) { mrb->cache[i] = ce_zero; } }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
255,973,476,115,016,170,000,000,000,000,000,000,000
8
class.c: clear method cache after `remove_method`.
static double shp_area (SHPObject *feat) { double area = 0.0; if (feat->nParts == 0) { area = area2d_polygon (feat->nVertices, feat->padfX, feat->padfY); } else { for (int part = 0; part < feat->nParts; part++) { int n; if (part < feat->nParts - 1) { n = feat->panPartStart[part+1] - feat->p...
0
[ "CWE-415" ]
shapelib
c75b9281a5b9452d92e1682bdfe6019a13ed819f
206,313,365,432,270,300,000,000,000,000,000,000,000
21
Remove double free() in contrib/shpsrt, issue #39 This fixes issue #39
parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset, guint32 str_tbl, guint8 *level, guint8 *codepage_stag, guint8 *codepage_attr, const wbxml_decoding *map) { guint32 tvb_len = tvb_reported_length (tvb); guint32 off = offset, last_off; guint32 len; guint str_len...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
wireshark
b8e0d416898bb975a02c1b55883342edc5b4c9c0
92,126,232,146,756,800,000,000,000,000,000,000,000
404
WBXML: add a basic sanity check for offset overflow This is a naive approach allowing to detact that something went wrong, without the need to replace all proto_tree_add_text() calls as what was done in master-2.0 branch. Bug: 12408 Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108 Reviewed-on: https://code.wiresh...
DECLAREContigPutFunc(putcontig8bitYCbCr21tile) { (void) y; fromskew = (fromskew / 2) * (2*1+2); do { x = w>>1; while(x>0) { int32 Cb = pp[2]; int32 Cr = pp[3]; YCbCrtoRGB(cp[0], pp[0]); YCbCrtoRGB(cp[1], pp[1]); cp += 2; pp += 4; x --; } if( (w&1) != 0 ) { int32 Cb = pp[2]; in...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
210,850,002,140,585,900,000,000,000,000,000,000,000
33
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
static int scrub_checksum(struct scrub_block *sblock) { u64 flags; int ret; /* * No need to initialize these stats currently, * because this function only use return value * instead of these stats value. * * Todo: * always use stats */ sblock->header_error = 0; sblock->generation_error = 0; sblock-...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
146,438,539,476,329,130,000,000,000,000,000,000,000
33
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...
static double filter_catmullrom(const double x) { if (x < -2.0) return(0.0f); if (x < -1.0) return(0.5f*(4.0f+x*(8.0f+x*(5.0f+x)))); if (x < 0.0) return(0.5f*(2.0f+x*x*(-5.0f-3.0f*x))); if (x < 1.0) return(0.5f*(2.0f+x*x*(-5.0f+3.0f*x))); if (x < 2.0) return(0.5f*(4.0f+x*(-8.0f+x*(5.0f-x)))); return(0.0...
0
[ "CWE-119" ]
php-src
4bb422343f29f06b7081323844d9b52e1a71e4a5
226,211,546,848,390,750,000,000,000,000,000,000,000
14
Fix bug #70976: fix boundary check on gdImageRotateInterpolated
create_seq_hashtable(void) { HASHCTL ctl; memset(&ctl, 0, sizeof(ctl)); ctl.keysize = sizeof(Oid); ctl.entrysize = sizeof(SeqTableData); seqhashtab = hash_create("Sequence values", 16, &ctl, HASH_ELEM | HASH_BLOBS); }
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
47,673,448,024,620,160,000,000,000,000,000,000,000
11
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static inline int security_file_mmap(struct file *file, unsigned long reqprot, unsigned long prot, unsigned long flags, unsigned long addr, unsigned long addr_only) { return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
145,659,151,376,439,400,000,000,000,000,000,000,000
8
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 __init void xen_hvm_guest_late_init(void) { #ifdef CONFIG_XEN_PVH /* Test for PVH domain (PVH boot path taken overrides ACPI flags). */ if (!xen_pvh && (x86_platform.legacy.rtc || !x86_platform.legacy.no_vga)) return; /* PVH detected. */ xen_pvh = true; if (nopv) panic("\"nopv\" and \"xen_nopv\" ...
0
[]
linux
fa1f57421e0b1c57843902c89728f823abc32f02
24,387,241,273,234,247,000,000,000,000,000,000,000
22
xen/virtio: Enable restricted memory access using Xen grant mappings In order to support virtio in Xen guests add a config option XEN_VIRTIO enabling the user to specify whether in all Xen guests virtio should be able to access memory via Xen grant mappings only on the host side. Also set PLATFORM_VIRTIO_RESTRICTED_M...
display_update_spot_equivalent_colors(gx_device * dev, const gs_gstate * pgs) { gx_device_display * ddev = (gx_device_display *)dev; if ((ddev->nFormat & DISPLAY_COLORS_MASK) == DISPLAY_COLORS_SEPARATION) update_spot_equivalent_cmyk_colors(dev, pgs, &ddev->devn_params, &ddev->equiv_...
0
[]
ghostpdl
1ef5f08f2c2e27efa978f0010669ff22355c385f
100,997,492,027,709,400,000,000,000,000,000,000,000
9
Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829 The ICC profile checking needs to be told that the device supports_devn, so add a spec_op proc to return true when in separation mode, and add a proc for fill_rectangle_hl_color so that fillpage will work in Separation mode. This was fixed...
BOOL x509_verify_certificate(CryptoCert cert, const char* certificate_store_path) { size_t i; const int purposes[3] = { X509_PURPOSE_SSL_SERVER, X509_PURPOSE_SSL_CLIENT, X509_PURPOSE_ANY }; X509_STORE_CTX* csc; BOOL status = FALSE; X509_STORE* cert_ctx = NULL; X509_LOOKUP* lookup = NULL; cert_ctx = X509_STORE_ne...
0
[ "CWE-787" ]
FreeRDP
8305349a943c68b1bc8c158f431dc607655aadea
104,530,064,600,450,010,000,000,000,000,000,000,000
68
Fixed GHSL-2020-102 heap overflow (cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
get_guard_confirmed_min_lifetime(void) { if (get_options()->GuardLifetime >= 86400) return get_options()->GuardLifetime; int32_t days; days = networkstatus_get_param(NULL, "guard-confirmed-min-lifetime-days", DFLT_GUARD_CONFIRMED_MIN_LIFETIME_DAYS, ...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
535,942,226,943,891,500,000,000,000,000,000,000
10
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int SetAKID(byte* output, word32 outSz, byte *input, word32 length, void* heap) { byte *enc_val; int ret, enc_valSz; const byte akid_oid[] = { 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04 }; const byte akid_cs[] = { 0x80 }; (void)heap; if (output ==...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
298,445,306,108,736,260,000,000,000,000,000,000,000
31
OCSP: improve handling of OCSP no check extension
OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap) { OJPEGState* sp=(OJPEGState*)tif->tif_data; switch(tag) { case TIFFTAG_JPEGIFOFFSET: *va_arg(ap,uint64*)=(uint64)sp->jpeg_interchange_format; break; case TIFFTAG_JPEGIFBYTECOUNT: *va_arg(ap,uint64*)=(uint64)sp->jpeg_interchange_format_length; break; ...
0
[ "CWE-369" ]
libtiff
43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec
109,392,648,164,109,400,000,000,000,000,000,000,000
40
* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611
get_guard_selection_by_name(const char *name, guard_selection_type_t type, int create_if_absent) { if (!guard_contexts) { guard_contexts = smartlist_new(); } SMARTLIST_FOREACH_BEGIN(guard_contexts, guard_selection_t *, gs) { if (!strcmp(gs->name, nam...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
271,331,521,621,810,650,000,000,000,000,000,000,000
21
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
setup_comb_exp_check(Node* node, int state, ScanEnv* env) { int type; int r = state; type = NTYPE(node); switch (type) { case NT_LIST: { Node* prev = NULL_NODE; do { r = setup_comb_exp_check(NCAR(node), r, env); prev = NCAR(node); } while (r >= 0 && IS_NOT_NULL(node = NCDR(node))); ...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
281,693,797,600,245,630,000,000,000,000,000,000,000
128
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; struct file *file; pr_warn_once("%s (%d) uses...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
300,961,848,211,339,100,000,000,000,000,000,000,000
95
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 hincrbyfloatCommand(client *c) { long double value, incr; long long ll; robj *o; sds new; unsigned char *vstr; unsigned int vlen; if (getLongDoubleFromObjectOrReply(c,c->argv[3],&incr,NULL) != C_OK) return; if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return; if...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
3,175,364,771,409,453,000,000,000,000,000,000,000
49
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 void hns_gmac_config_pad_and_crc(void *mac_drv, u8 newval) { u32 tx_ctrl; struct mac_driver *drv = (struct mac_driver *)mac_drv; tx_ctrl = dsaf_read_dev(drv, GMAC_TRANSMIT_CONTROL_REG); dsaf_set_bit(tx_ctrl, GMAC_TX_PAD_EN_B, !!newval); dsaf_set_bit(tx_ctrl, GMAC_TX_CRC_ADD_B, !!newval); dsaf_write_dev(dr...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
28,843,753,814,549,416,000,000,000,000,000,000,000
10
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...