func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg) { /* * Get the first expression. */ if (eval6(arg, rettv, evalarg) == FAIL) return FAIL; /* * Repeat computing, until no '<<' or '>>' is following. */ for (;;) { char_u *p; int getnext; exprtype_T type; int evaluat...
0
[ "CWE-476" ]
vim
79481367a457951aabd9501b510fd7e3eb29c3d8
16,414,140,799,211,954,000,000,000,000,000,000,000
97
patch 8.2.5169: nested :source may use NULL pointer Problem: Nested :source may use NULL pointer. Solution: Do not use the NULL pointer.
static int __init srpt_init_module(void) { int ret; ret = -EINVAL; if (srp_max_req_size < MIN_MAX_REQ_SIZE) { pr_err("invalid value %d for kernel module parameter" " srp_max_req_size -- must be at least %d.\n", srp_max_req_size, MIN_MAX_REQ_SIZE); goto out; } if (srpt_srq_size < MIN_SRPT_SR...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
266,957,527,551,022,360,000,000,000,000,000,000,000
37
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format, const char *encoding) { xmlSaveCtxt ctxt; #ifdef LIBXML_HTML_ENABLED xmlDtdPtr dtd; int is_xhtml = 0; #endif xmlInitParser(); if ((buf == NULL) || (cur == NULL)) return; if (encod...
0
[ "CWE-502" ]
libxml2
c97750d11bb8b6f3303e7131fe526a61ac65bcfd
73,806,460,904,504,780,000,000,000,000,000,000,000
39
Avoid an out of bound access when serializing malformed strings For https://bugzilla.gnome.org/show_bug.cgi?id=766414 * xmlsave.c: xmlBufAttrSerializeTxtContent() if an attribute value is not UTF-8 be more careful when serializing it as we may do an out of bound access as a result.
void exec_command_done_array(ExecCommand *c, size_t n) { size_t i; for (i = 0; i < n; i++) exec_command_done(c+i); }
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
194,978,776,682,525,770,000,000,000,000,000,000,000
6
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
store_tabletStylusLower(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct aiptek *aiptek = dev_get_drvdata(dev); int new_button = map_str_to_val(stylus_button_map, buf, count); if (new_button == AIPTEK_INVALID_VALUE) return -EINVAL; aiptek->newSetting.stylusButtonLower =...
0
[ "CWE-476", "CWE-401" ]
linux
8e20cf2bce122ce9262d6034ee5d5b76fbb92f96
94,984,491,110,213,970,000,000,000,000,000,000,000
11
Input: aiptek - fix crash on detecting device without endpoints The aiptek driver crashes in aiptek_probe() when a specially crafted USB device without endpoints is detected. This fix adds a check that the device has proper configuration expected by the driver. Also an error return value is changed to more matching on...
static void t1_close_font_file(const char *close_name_suffix) { t1_log(close_name_suffix); t1_close(); cur_file_name = NULL; }
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
76,597,195,508,991,590,000,000,000,000,000,000,000
6
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
_rsvg_handle_allow_load (RsvgHandle *handle, const char *uri, GError **error) { RsvgHandlePrivate *priv = handle->priv; GFile *base; char *path, *dir; char *scheme = NULL, *cpath = NULL, *cdir = NULL; g_assert (handle->priv->load_policy == RSVG_LOAD...
0
[]
librsvg
a51919f7e1ca9c535390a746fbf6e28c8402dc61
257,015,802,366,990,320,000,000,000,000,000,000
81
rsvg: Add rsvg_acquire_node() This function does proper recursion checks when looking up resources from URLs and thereby helps avoiding infinite loops when cyclic references span multiple types of elements.
sds sdsMakeRoomFor(sds s, size_t addlen) { void *sh, *newsh; size_t avail = sdsavail(s); size_t len, newlen; char type, oldtype = s[-1] & SDS_TYPE_MASK; int hdrlen; /* Return ASAP if there is enough space left. */ if (avail >= addlen) return s; len = sdslen(s); sh = (char*)s-sdsHdr...
0
[ "CWE-190" ]
redis
c992857618db99776917f10bf4f2345a5fdc78b0
125,064,884,014,930,770,000,000,000,000,000,000,000
46
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. Add ad...
void lex_end_nops(LEX *lex) { DBUG_ENTER("lex_end_nops"); sp_head::destroy(lex->sphead); lex->sphead= NULL; /* Reset LEX_MASTER_INFO */ lex->mi.reset(lex->sql_command == SQLCOM_CHANGE_MASTER); delete_dynamic(&lex->delete_gtid_domain); DBUG_VOID_RETURN; }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
248,913,329,645,306,970,000,000,000,000,000,000,000
12
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static int magicmouse_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { struct magicmouse_sc *msc = hid_get_drvdata(hdev); struct input_dev *input = msc->input; int x = 0, y = 0, ii, clicks = 0, npoints; switch (data[0]) { case TRACKPAD_REPORT_ID: /* Expect four bytes of pref...
0
[ "CWE-119", "CWE-787" ]
linux
c54def7bd64d7c0b6993336abcffb8444795bf38
147,857,904,346,825,620,000,000,000,000,000,000,000
82
HID: magicmouse: sanity check report size in raw_event() callback The report passed to us from transport driver could potentially be arbitrarily large, therefore we better sanity-check it so that magicmouse_emit_touch() gets only valid values of raw_id. Cc: stable@vger.kernel.org Reported-by: Steven Vittitoe <scvitti...
int ssl3_send_next_proto(SSL *s) { unsigned int len, padding_len; unsigned char *d; if (s->state == SSL3_ST_CW_NEXT_PROTO_A) { len = s->next_proto_negotiated_len; padding_len = 32 - ((len + 2) % 32); d = (unsigned char *)s->init_buf->data; d[4] = len; memcpy(d + 5, s->next_proto_negotiated, len); d[5...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
323,008,693,603,566,900,000,000,000,000,000,000,000
23
Add Next Protocol Negotiation.
static zval *phar_rename_archive(phar_archive_data **sphar, char *ext, zend_bool compress TSRMLS_DC) /* {{{ */ { const char *oldname = NULL; phar_archive_data *phar = *sphar; char *oldpath = NULL; char *basename = NULL, *basepath = NULL; char *newname = NULL, *newpath = NULL; zval *ret, arg1; zend_class_entry *c...
0
[ "CWE-119" ]
php-src
13ad4d3e971807f9a58ab5933182907dc2958539
208,161,561,763,122,300,000,000,000,000,000,000,000
197
Fix bug #71354 - remove UMR when size is 0
static int screen_width() { DEVMODE mode; mode.dmSize = sizeof(DEVMODE); mode.dmDriverExtra = 0; EnumDisplaySettings(0,ENUM_CURRENT_SETTINGS,&mode); return (int)mode.dmPelsWidth; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
21,781,803,715,525,990,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int xennet_remove(struct xenbus_device *dev) { struct netfront_info *info = dev_get_drvdata(&dev->dev); xennet_bus_close(dev); xennet_disconnect_backend(info); if (info->netdev->reg_state == NETREG_REGISTERED) unregister_netdev(info->netdev); if (info->queues) { rtnl_lock(); xennet_destroy_queues(i...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
92,325,619,925,859,320,000,000,000,000,000,000,000
19
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */ { zend_object_iterator *iterator; zend_generator *generator = (zend_generator*)Z_OBJ_P(object); if (!generator->execute_data) { zend_throw_exception(NULL, "Cannot traverse an already closed generator", 0); ...
0
[]
php-src
83e2b9e2202da6cc25bdaac67a58022b90be88e7
265,422,378,934,385,440,000,000,000,000,000,000,000
24
Fixed bug #76946
static int msg_cache_commit (IMAP_DATA* idata, HEADER* h) { char id[_POSIX_PATH_MAX]; if (!idata || !h) return -1; idata->bcache = msg_cache_open (idata); snprintf (id, sizeof (id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid); return mutt_bcache_commit (idata->bcache, id); }
0
[ "CWE-787" ]
mutt
3287534daa3beac68e2e83ca4b4fe8a3148ff870
247,614,405,393,164,000,000,000,000,000,000,000,000
12
Don't overflow tmp in msg_parse_fetch. Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer. Thanks to Jeriko One for the bug report and patch, which this patch is based upon.
static uint32 GetFineLinearSlideDownTable(const CSoundFile *sndFile, uint32 i) { MPT_ASSERT(i < CountOf(FineLinearSlideDownTable)); return sndFile->m_playBehaviour[kHertzInLinearMode] ? FineLinearSlideDownTable[i] : FineLinearSlideUpTable[i]; }
0
[ "CWE-125" ]
openmpt
7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c
189,033,187,464,133,260,000,000,000,000,000,000,000
1
[Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27
static int p54u_bulk_msg(struct p54u_priv *priv, unsigned int ep, void *data, size_t len) { int alen; return usb_bulk_msg(priv->udev, usb_sndbulkpipe(priv->udev, ep), data, len, &alen, 2000); }
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
22,021,680,975,378,740,000,000,000,000,000,000,000
7
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
DEFUN (clear_ip_bgp_external, clear_ip_bgp_external_cmd, "clear ip bgp external", CLEAR_STR IP_STR BGP_STR "Clear all external peers\n") { return bgp_clear_vty (vty, NULL, 0, 0, clear_external, BGP_CLEAR_SOFT_NONE, NULL); }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
15,677,840,312,072,416,000,000,000,000,000,000,000
10
[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...
xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) { xmlHashScan(table, xmlDumpEntityDeclScan, buf); }
0
[ "CWE-787" ]
libxml2
bf22713507fe1fc3a2c4b525cf0a88c2dc87a3a2
136,266,802,265,345,060,000,000,000,000,000,000,000
3
Validate UTF8 in xmlEncodeEntities Code is currently assuming UTF-8 without validating. Truncated UTF-8 input can cause out-of-bounds array access. Adds further checks to partial fix in 50f06b3e. Fixes #178
static inline int security_bprm_set_creds(struct linux_binprm *bprm) { return cap_bprm_set_creds(bprm); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
15,023,589,374,489,210,000,000,000,000,000,000,000
4
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...
void __fastcall TCustomDialog::AddComboBox(TCustomCombo * Combo, TLabel * Label, TStrings * Items, bool OneLine) { AddEditLikeControl(Combo, Label, OneLine); SetUpComboBox(Combo, Items, OneLine); }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
227,410,921,870,224,170,000,000,000,000,000,000,000
6
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
bool OSDService::should_share_map(entity_name_t name, Connection *con, epoch_t epoch, const OSDMapRef& osdmap, const epoch_t *sent_epoch_p) { dout(20) << "should_share_map " << name << " " << con->get_peer_addr() << " " << epoch...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
150,327,181,157,215,340,000,000,000,000,000,000,000
40
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_secinfo_no_name *sin) { __be32 err; switch (sin->sin_style) { case NFS4_SECINFO_STYLE4_CURRENT_FH: break; case NFS4_SECINFO_STYLE4_PARENT: err = nfsd4_do_lookupp(rqstp, &cstate->current_fh); if (err) ret...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
116,616,341,690,783,040,000,000,000,000,000,000,000
21
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
void smtp_server_connection_register_rcpt_param( struct smtp_server_connection *conn, const char *param) { param = p_strdup(conn->pool, param); if (!array_is_created(&conn->rcpt_param_extensions)) { p_array_init(&conn->rcpt_param_extensions, conn->pool, 8); array_push_back(&conn->rcpt_param_extensions, &param);...
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
20,372,476,059,086,181,000,000,000,000,000,000,000
17
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
GF_Err adkm_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem) { GF_AdobeDRMKeyManagementSystemBox *ptr = (GF_AdobeDRMKeyManagementSystemBox *)s; switch (a->type) { case GF_ISOM_BOX_TYPE_AHDR: BOX_FIELD_ASSIGN(header, GF_AdobeDRMHeaderBox) break; case GF_ISOM_BOX_TYPE_ADAF: BOX_FIELD_ASSIGN(au_format, GF_AdobeDR...
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
202,165,889,999,168,800,000,000,000,000,000,000,000
13
fixed #1879
static inline void del_timer_wait_running(struct timer_list *timer) { }
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
256,336,763,285,541,400,000,000,000,000,000,000,000
1
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
setpassfilter(argv) char **argv; { pcap_t *pc; int ret = 1; pc = pcap_open_dead(DLT_PPP_PPPD, 65535); if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == -1) { option_error("error in pass-filter expression: %s\n", pcap_geterr(pc)); ret = 0; } pcap_close(pc); return ret; }
0
[ "CWE-415", "CWE-119" ]
ppp
7658e8257183f062dc01f87969c140707c7e52cb
83,642,470,002,862,795,000,000,000,000,000,000,000
16
pppd: Eliminate potential integer overflow in option parsing When we are reading in a word from an options file, we maintain a count of the length we have seen so far in 'len', which is an int. When len exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the buffer but we continue to increment len. Sin...
bool SNC_io_parser<EW>:: read_sedge(SHalfedge_handle seh) { bool OK = true; int index; #ifdef CGAL_NEF_NATURAL_COORDINATE_INPUT typename K::RT a,b,c,d; #endif in >> index; OK = OK && test_string("{"); in >> index; seh->twin() = SEdge_of[index]; OK = OK && test_string(","); in >> index; seh->sprev...
1
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
39,770,160,928,380,027,000,000,000,000,000,000,000
49
Fix Nef_3
void Curl_free_request_state(struct Curl_easy *data) { Curl_safefree(data->req.protop); Curl_safefree(data->req.newurl); }
0
[ "CWE-119" ]
curl
9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400
68,385,860,137,123,870,000,000,000,000,000,000,000
5
url: fix alignment of ssl_backend_data struct - Align the array of ssl_backend_data on a max 32 byte boundary. 8 is likely to be ok but I went with 32 for posterity should one of the ssl_backend_data structs change to contain a larger sized variable in the future. Prior to this change (since dev 70f1db3, release 7.5...
deep_count_more_files_callback (GObject *source_object, GAsyncResult *res, gpointer user_data) { DeepCountState *state; NautilusDirectory *directory; GList *files, *l; GFileInfo *info; state = user_data; if (state->directory == NULL) { /* Operation was cancelled. Bail out */ deep_count_state_free (s...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
216,541,454,087,301,430,000,000,000,000,000,000,000
50
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static int ringbuf_map_get_next_key(struct bpf_map *map, void *key, void *next_key) { return -ENOTSUPP; }
0
[ "CWE-787" ]
bpf
4b81ccebaeee885ab1aa1438133f2991e3a2b6ea
290,760,647,587,037,650,000,000,000,000,000,000,000
5
bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota...
void delete_run_files(pid_t pid) { delete_sandbox_run_file(pid); delete_bandwidth_run_file(pid); delete_network_run_file(pid); delete_name_run_file(pid); delete_x11_run_file(pid); delete_profile_run_file(pid); }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
286,918,065,086,137,600,000,000,000,000,000,000,000
8
fixing CVE-2022-31214
__getcwd_generic (char *buf, size_t size) { /* Lengths of big file name components and entire file names, and a deep level of file name nesting. These numbers are not upper bounds; they are merely large values suitable for initial allocations, designed to be large enough for most real-world uses....
0
[ "CWE-284" ]
glibc
23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e
32,913,813,816,445,095,000,000,000,000,000,000,000
340
getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) No valid path returned by getcwd would fit into 1 byte, so reject the size early and return NULL with errno set to ERANGE. This change is prompted by CVE-2021-3999, which describes a single byte buffer underflow and overflow when all of the following condition...
static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg) { struct ax25_ctl_struct ax25_ctl; ax25_digi digi; ax25_dev *ax25_dev; ax25_cb *ax25; unsigned int k; int ret = 0; if (copy_from_user(&ax25_ctl, arg, sizeof(ax25_ctl))) return -EFAULT; if ((ax25_dev = ax25_addr_ax25dev(&ax25_ctl.port_addr))...
1
[ "CWE-416" ]
linux
87563a043cef044fed5db7967a75741cc16ad2b1
288,150,873,176,406,500,000,000,000,000,000,000,000
101
ax25: fix reference count leaks of ax25_dev The previous commit d01ffb9eee4a ("ax25: add refcount in ax25_dev to avoid UAF bugs") introduces refcount into ax25_dev, but there are reference leak paths in ax25_ctl_ioctl(), ax25_fwd_ioctl(), ax25_rt_add(), ax25_rt_del() and ax25_rt_opt(). This patch uses ax25_dev_put() ...
static inline unsigned short ReadPropertyUnsignedShort(const EndianType endian, const unsigned char *buffer) { unsigned short value; if (endian == LSBEndian) { value=(unsigned short) ((buffer[1] << 8) | buffer[0]); return((unsigned short) (value & 0xffff)); } value=(unsigned short) ((((...
1
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
282,251,191,333,977,860,000,000,000,000,000,000,000
15
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
HiiGetLanguages ( IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN OUT CHAR8 *Languages, IN OUT UINTN *LanguagesSize ) { LIST_ENTRY *Link; HII_DATABASE_PRIVATE_DATA *Priva...
0
[]
edk2
764e8ba1389a617639d79d2c4f0d53f4ea4a7387
79,192,582,179,902,140,000,000,000,000,000,000,000
66
MdeModulePkg/String.c: 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.dong@in...
static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, struct inotify_watch **watchp) { return -EOPNOTSUPP; }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
196,476,253,226,070,730,000,000,000,000,000,000,000
5
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
static int sqlite_handle_begin(pdo_dbh_t *dbh TSRMLS_DC) { pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; char *errmsg = NULL; if (sqlite3_exec(H->db, "BEGIN", NULL, NULL, &errmsg) != SQLITE_OK) { pdo_sqlite_error(dbh); if (errmsg) sqlite3_free(errmsg); return 0; } return 1; }
0
[ "CWE-264" ]
php-src
055ecbc62878e86287d742c7246c21606cee8183
222,267,785,866,113,750,000,000,000,000,000,000,000
13
Improve check for :memory: pseudo-filename in SQlite
dirserv_pick_cached_dir_obj(cached_dir_t *cache_src, cached_dir_t *auth_src, time_t dirty, cached_dir_t *(*regenerate)(void), const char *name, authority_type_t auth_type) { or_options_t *options = get_opti...
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
86,482,405,461,628,280,000,000,000,000,000,000,000
27
Don't give the Guard flag to relays without the CVE-2011-2768 fix
static MagickBooleanType IsITUFaxImage(const Image *image) { const StringInfo *profile; const unsigned char *datum; profile=GetImageProfile(image,"8bim"); if (profile == (const StringInfo *) NULL) return(MagickFalse); if (GetStringInfoLength(profile) < 5) return(MagickFalse); datum=GetStri...
0
[ "CWE-416" ]
ImageMagick
39f226a9c137f547e12afde972eeba7551124493
182,732,393,898,537,900,000,000,000,000,000,000,000
19
https://github.com/ImageMagick/ImageMagick/issues/1641
int lxc_wait_for_pid_status(pid_t pid) { int status, ret; again: ret = waitpid(pid, &status, 0); if (ret == -1) { if (errno == EINTR) goto again; return -1; } if (ret != pid) goto again; return status; }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
159,072,435,703,666,000,000,000,000,000,000,000,000
15
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
Status setFromString(const std::string& str) { std::vector<std::string> strList; splitStringDelim(str, &strList, ','); std::vector<UserName> out; for (const auto& nameStr : strList) { auto swUserName = UserName::parse(nameStr); if (!swUserName.isOK()) { ...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
238,192,706,991,968,800,000,000,000,000,000,000,000
31
SERVER-38984 Validate unique User ID on UserCache hit
int main(int argc, char** argv) { int sck; int dis; struct sockaddr_un sa; size_t len; char* p; char* display; if (argc != 1) { printf("xrdp disconnect utility\n"); printf("run with no parameters to disconnect you xrdp session\n"); return 0; } display = getenv("DISPLAY"); if (display...
1
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
256,290,203,844,973,900,000,000,000,000,000,000,000
39
move temp files from /tmp to /tmp/.xrdp
static u8 tcm_to_srp_tsk_mgmt_status(const int tcm_mgmt_status) { switch (tcm_mgmt_status) { case TMR_FUNCTION_COMPLETE: return SRP_TSK_MGMT_SUCCESS; case TMR_FUNCTION_REJECTED: return SRP_TSK_MGMT_FUNC_NOT_SUPP; } return SRP_TSK_MGMT_FAILED; }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
148,853,436,718,485,500,000,000,000,000,000,000,000
10
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...) { va_list ap; va_start(ap, arg); switch(value) { case MARIADB_MAX_ALLOWED_PACKET: *((size_t *)arg)= (size_t)max_allowed_packet; break; case MARIADB_NET_BUFFER_LENGTH: *((size_t *)arg)= (size_t)net_buffer_length; ...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
169,671,727,087,038,340,000,000,000,000,000,000,000
217
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
lvs_syncd_handler(vector_t *strvec) { unsigned val; size_t i; if (global_data->lvs_syncd.ifname) { report_config_error(CONFIG_GENERAL_ERROR, "lvs_sync_daemon has already been specified as %s %s - ignoring", global_data->lvs_syncd.ifname, global_data->lvs_syncd.vrrp_name); return; } if (vector_size(strvec) < ...
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
100,019,062,761,506,020,000,000,000,000,000,000,000
116
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
ibytestream::ibytestream(Sirikata::DecoderReader *p, unsigned int byte_offset, const Sirikata::JpegAllocator<uint8_t> &alloc) : parent(p) { bytes_read = byte_offset; }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
195,448,183,390,127,730,000,000,000,000,000,000,000
5
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
static struct user_namespace *netns_owner(struct ns_common *ns) { return to_net_ns(ns)->user_ns; }
0
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
227,082,250,324,104,040,000,000,000,000,000,000,000
4
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
_XimProtoGetIMValues( XIM xim, XIMArg *arg) { Xim im = (Xim)xim; register XIMArg *p; register int n; CARD8 *buf; CARD16 *buf_s; INT16 len; CARD32 reply32[BUFSIZE/4]; char *reply = (char *)reply32; XPointer preply = NULL; int buf_size; int ret_co...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
28,229,397,813,910,910,000,000,000,000,000,000,000
110
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
void CLASS samsung2_load_raw() { static const ushort tab[14] = {0x304, 0x307, 0x206, 0x205, 0x403, 0x600, 0x709, 0x80a, 0x90b, 0xa0c, 0xa0d, 0x501, 0x408, 0x402}; ushort huff[1026], vpred[2][2] = {{0, 0}, {0, 0}}, hpred[2]; int i, c, n, row, col, diff; huff[0] = 10; for (n = ...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
310,899,651,109,105,530,000,000,000,000,000,000,000
29
Secunia SA75000 advisory: several buffer overruns
void gnutls_x509_key_purpose_deinit(gnutls_x509_key_purposes_t p) { key_purposes_deinit(p); gnutls_free(p); }
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
11,152,735,264,234,518,000,000,000,000,000,000,000
5
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
hfinfo_char_value_format_display(int display, char buf[7], guint32 value) { char *ptr = &buf[6]; static const gchar hex_digits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; *ptr = '\0'; *(--ptr) = '\''; /* Properly format value */ if (g_ascii_isprint(value)) { /*...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
216,749,810,885,394,730,000,000,000,000,000,000,000
86
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
GF_Err hinf_AddBox(GF_Box *s, GF_Box *a) { GF_MAXRBox *maxR; GF_HintInfoBox *hinf = (GF_HintInfoBox *)s; u32 i; switch (a->type) { case GF_ISOM_BOX_TYPE_MAXR: i=0; while ((maxR = (GF_MAXRBox *)gf_list_enum(hinf->other_boxes, &i))) { if ((maxR->type==GF_ISOM_BOX_TYPE_MAXR) && (maxR->granularity == ((GF_MAXRB...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
204,374,378,212,002,700,000,000,000,000,000,000,000
16
prevent dref memleak on invalid input (#1183)
\param align Appending alignment. \param[in,out] XYZ Contains the XYZ coordinates at start / exit of the function. \param exit_on_anykey Exit function when any key is pressed. **/ const CImgList<T>& display(const char *const title=0, const bool display_info=true, ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
135,320,808,744,916,700,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage, unsigned long **bit, int *max) { if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) return 0; switch (usage->hid & HID_USAGE) { case 0x00d: lg_map_key_clear(KEY_MEDIA); break; default: return 0; } return 1; }
0
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
130,431,400,262,320,800,000,000,000,000,000,000,000
15
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
void mnt_pin(struct vfsmount *mnt) { lock_mount_hash(); real_mount(mnt)->mnt_pinned++; unlock_mount_hash(); }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
310,148,427,782,653,080,000,000,000,000,000,000,000
6
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
rb_str_buf_cat(str, ptr, len) VALUE str; const char *ptr; long len; { long capa, total; if (len == 0) return str; if (len < 0) { rb_raise(rb_eArgError, "negative string size (or size too big)"); } rb_str_modify(str); if (FL_TEST(str, STR_ASSOC)) { FL_UNSET(str, STR_ASSOC); capa =...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
244,958,716,966,193,000,000,000,000,000,000,000,000
32
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int apply_color_transform(WebPContext *s) { ImageContext *img, *cimg; int x, y, cx, cy; uint8_t *p, *cp; img = &s->image[IMAGE_ROLE_ARGB]; cimg = &s->image[IMAGE_ROLE_COLOR_TRANSFORM]; for (y = 0; y < img->frame->height; y++) { for (x = 0; x < img->frame->width; x++) { ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
211,977,978,536,524,970,000,000,000,000,000,000,000
23
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
CtPtr ProtocolV1::handle_message_front(char *buffer, int r) { ldout(cct, 20) << __func__ << " r=" << r << dendl; if (r < 0) { ldout(cct, 1) << __func__ << " read message front failed" << dendl; return _fault(); } ldout(cct, 20) << __func__ << " got front " << front.length() << dendl; return read_me...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
22,510,778,078,433,137,000,000,000,000,000,000,000
12
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static void hns_xgmac_get_pausefrm_cfg(void *mac_drv, u32 *rx_en, u32 *tx_en) { struct mac_driver *drv = (struct mac_driver *)mac_drv; u32 pause_ctrl; pause_ctrl = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG); *rx_en = dsaf_get_bit(pause_ctrl, XGMAC_PAUSE_CTL_RX_B); *tx_en = dsaf_get_bit(pause_ctrl, XGMAC_PAUSE_C...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
150,744,141,725,437,010,000,000,000,000,000,000,000
9
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 ...
err_gettext(const char *str) { #ifdef ENABLE_NLS if (in_error_recursion_trouble()) return str; else return gettext(str); #else return str; #endif }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
10,688,349,985,067,283,000,000,000,000,000,000,000
11
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
plperl_func_handler(PG_FUNCTION_ARGS) { plperl_proc_desc *prodesc; SV *perlret; Datum retval = 0; ReturnSetInfo *rsi; ErrorContextCallback pl_error_context; if (SPI_connect() != SPI_OK_CONNECT) elog(ERROR, "could not connect to SPI manager"); prodesc = compile_plperl_function(fcinfo->flinfo->fn_oid, fal...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
172,900,307,007,990,400,000,000,000,000,000,000,000
108
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static inline void nested_release_evmcs(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); if (!vmx->nested.hv_evmcs) return; kunmap(vmx->nested.hv_evmcs_page); kvm_release_page_dirty(vmx->nested.hv_evmcs_page); vmx->nested.hv_evmcs_vmptr = -1ull; vmx->nested.hv_evmcs_page = NULL; vmx->nested.hv_e...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
319,555,060,615,269,200,000,000,000,000,000,000,000
13
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family) { struct net *net = dev_net(skb->dev); return !net->xfrm.policy_count[XFRM_POLICY_OUT] || (skb_dst(skb)->flags & DST_NOXFRM) || __xfrm_route_forward(skb, family); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
178,999,006,892,464,040,000,000,000,000,000,000,000
8
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static void vc_uniscr_set(struct vc_data *vc, struct uni_screen *new_uniscr) { vc_uniscr_free(vc->vc_uni_screen); vc->vc_uni_screen = new_uniscr; }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
113,892,631,699,186,880,000,000,000,000,000,000,000
5
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->...
MagickExport void ConvertLCHabToRGB(const double luma,const double chroma, const double hue,Quantum *red,Quantum *green,Quantum *blue) { double X, Y, Z; /* Convert LCHab to RGB colorspace. */ assert(red != (Quantum *) NULL); assert(green != (Quantum *) NULL); assert(blue != (Quantum *) NU...
0
[ "CWE-369" ]
ImageMagick6
90255f0834eead08d59f46b0bda7b1580451cc0f
332,141,419,501,292,640,000,000,000,000,000,000,000
17
https://github.com/ImageMagick/ImageMagick/issues/3077
int kvm_arch_hardware_enable(void *garbage) { struct kvm *kvm; struct kvm_vcpu *vcpu; int i; int ret; u64 local_tsc; u64 max_tsc = 0; bool stable, backwards_tsc = false; kvm_shared_msr_cpu_online(); ret = kvm_x86_ops->hardware_enable(garbage); if (ret != 0) return ret; local_tsc = native_read_tsc(); sta...
0
[ "CWE-119" ]
kvm
c300aa64ddf57d9c5d9c898a64b36877345dd4a9
305,503,957,380,218,860,000,000,000,000,000,000,000
90
KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) If the guest sets the GPA of the time_page so that the request to update the time straddles a page then KVM will write onto an incorrect page. The write is done byusing kmap atomic to get a pointer to the page for the time structure ...
static bool is_ctx_reg(struct bpf_verifier_env *env, int regno) { const struct bpf_reg_state *reg = cur_regs(env) + regno; return reg->type == PTR_TO_CTX; }
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
63,662,825,948,430,520,000,000,000,000,000,000,000
6
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
sctp_disposition_t sctp_sf_cookie_echoed_err(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; sctp_errhdr_t *err; if (!sctp_vtag_verify(chunk, asoc)) return sctp_sf_pdiscard(ep...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
100,516,642,136,689,600,000,000,000,000,000,000,000
37
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zv...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
194,245,800,088,683,630,000,000,000,000,000,000,000
14
- 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
has_sequence_privilege_id_id(PG_FUNCTION_ARGS) { Oid roleid = PG_GETARG_OID(0); Oid sequenceoid = PG_GETARG_OID(1); text *priv_type_text = PG_GETARG_TEXT_P(2); AclMode mode; AclResult aclresult; char relkind; mode = convert_sequence_priv_string(priv_type_text); relkind = get_rel_relkind(sequenceoid); ...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
37,996,429,806,248,237,000,000,000,000,000,000,000
23
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
trad_enc_update_keys(struct trad_enc_ctx *ctx, uint8_t c) { uint8_t t; #define CRC32(c, b) (crc32(c ^ 0xffffffffUL, &b, 1) ^ 0xffffffffUL) ctx->keys[0] = CRC32(ctx->keys[0], c); ctx->keys[1] = (ctx->keys[1] + (ctx->keys[0] & 0xff)) * 134775813L + 1; t = (ctx->keys[1] >> 24) & 0xff; ctx->keys[2] = CRC32(ctx->keys[...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
78,282,238,078,551,310,000,000,000,000,000,000,000
11
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
static int __ip_tun_to_nlattr(struct sk_buff *skb, const struct ip_tunnel_key *output, const void *tun_opts, int swkey_tun_opts_len, unsigned short tun_proto, u8 mode) { if (output->tun_flags & TUNNEL_KEY && nla_put_be64(skb, OVS_TUNNEL_KEY_ATTR_ID, output->tun_id, OVS_TUNNEL_KEY_AT...
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
246,952,300,186,833,600,000,000,000,000,000,000,000
72
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
static inline u32 tcp_wnd_end(const struct tcp_sock *tp) { return tp->snd_una + tp->snd_wnd; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
66,456,230,419,607,550,000,000,000,000,000,000,000
4
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static void __exit ecryptfs_exit(void) { int rc; rc = ecryptfs_destroy_crypto(); if (rc) printk(KERN_ERR "Failure whilst attempting to destroy crypto; " "rc = [%d]\n", rc); ecryptfs_release_messaging(); ecryptfs_destroy_kthread(); do_sysfs_unregistration(); unregister_filesystem(&ecryptfs_fs_type); ...
0
[ "CWE-284", "CWE-264" ]
linux
69c433ed2ecd2d3264efd7afec4439524b319121
53,530,936,873,311,420,000,000,000,000,000,000,000
14
fs: limit filesystem stacking depth Add a simple read-only counter to super_block that indicates how deep this is in the stack of filesystems. Previously ecryptfs was the only stackable filesystem and it explicitly disallowed multiple layers of itself. Overlayfs, however, can be stacked recursively and also may be s...
GF_Err stsd_box_read(GF_Box *s, GF_BitStream *bs) { ISOM_DECREASE_SIZE(s, 4) gf_bs_read_u32(bs); return gf_isom_box_array_read_ex(s, bs, GF_ISOM_BOX_TYPE_STSD); }
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
127,422,303,642,203,730,000,000,000,000,000,000,000
7
fixed #1757
ews_connection_schedule_queue_message (EEwsConnection *cnc, SoupMessage *message, SoupSessionCallback callback, gpointer user_data) { EwsScheduleData *sd; GSource *source; g_return_if_fail (E_IS_EWS_...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
204,423,609,411,915,220,000,000,000,000,000,000,000
24
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
static int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres) { POC[0].tile = 1; POC[0].resno0 = 0; POC[0].compno0 = 0; POC[0].layno1 = 1; POC[0].resno1 = (OPJ_UINT32)(numres - 1); POC[0].compno1 = 3; POC[0].prg1 = OPJ_CPRL; POC[1].tile = 1; POC[1].resno0 = (OPJ_UINT32)(numr...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
328,152,533,937,005,870,000,000,000,000,000,000,000
18
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
void AuthorizationManagerImpl::_updateCacheGeneration_inlock() { _cacheGeneration = OID::gen(); }
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
61,973,710,250,695,030,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static ut64 bbJump(RAnalFunction *fcn, ut64 addr) { RListIter *iter; RAnalBlock *bb; r_list_foreach (fcn->bbs, iter, bb) { if (R_BETWEEN (bb->addr, addr, bb->addr + bb->size - 1)) { return bb->jump; } } return UT64_MAX; }
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
112,497,130,772,092,520,000,000,000,000,000,000,000
10
Fix #16303 - c->table_query double free (#16318)
std::map<std::string, std::string> GetAddedFileSystemPaths( content::WebContents* web_contents) { auto* pref_service = GetPrefService(web_contents); const base::Value* file_system_paths_value = pref_service->GetDictionary(prefs::kDevToolsFileSystemPaths); std::map<std::string, std::string> result; if ...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
69,548,695,681,342,700,000,000,000,000,000,000,000
18
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static int vmci_transport_recv_connecting_client_negotiate( struct sock *sk, struct vmci_transport_packet *pkt) { int err; struct vsock_sock *vsk; struct vmci_handle handle; struct vmci_qp *qpair; u32 attach_sub_id; u32 detach_sub_id; bool is_local; u32 flags; bool old_proto = true; bool old_pkt_pro...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
32,232,281,856,347,805,000,000,000,000,000,000,000
134
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int cma_listen_on_all(struct rdma_id_private *id_priv) { struct rdma_id_private *to_destroy; struct cma_device *cma_dev; int ret; mutex_lock(&lock); list_add_tail(&id_priv->list, &listen_any_list); list_for_each_entry(cma_dev, &dev_list, list) { ret = cma_listen_on_dev(id_priv, cma_dev, &to_destroy); ...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
164,406,797,403,097,060,000,000,000,000,000,000,000
27
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...
dup_obj_with_new_start(VALUE obj, double sg) { volatile VALUE dup = dup_obj(obj); { get_d1(dup); set_sg(dat, sg); } return dup; }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
197,556,792,020,431,700,000,000,000,000,000,000,000
9
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`...
static void unix_sock_destructor(struct sock *sk) { struct unix_sock *u = unix_sk(sk); skb_queue_purge(&sk->sk_receive_queue); WARN_ON(atomic_read(&sk->sk_wmem_alloc)); WARN_ON(!sk_unhashed(sk)); WARN_ON(sk->sk_socket); if (!sock_flag(sk, SOCK_DEAD)) { printk(KERN_INFO "Attempt to release alive unix socket: %...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
288,793,615,722,939,300,000,000,000,000,000,000,000
26
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
calc_enc_length (gnutls_session_t session, int data_size, int hash_size, uint8_t * pad, int random_pad, cipher_type_t block_algo, uint16_t blocksize) { uint8_t rnd; int length, ret; *pad = 0; switch (block_algo) { case CIPHER_STREAM: length = data_size + hash_si...
0
[ "CWE-310" ]
gnutls
422214868061370aeeb0ac9cd0f021a5c350a57d
216,178,467,878,641,900,000,000,000,000,000,000,000
56
better check decrypted data.
GF_Err csgp_box_size(GF_Box *s) { u32 i, bits; GF_CompactSampleGroupBox *ptr = (GF_CompactSampleGroupBox*)s; u32 pattern_size = get_size_by_code( ((ptr->flags>>4) & 0x3) ); u32 scount_size = get_size_by_code( ((ptr->flags>>2) & 0x3) ); u32 index_size = get_size_by_code( (ptr->flags & 0x3) ); ptr->size += 12; //v...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
263,600,547,192,747,460,000,000,000,000,000,000,000
20
fixed #2255
save_reduce(PicklerObject *self, PyObject *args, PyObject *obj) { PyObject *callable; PyObject *argtup; PyObject *state = NULL; PyObject *listitems = Py_None; PyObject *dictitems = Py_None; PickleState *st = _Pickle_GetGlobalState(); Py_ssize_t size; int use_newobj = 0, use_newobj_ex = 0...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
323,747,327,772,955,570,000,000,000,000,000,000,000
282
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static inline void __ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { /* * The pte is non-present, so there's no hardware state to * preserve. */ set_pte_at(mm, addr, ptep, pte); }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
135,348,320,654,434,180,000,000,000,000,000,000,000
10
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
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-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
86,124,743,079,514,600,000,000,000,000,000,000,000
39
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
mrb_obj_ivar_get(mrb_state *mrb, mrb_value self) { mrb_sym iv_name; mrb_get_args(mrb, "n", &iv_name); mrb_iv_check(mrb, iv_name); return mrb_iv_get(mrb, self, iv_name); }
0
[ "CWE-824" ]
mruby
b64ce17852b180dfeea81cf458660be41a78974d
163,255,244,137,731,220,000,000,000,000,000,000,000
8
Should not call `initialize_copy` for `TT_ICLASS`; fix #4027 Since `TT_ICLASS` is a internal object that should never be revealed to Ruby world.
T value() const { return value_; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
37,468,925,708,608,720,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
void xfrm_policy_hash_rebuild(struct net *net) { schedule_work(&net->xfrm.policy_hthresh.work); }
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
89,141,420,671,692,640,000,000,000,000,000,000,000
4
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
static int ip_vs_genl_fill_service(struct sk_buff *skb, struct ip_vs_service *svc) { struct nlattr *nl_service; struct ip_vs_flags flags = { .flags = svc->flags, .mask = ~0 }; nl_service = nla_nest_start(skb, IPVS_CMD_ATTR_SERVICE); if (!nl_service) return -EMSGSIZE; NLA_PUT_U16(skb, IPVS_SVC_A...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
289,864,502,554,089,900,000,000,000,000,000,000,000
37
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long length, low_limit, high_limit, gap_start, gap_end; /* Adjust search length to account for worst case alignment overhead */ length = info->length + info->align_mas...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
221,394,055,306,240,400,000,000,000,000,000,000,000
97
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void fastrpc_release(struct dma_buf *dmabuf) { struct fastrpc_buf *buffer = dmabuf->priv; fastrpc_buf_free(buffer); }
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
58,225,058,070,565,970,000,000,000,000,000,000,000
6
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
static struct sock *udp_v6_lookup(struct in6_addr *saddr, u16 sport, struct in6_addr *daddr, u16 dport, int dif) { struct sock *sk, *result = NULL; struct hlist_node *node; unsigned short hnum = ntohs(dport); int badness = -1; read_lock(&udp_hash_lock); sk_for_each(sk, node, &udp_hash[hnum & (UDP_HTABLE_S...
0
[ "CWE-476" ]
linux-2.6
1e0c14f49d6b393179f423abbac47f85618d3d46
143,582,848,034,732,530,000,000,000,000,000,000,000
49
[UDP]: Fix MSG_PROBE crash UDP tracks corking status through the pending variable. The IP layer also tracks it through the socket write queue. It is possible for the two to get out of sync when MSG_PROBE is used. This patch changes UDP to check the write queue to ensure that the two stay in sync. Signed-off-by: He...
mono_image_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *type, gboolean try_typespec) { MonoDynamicTable *table; guint32 *values; guint32 token, scope, enclosing; MonoClass *klass; /* if the type requires a typespec, we must try that first*/ if (try_typespec && (token = create_typespec (assembly, ty...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
184,686,333,474,368,420,000,000,000,000,000,000,000
50
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static void arcmsr_free_ccb_pool(struct AdapterControlBlock *acb) { dma_free_coherent(&acb->pdev->dev, acb->uncache_size, acb->dma_coherent, acb->dma_coherent_handle); }
0
[ "CWE-119", "CWE-787" ]
linux
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
166,614,029,105,963,050,000,000,000,000,000,000,000
4
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: <stable@vger.kernel.org> Reported-by: Marco Grassi <marco.gra@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Sig...