func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.integer.value[0] = !!(kcontrol->private_value & 0x02); return 0; }
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
228,339,382,575,733,200,000,000,000,000,000,000,000
6
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
static int drbg_status(void) { int ret; RAND_DRBG *drbg = RAND_DRBG_get0_master(); if (drbg == NULL) return 0; rand_drbg_lock(drbg); ret = drbg->state == DRBG_READY ? 1 : 0; rand_drbg_unlock(drbg); return ret; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
88,563,404,532,731,920,000,000,000,000,000,000,000
13
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
static void drm_mode_object_put(struct drm_device *dev, struct drm_mode_object *object) { mutex_lock(&dev->mode_config.idr_mutex); idr_remove(&dev->mode_config.crtc_idr, object->id); mutex_unlock(&dev->mode_config.idr_mutex); }
0
[ "CWE-190", "CWE-189" ]
linux
a5cd335165e31db9dbab636fd29895d41da55dd2
49,664,800,977,014,480,000,000,000,000,000,000,000
7
drm: integer overflow in drm_mode_dirtyfb_ioctl() There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@g...
grab_cache_page_nowait(struct address_space *mapping, pgoff_t index) { struct page *page = find_get_page(mapping, index); if (page) { if (!TestSetPageLocked(page)) return page; page_cache_release(page); return NULL; } page = __page_cache_alloc(mapping_gfp_mask(mapping) & ~__GFP_FS); if (page && add_to_pa...
0
[ "CWE-193" ]
linux-2.6
94ad374a0751f40d25e22e036c37f7263569d24c
198,677,207,685,572,320,000,000,000,000,000,000,000
17
Fix off-by-one error in iov_iter_advance() The iov_iter_advance() function would look at the iov->iov_len entry even though it might have iterated over the whole array, and iov was pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a kernel page fault if the allocation was at the end of a page, and th...
ex_eval(exarg_T *eap) { typval_T tv; evalarg_T evalarg; int name_only = FALSE; long lnum = SOURCING_LNUM; if (in_vim9script()) name_only = cmd_is_name_only(eap->arg); fill_evalarg_from_eap(&evalarg, eap, eap->skip); if (eval0(eap->arg, &tv, eap, &evalarg) == OK) { clear_tv(&tv); i...
0
[ "CWE-787" ]
vim
96b9bf8f74af8abf1e30054f996708db7dc285be
256,783,681,458,810,430,000,000,000,000,000,000,000
27
patch 9.0.0577: buffer underflow with unexpected :finally Problem: Buffer underflow with unexpected :finally. Solution: Check CSF_TRY can be found.
static int orinoco_ioctl_get_auth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct orinoco_private *priv = ndev_priv(dev); struct iw_param *param = &wrqu->param; unsigned long flags; int ret = 0; if (orinoco_lock(priv, &flags) != 0) return -EBUSY; ...
0
[]
linux
0a54917c3fc295cb61f3fb52373c173fd3b69f48
195,229,103,624,254,340,000,000,000,000,000,000,000
39
orinoco: fix TKIP countermeasure behaviour Enable the port when disabling countermeasures, and disable it on enabling countermeasures. This bug causes the response of the system to certain attacks to be ineffective. It also prevents wpa_supplicant from getting scan results, as wpa_supplicant disables countermeasures...
static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) { unsigned index = id->driver_data; struct Scsi_Host *shost; struct aac_dev *aac; struct list_head *insert = &aac_devices; int error = -ENODEV; int unique_id = 0; u64 dmamask; extern int aac_sync_mode; list_for_each_entry(aac, &aac...
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
77,247,422,887,643,150,000,000,000,000,000,000,000
194
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
icalparameter_get_scheduleagent(icalparameter *param) { const char *agent = NULL; if (param) agent = icalparameter_get_iana_value(param); if (!agent) return ICAL_SCHEDULEAGENT_NONE; else if (!strcmp(agent, "SERVER")) return ICAL_SCHEDULEAGENT_SERVER; else if (!strcmp(agent, "CLIENT")) return ICAL_...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
141,859,740,409,713,560,000,000,000,000,000,000,000
11
HTTP: don't overrun buffer when parsing strings with sscanf()
static int decode_font(ASS_Track *track) { unsigned char *p; unsigned char *q; size_t i; size_t size; // original size size_t dsize; // decoded size unsigned char *buf = 0; ass_msg(track->library, MSGL_V, "Font: %d bytes encoded data", track->p...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
316,747,475,758,765,400,000,000,000,000,000,000,000
42
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i) { int timer_active; unsigned long timer_expires; const struct tcp_sock *tp = tcp_sk(sk); const struct inet_connection_sock *icsk = inet_csk(sk); const struct inet_sock *inet = inet_sk(sk); const struct fastopen_queue *fastopenq = &icsk->icsk_ac...
0
[ "CWE-284" ]
linux
ac6e780070e30e4c35bd395acfe9191e6268bdd3
19,383,111,970,274,783,000,000,000,000,000,000,000
60
tcp: take care of truncations done by sk_filter() With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT behavior. We ...
yang_check_ext_instance(struct lys_module *module, struct lys_ext_instance ***ext, uint size, void *parent, struct unres_schema *unres) { struct unres_ext *info; uint i; for (i = 0; i < size; ++i) { info = malloc(sizeof *info); LY_CHECK_ERR_RETURN(!info, LOGMEM(modul...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
247,003,519,681,436,650,000,000,000,000,000,000,000
24
yang parser BUGFIX double free Fixes #742
static ssize_t FindColor(PixelPacket *pixel) { register ssize_t i; for (i=0; i < 256; i++) if (ScaleQuantumToChar(GetPixelRed(pixel)) == PalmPalette[i][0] && ScaleQuantumToChar(GetPixelGreen(pixel)) == PalmPalette[i][1] && ScaleQuantumToChar(GetPixelBlue(pixel)) == PalmPalette[i][2]) ...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
288,576,410,457,222,120,000,000,000,000,000,000,000
12
Fix ultra rare but potential memory-leak
rgw::auth::s3::LDAPEngine::get_acl_strategy() const { //This is based on the assumption that the default acl strategy in // get_perms_from_aclspec, will take care. Extra acl spec is not required. return nullptr; }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
210,081,312,364,101,100,000,000,000,000,000,000,000
6
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
rleCompress (int inLength, const char in[], signed char out[]) { const char *inEnd = in + inLength; const char *runStart = in; const char *runEnd = in + 1; signed char *outWrite = out; while (runStart < inEnd) { while (runEnd < inEnd && *runStart == *runEnd && runEnd - runStart...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
84,211,597,931,868,830,000,000,000,000,000,000,000
55
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static inline bool cpu_has_vmx_ept_1g_page(void) { return vmx_capability.ept & VMX_EPT_1GB_PAGE_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
73,622,632,174,295,690,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
TEST_F(QuicServerTransportTest, StopSendingLossAfterStreamClosed) { server->getNonConstConn().ackStates.appDataAckState.nextPacketNum = 3; auto streamId = server->createBidirectionalStream().value(); server->getNonConstConn().streamManager->getStream(streamId); ShortHeader header( ProtectionType::KeyPhase...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
65,777,056,152,722,570,000,000,000,000,000,000,000
26
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
sctp_disposition_t sctp_sf_unk_chunk(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 *unk_chunk = arg; struct sctp_chunk *err_chunk; sctp_chunkhdr_t *hdr; SCTP_DEBUG_PRINTK("...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
66,980,017,148,550,110,000,000,000,000,000,000,000
66
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...
idr_cleanup(struct idr *idr) { free(idr->idrent_pool); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
168,623,383,890,603,260,000,000,000,000,000,000,000
4
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static u32 cryptinfo_get_crypt_type(char *cr_type) { if (!stricmp(cr_type, "ISMA") || !stricmp(cr_type, "iAEC")) return GF_CRYPT_TYPE_ISMA; else if (!stricmp(cr_type, "CENC AES-CTR") || !stricmp(cr_type, "cenc")) return GF_CRYPT_TYPE_CENC; else if (!stricmp(cr_type, "piff")) return GF_CRYPT_TYPE_PIFF; else if...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
66,747,437,915,246,620,000,000,000,000,000,000,000
24
fixed #2138
static struct dentry *__lookup_hash(struct qstr *name, struct dentry *base, struct nameidata *nd) { struct dentry *dentry; struct inode *inode; int err; inode = base->d_inode; /* * See if the low-level filesystem might want * to use its own hash.. */ if (base->d_op && base->d_op->d_hash) { err = base-...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
260,574,883,706,818,520,000,000,000,000,000,000,000
42
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) { if (func == NULL || mask == 0) { /* turn off hooks? */ mask = 0; func = NULL; } if (isLua(L->ci)) L->oldpc = L->ci->u.l.savedpc; L->hook = func; L->basehookcount = count; resethookcount(L); L->hookmask = cast_byte(m...
1
[ "CWE-703" ]
lua
a2195644d89812e5b157ce7bac35543e06db05e3
245,751,545,218,540,420,000,000,000,000,000,000,000
14
Fixed bug: invalid 'oldpc' when returning to a function The field 'L->oldpc' is not always updated when control returns to a function; an invalid value can seg. fault when computing 'changedline'. (One example is an error in a finalizer; control can return to 'luaV_execute' without executing 'luaD_poscall'.) Instead o...
rl_parse_and_bind (string) char *string; { char *funname, *kname; register int c, i; int key, equivalency, foundmod, foundsep; while (string && whitespace (*string)) string++; if (string == 0 || *string == 0 || *string == '#') return 0; /* If this is a parser directive, act on it. */ if (*...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
5,531,863,481,611,994,000,000,000,000,000,000,000
247
bash-4.4-rc2 release
static u8 *rtreeCheckGetNode(RtreeCheck *pCheck, i64 iNode, int *pnNode){ u8 *pRet = 0; /* Return value */ if( pCheck->rc==SQLITE_OK && pCheck->pGetNode==0 ){ pCheck->pGetNode = rtreeCheckPrepare(pCheck, "SELECT data FROM %Q.'%q_node' WHERE nodeno=?", pCheck->zDb, pCheck->zTa...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
252,825,249,436,885,800,000,000,000,000,000,000,000
31
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
static int setup_default_address_pool(Manager *m) { AddressPool *p; int r; assert(m); /* Add in the well-known private address ranges. */ r = address_pool_new_from_string(m, &p, AF_INET6, "fc00::", 7); if (r < 0) return r; r = address_pool_new_...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
103,657,775,122,006,270,000,000,000,000,000,000,000
26
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
char *ldbRedisProtocolToHuman_Status(sds *o, char *reply) { char *p = strchr(reply+1,'\r'); *o = sdscatrepr(*o,reply,p-reply); return p+2; }
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
153,188,892,779,658,750,000,000,000,000,000,000,000
6
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
BOOL rectangles_intersection(const RECTANGLE_16* r1, const RECTANGLE_16* r2, RECTANGLE_16* dst) { dst->left = MAX(r1->left, r2->left); dst->right = MIN(r1->right, r2->right); dst->top = MAX(r1->top, r2->top); dst->bottom = MIN(r1->bottom, r2->bottom); return (dst->left < dst->right) &&...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
161,745,734,869,939,230,000,000,000,000,000,000,000
9
Fixed #5645: realloc return handling
MagickExport void ResetImageProfileIterator(const Image *image) { assert(image != (Image *) NULL); assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->profiles == (SplayTreeInfo *) NULL) return...
0
[ "CWE-190" ]
ImageMagick
e9438e2a82d35b6657e908ff38ec0303f432b655
104,490,924,573,169,620,000,000,000,000,000,000,000
10
srs_compile_guarded(srs_t *srs, char *buf, int buflen, char *sendhost, char *senduser, const char *aliashost) { char *srshost; char *srsuser; char *srshash; int len; int ret; if ((strncasecmp(senduser, SRS1TAG, 4) == 0) && (strchr(srs_separators, senduser[4]) != NULL)) { /* Used as a temporar...
0
[ "CWE-400", "CWE-703", "CWE-834" ]
postsrsd
4733fb11f6bec6524bb8518c5e1a699288c26bac
132,942,705,993,323,900,000,000,000,000,000,000,000
67
SECURITY: Fix potential denial of service attack against PostSRSd I discovered that PostSRSd could be tricked into consuming a lot of CPU time with an SRS address that has an excessively long time stamp tag, e.g. SRS0=HHHH=TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT=0@example.com
PHPAPI int php_le_stream_context(void) { return le_stream_context; }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
67,462,397,964,000,490,000,000,000,000,000,000,000
4
- 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
PHP_METHOD(Phar, canCompress) { zend_long method = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &method) == FAILURE) { return; } phar_request_initialize(); switch (method) { case PHAR_ENT_COMPRESSED_GZ: if (PHAR_G(has_zlib)) { RETURN_TRUE; } else { RETURN_FALSE; } case PHAR_ENT_COMPRESSED_...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
240,139,717,780,027,300,000,000,000,000,000,000,000
30
Fix bug #71860: Require valid paths for phar filenames
static void get_request(GDHCPClient *dhcp_client, struct dhcp_packet *packet) { GDHCPOptionType type; GList *list, *value_list; char *option_value; uint8_t *option; uint8_t code; for (list = dhcp_client->request_list; list; list = list->next) { code = (uint8_t) GPOINTER_TO_INT(list->data); option = dhcp_get...
1
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
56,259,304,862,712,280,000,000,000,000,000,000,000
37
gdhcp: Avoid reading invalid data in dhcp_get_option
DU_stripLeadingSpaces(char *s) { int i, j, n; if (s == NULL) return; n = OFstatic_cast(int, strlen(s)); if (n == 0) return; if (!isspace(TO_UCHAR(s[0]))) return; /* no leading space */ /* first non-space */ for (i=0; i<n && isspace(TO_UCHAR(s[i])); i++) /* do nothing, just iterate ...
0
[ "CWE-476", "CWE-787" ]
dcmtk
5c14bf53fb42ceca12bbcc0016e8704b1580920d
317,648,122,027,138,500,000,000,000,000,000,000,000
23
Fixed possible NULL pointer dereference. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, union bpf_attr __user *uattr) { u64 start_time = ktime_get_ns(); struct bpf_verifier_env *env; struct bpf_verifier_log *log; int i, len, ret = -EINVAL; bool is_priv; /* no program is valid */ if (ARRAY_SIZE(bpf_verifier_ops) == 0) return -EINV...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
265,850,050,665,289,400,000,000,000,000,000,000,000
209
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
static int x509_get_ns_cert_type( unsigned char **p, const unsigned char *end, unsigned char *ns_cert_type) { int ret; mbedtls_x509_bitstring bs = { 0, 0, NULL }; if( ( ret = mbedtls_asn1_get_bitstring( p, end, &bs ) ) != 0 ) ...
0
[ "CWE-287", "CWE-284" ]
mbedtls
d15795acd5074e0b44e71f7ede8bdfe1b48591fc
208,662,071,450,506,000,000,000,000,000,000,000,000
18
Improve behaviour on fatal errors If we didn't walk the whole chain, then there may be any kind of errors in the part of the chain we didn't check, so setting all flags looks like the safe thing to do.
_pixops_composite_color (guchar *dest_buf, int dest_width, int dest_height, int dest_rowstride, int dest_channels, gboolean dest_has_alpha, const guchar *src_buf, int src_width, int src_heig...
0
[]
gdk-pixbuf
ffec86ed5010c5a2be14f47b33bcf4ed3169a199
289,358,029,589,394,830,000,000,000,000,000,000,000
59
pixops: Be more careful about integer overflow Our loader code is supposed to handle out-of-memory and overflow situations gracefully, reporting errors instead of aborting. But if you load an image at a specific size, we also execute our scaling code, which was not careful enough about overflow in some places. This c...
static int snd_pcm_pre_resume(struct snd_pcm_substream *substream, snd_pcm_state_t state) { struct snd_pcm_runtime *runtime = substream->runtime; if (!(runtime->info & SNDRV_PCM_INFO_RESUME)) return -ENOSYS; runtime->trigger_master = substream; return 0; }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
173,381,464,916,427,170,000,000,000,000,000,000,000
9
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
void resetInput(const char*fileName) { // do nothing: filename doesn't need to be 'reset' between calls }
0
[ "CWE-787" ]
openexr
ae6d203892cc9311917a7f4f05354ef792b3e58e
184,441,665,214,060,000,000,000,000,000,000,000,000
4
Handle xsampling and bad seekg() calls in exrcheck (#872) * fix exrcheck xsampling!=1 Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * fix handling bad seekg() calls in exrcheck Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> * fix deeptile detection in multipart files Signed-off-by: Peter Hillma...
int utf32_to_utf8(unicode_t u, u8 *s, int maxlen) { unsigned long l; int c, nc; const struct utf8_table *t; if (!s) return 0; l = u; if (l > UNICODE_MAX || (l & SURROGATE_MASK) == SURROGATE_PAIR) return -1; nc = 0; for (t = utf8_table; t->cmask && maxlen; t++, maxlen--) { nc++; if (l <= t->lmask) { ...
0
[ "CWE-119", "CWE-787" ]
linux
0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd
284,047,150,066,674,050,000,000,000,000,000,000,000
29
NLS: improve UTF8 -> UTF16 string conversion routine The utf8s_to_utf16s conversion routine needs to be improved. Unlike its utf16s_to_utf8s sibling, it doesn't accept arguments specifying the maximum length of the output buffer or the endianness of its 16-bit output. This patch (as1501) adds the two missing argumen...
static void encode_seq_header(VC2EncContext *s) { avpriv_align_put_bits(&s->pb); encode_parse_params(s); put_vc2_ue_uint(&s->pb, s->base_vf); encode_source_params(s); put_vc2_ue_uint(&s->pb, s->interlaced); /* Frames or fields coding */ }
0
[ "CWE-125" ]
FFmpeg
94e538aebbc9f9c529e8b1f2eda860cfb8c473b1
287,839,329,041,225,020,000,000,000,000,000,000,000
8
vc2enc_dwt: pad the temporary buffer by the slice size Since non-Haar wavelets need to look into pixels outside the frame, we need to pad the buffer. The old factor of two seemed to be a workaround that fact and only padded to the left and bottom. This correctly pads by the slice size and as such reduces memory usage ...
static void run_hrtimer_softirq(struct softirq_action *h) { struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); spin_lock_irq(&cpu_base->lock); while (!list_empty(&cpu_base->cb_pending)) { enum hrtimer_restart (*fn)(struct hrtimer *); struct hrtimer *timer; int restart; timer = list_entry(c...
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
138,057,623,280,507,080,000,000,000,000,000,000,000
43
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
ccbaGetCount(CCBORDA *ccba) { PROCNAME("ccbaGetCount"); if (!ccba) return ERROR_INT("ccba not defined", procName, 0); return ccba->n; }
0
[ "CWE-125" ]
leptonica
8d6e1755518cfb98536d6c3daf0601f226d16842
13,543,206,983,900,840,000,000,000,000,000,000,000
10
Issue 23433 in oss-fuzz: Heap-buffer-overflow in findNextBorderPixel() * Check pix boundary when looking for the next pixel.
int ha_maria::optimize(THD * thd, HA_CHECK_OPT *check_opt) { int error; HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param); if (!file || !param) return HA_ADMIN_INTERNAL_ERROR; maria_chk_init(param); param->thd= thd; param->op_name= "optimize"; param->testflag= (check_opt->flags | T_SILENT | T_F...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
211,334,414,228,108,750,000,000,000,000,000,000,000
25
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
static int do_check_common(struct bpf_verifier_env *env, int subprog) { struct bpf_verifier_state *state; struct bpf_reg_state *regs; int ret, i; env->prev_linfo = NULL; env->pass_cnt++; state = kzalloc(sizeof(struct bpf_verifier_state), GFP_KERNEL); if (!state) return -ENOMEM; state->curframe = 0; state->...
0
[]
linux
294f2fc6da27620a506e6c050241655459ccd6bd
284,674,761,242,913,770,000,000,000,000,000,000,000
71
bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds() Currently, for all op verification we call __red_deduce_bounds() and __red_bound_offset() but we only call __update_reg_bounds() in bitwise ops. However, we could benefit from calling __update_reg_bounds() in BPF_ADD, BPF_SUB, and BPF_MUL case...
LJ_NOINLINE void lj_err_run(lua_State *L) { ptrdiff_t ef = finderrfunc(L); if (ef) { TValue *errfunc = restorestack(L, ef); TValue *top = L->top; lj_trace_abort(G(L)); if (!tvisfunc(errfunc) || L->status == LUA_ERRERR) { setstrV(L, top-1, lj_err_str(L, LJ_ERR_ERRERR)); lj_err_throw(L, LU...
1
[ "CWE-125" ]
LuaJIT
e296f56b825c688c3530a981dc6b495d972f3d01
295,611,232,396,518,350,000,000,000,000,000,000,000
19
Call error function on rethrow after trace exit.
static MagickBooleanType ReadPSDChannelPixels(Image *image, const size_t channels,const size_t row,const ssize_t type, const unsigned char *pixels,ExceptionInfo *exception) { Quantum pixel; register const unsigned char *p; register Quantum *q; register ssize_t x; size_t packet_size...
0
[ "CWE-125" ]
ImageMagick
30eec879c8b446b0ea9a3bb0da1a441cc8482bc4
333,617,978,802,871,460,000,000,000,000,000,000,000
64
Moved check for https://github.com/ImageMagick/ImageMagick/issues/92.
lookup_cached_dir_by_fp(const char *fp) { cached_dir_t *d = NULL; if (tor_digest_is_zero(fp) && cached_consensuses) { d = strmap_get(cached_consensuses, "ns"); } else if (memchr(fp, '\0', DIGEST_LEN) && cached_consensuses && (d = strmap_get(cached_consensuses, fp))) { /* this here interface is ...
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
87,540,739,419,039,170,000,000,000,000,000,000,000
11
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
Interval IndexBoundsBuilder::makeRangeInterval(const string& start, const string& end, BoundInclusion boundInclusion) { BSONObjBuilder bob; bob.append("", start); bob.append("", end); return makeRangeInterval(b...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
52,657,687,516,943,370,000,000,000,000,000,000,000
8
SERVER-44377 generate correct plan for indexed inequalities to null
parse_broadcast(char *line) { /* Syntax : broadcast <interval> <broadcast-IP-addr> [<port>] */ NTP_Broadcast_Destination *destination; int port; int interval; char *p; IPAddr ip; p = line; line = CPS_SplitWord(line); if (sscanf(p, "%d", &interval) != 1) { command_parse_error(); return; }...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
65,553,953,245,274,890,000,000,000,000,000,000,000
43
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
njs_vmcode_try_end(njs_vm_t *vm, njs_value_t *invld, njs_value_t *offset) { njs_frame_t *frame; njs_exception_t *e; frame = (njs_frame_t *) vm->top_frame; e = frame->exception.next; if (e == NULL) { frame->exception.catch = NULL; } else { frame->exception = *e; n...
0
[ "CWE-703", "CWE-754" ]
njs
222d6fdcf0c6485ec8e175f3a7b70d650c234b4e
139,257,112,133,686,740,000,000,000,000,000,000,000
18
Fixed njs_vmcode_interpreter() when "toString" conversion fails. Previously, while interpreting a user function, njs_vmcode_interpreter() might return prematurely when an error happens. This is not correct because the current frame has to be unwound (or exception caught) first. The fix is exit through only 5 appropr...
static inline MagickSizeType ScaleQuantumToLongLong(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((MagickSizeType) quantum); #else if (quantum <= 0.0) return(0); if (quantum >= 18446744073709551615.0) return(MagickULLConstant(18446744073709551615)); return((MagickSizeType) (quant...
1
[ "CWE-190" ]
ImageMagick
95d4e94e0353e503b71a53f5e6fad173c7c70c90
153,040,056,296,765,820,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1751
int ioat_dma_setup_interrupts(struct ioatdma_device *device) { struct ioat_chan_common *chan; struct pci_dev *pdev = device->pdev; struct device *dev = &pdev->dev; struct msix_entry *msix; int i, j, msixcnt; int err = -EINVAL; u8 intrctrl = 0; if (!strcmp(ioat_interrupt_style, "msix")) goto msix; if (!strcm...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
239,394,694,915,922,930,000,000,000,000,000,000,000
83
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
bool testUnescapingHelper(const wchar_t * input, const wchar_t * output, bool plusToSpace = false, UriBreakConversion breakConversion = URI_BR_DONT_TOUCH) { wchar_t * working = new wchar_t[URI_STRLEN(input) + 1]; wcscpy(working, input); const wchar_t * newTermZero = uriUnescapeInPlaceExW(working, plusToSp...
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
130,917,701,115,529,500,000,000,000,000,000,000,000
11
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
gstd_close(void *the_tok) { struct gstd_tok *tok = the_tok; OM_uint32 min; gss_delete_sec_context(&min, &tok->gstd_ctx, GSS_C_NO_BUFFER); if (tok->gstd_inbuf.length > 0) gss_release_buffer(&min, &tok->gstd_inbuf); close(tok->gstd_fd); return 0; }
0
[ "CWE-400", "CWE-703" ]
knc
f237f3e09ecbaf59c897f5046538a7b1a3fa40c1
1,262,708,681,926,492,100,000,000,000,000,000,000
11
knc: fix a couple of memory leaks. One of these can be remotely triggered during the authentication phase which leads to a remote DoS possibility. Pointed out by: Imre Rad <radimre83@gmail.com>
static void ext4_xattr_update_super_block(handle_t *handle, struct super_block *sb) { if (ext4_has_feature_xattr(sb)) return; BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "get_write_access"); if (ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh) == 0) { ext4_set_feature_xattr(sb); ext4_handle_dirty_super(h...
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
274,374,804,123,687,470,000,000,000,000,000,000,000
12
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
find_oldest_idle_connection(struct SessionHandle *data) { struct conncache *bc = data->state.conn_cache; struct curl_hash_iterator iter; struct curl_llist_element *curr; struct curl_hash_element *he; long highscore=-1; long score; struct timeval now; struct connectdata *conn_candidate = NULL; struct c...
0
[ "CWE-287" ]
curl
d41dcba4e9b69d6b761e3460cc6ae7e8fd8f621f
67,684,230,853,443,250,000,000,000,000,000,000,000
43
NTLM: Fix ConnectionExists to compare Proxy credentials Proxy NTLM authentication should compare credentials when re-using a connection similar to host authentication, as it authenticate the connection. Example: curl -v -x http://proxy:port http://host/ -U good_user:good_pwd --proxy-ntlm --next -x http://proxy:port...
void account_steal_time(struct task_struct *p, cputime_t steal) { struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; cputime64_t tmp = cputime_to_cputime64(steal); struct rq *rq = this_rq(); if (p == rq->idle) { p->stime = cputime_add(p->stime, steal); if (atomic_read(&rq->nr_iowait) > 0) cpustat->io...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
127,478,672,665,318,460,000,000,000,000,000,000,000
15
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
stf_status process_informational_ikev2(struct msg_digest *md) { /* verify that there is in fact an encrypted payload */ if (!md->chain[ISAKMP_NEXT_v2E]) { libreswan_log( "Ignoring informational exchange outside encrypted payload (rfc5996 section 1.4)"); return STF_IGNORE; } /* decrypt things. */ { stf_st...
0
[ "CWE-20" ]
libreswan
2899351224fe2940aec37d7656e1e392c0fe07f0
149,046,566,125,901,800,000,000,000,000,000,000,000
603
SECURITY: Properly handle IKEv2 I1 notification packet without KE payload
modprobe_ipvs(void) { char *argv[] = { "/sbin/modprobe", "-s", "--", "ip_vs", NULL }; int child; int status; int rc; char *modprobe = get_modprobe(); struct sigaction act, old_act; if (modprobe) argv[0] = modprobe; act.sa_handler = SIG_DFL; sigemptyset(&act.sa_mask); act.sa_flags = 0; sigaction ( SIGCHL...
1
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
305,526,940,301,260,100,000,000,000,000,000,000,000
44
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
tm_create_event(tm_event_t *event) { if (!init_done) return TM_BADINIT; return TM_ENOTIMPLEMENTED; }
0
[ "CWE-264" ]
torque
f2f4c950f3d461a249111c8826da3beaafccace9
57,149,359,337,183,730,000,000,000,000,000,000,000
7
TRQ-2885 - limit tm_adopt() to only adopt a session id that is owned by the calling user.
static double mp_self_increment(_cimg_math_parser& mp) { return ++_mp_arg(1); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
288,784,752,532,883,000,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.
virtual ~Rowid_seq_cursor() { if (ref_buffer) my_free(ref_buffer); if (io_cache) { end_slave_io_cache(io_cache); my_free(io_cache); io_cache= NULL; } }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
254,031,992,195,046,150,000,000,000,000,000,000,000
11
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
SPL_METHOD(SplFileObject, fputcsv) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char delimiter = intern->u.file.delimiter, enclosure = intern->u.file.enclosure, escape = intern->u.file.escape; char *delim = NULL, *enclo = NULL, *esc = NULL; int d_len =...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
32,279,706,884,944,360,000,000,000,000,000,000,000
40
Fix bug #72262 - do not overflow int
static int process_item(Item *i) { int r, q, p, t = 0; _cleanup_free_ char *prefix = NULL; assert(i); if (i->done) return 0; i->done = true; prefix = malloc(strlen(i->path) + 1); if (!prefix) return log_oom(); PATH_FORE...
0
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
314,477,407,714,931,250,000,000,000,000,000,000,000
40
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
u32 get_random_u32(void) { u32 ret; unsigned long flags; struct batched_entropy *batch; static void *previous; warn_unseeded_randomness(&previous); batch = raw_cpu_ptr(&batched_entropy_u32); spin_lock_irqsave(&batch->batch_lock, flags); if (batch->position % ARRAY_SIZE(batch->entropy_u32) == 0) { extract_cr...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
81,047,819,136,395,820,000,000,000,000,000,000,000
19
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'...
static int cmd_an(RCore *core, bool use_json, const char *name) { ut64 off = core->offset; RAnalOp op; char *q = NULL; ut64 tgt_addr = UT64_MAX; if (use_json) { r_cons_print ("["); } r_anal_op (core->anal, &op, off, core->block + off - core->offset, 32, R_ANAL_OP_MASK_ALL); tgt_addr = op.jump != UT64_MA...
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
275,963,244,407,928,100,000,000,000,000,000,000,000
85
Fix #9943 - Invalid free on RAnal.avr
yaffsfs_dir_open_meta(TSK_FS_INFO *a_fs, TSK_FS_DIR ** a_fs_dir, TSK_INUM_T a_addr) { TSK_FS_DIR *fs_dir; TSK_FS_NAME *fs_name; YAFFSFS_INFO *yfs = (YAFFSFS_INFO *)a_fs; int should_walk_children = 0; uint32_t obj_id; uint32_t ver_number; if (a_addr < a_fs->first_inum || a_addr > a_f...
0
[ "CWE-125", "CWE-787" ]
sleuthkit
459ae818fc8dae717549810150de4d191ce158f1
218,448,705,481,900,860,000,000,000,000,000,000,000
123
Fix stack buffer overflow in yaffsfs_istat Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str.
static int ethtool_set_ringparam(struct net_device *dev, void __user *useraddr) { struct ethtool_ringparam ringparam; if (!dev->ethtool_ops->set_ringparam) return -EOPNOTSUPP; if (copy_from_user(&ringparam, useraddr, sizeof(ringparam))) return -EFAULT; return dev->ethtool_ops->set_ringparam(dev, &ringparam);...
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
18,064,335,414,146,710,000,000,000,000,000,000,000
12
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
int ssl3_get_client_hello(SSL *s) { int i,j,ok,al,ret= -1; unsigned int cookie_len; long n; unsigned long id; unsigned char *p,*d,*q; SSL_CIPHER *c; #ifndef OPENSSL_NO_COMP SSL_COMP *comp=NULL; #endif STACK_OF(SSL_CIPHER) *ciphers=NULL; /* We do this so that we will respond with our native type. * If we ar...
0
[ "CWE-326", "CWE-310" ]
openssl
bc8923b1ec9c467755cd86f7848c50ee8812e441
299,529,237,399,263,300,000,000,000,000,000,000,000
513
Fix for CVE-2014-0224 Only accept change cipher spec when it is expected instead of at any time. This prevents premature setting of session keys before the master secret is determined which an attacker could use as a MITM attack. Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue and providing the ...
void tipc_link_set_queue_limits(struct tipc_link *l, u32 min_win, u32 max_win) { int max_bulk = TIPC_MAX_PUBL / (l->mtu / ITEM_SIZE); l->min_win = min_win; l->ssthresh = max_win; l->max_win = max_win; l->window = min_win; l->backlog[TIPC_LOW_IMPORTANCE].limit = min_win * 2; l->backlog[TIPC_MEDIUM_IMPORTANC...
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
36,245,126,384,803,145,000,000,000,000,000,000,000
14
tipc: improve size validations for received domain records The function tipc_mon_rcv() allows a node to receive and process domain_record structs from peer nodes to track their views of the network topology. This patch verifies that the number of members in a received domain record does not exceed the limit defined b...
GIT_INLINE(bool) conflict_pathspec_match( checkout_data *data, git_iterator *workdir, git_vector *pathspec, const git_index_entry *ancestor, const git_index_entry *ours, const git_index_entry *theirs) { /* if the pathspec matches ours *or* theirs, proceed */ if (ours && git_pathspec__match(pathspec, ours->path,...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
306,405,279,230,799,350,000,000,000,000,000,000,000
26
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
static void mdesc_get_node_ops(const char *node_name, mdesc_node_info_get_f *get_info_f, mdesc_node_info_rel_f *rel_info_f, mdesc_node_match_f *match_f) { int i; if (get_info_f) *get_info_f = NULL; if (rel_info_f) *rel_info_f = NULL; if (match_f) *match_f = NULL; if (!node_n...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
194,579,391,442,450,920,000,000,000,000,000,000,000
34
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
\param reinit_path Force path to be recalculated (may take some time). \return Path where temporary files can be saved. **/ inline const char* temporary_path(const char *const user_path, const bool reinit_path) { #define _cimg_test_temporary_path(p) \ if (!path_found) { \ cimg_snprin...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
187,144,911,384,589,140,000,000,000,000,000,000,000
48
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void license(void) { print_output("lrz version %s\n", PACKAGE_VERSION); print_output("Copyright (C) Con Kolivas 2006-2016\n"); print_output("Based on rzip "); print_output("Copyright (C) Andrew Tridgell 1998-2003\n\n"); print_output("This is free software. You may redistribute copies of it under the terms ...
0
[ "CWE-703", "CWE-787" ]
lrzip
5faf80cd53ecfd16b636d653483144cd12004f46
71,783,667,584,991,010,000,000,000,000,000,000,000
10
Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello.
static inline struct sock *unix_find_socket_byname(struct sockaddr_un *sunname, int len, int type, unsigned hash) { struct sock *s; spin_lock(&unix_table_lock); s = __unix_find_socket_byname(sunname, len, type, hash); if (s) sock_hold(s); spin_unlock(&unix_table_lock); return s; }
0
[]
linux-2.6
1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9
239,111,473,362,592,400,000,000,000,000,000,000,000
13
[AF_UNIX]: Rewrite garbage collector, fixes race. Throw out the old mark & sweep garbage collector and put in a refcounting cycle detecting one. The old one had a race with recvmsg, that resulted in false positives and hence data loss. The old algorithm operated on all unix sockets in the system, so any additional l...
m4_regexp (struct obstack *obs, int argc, token_data **argv) { const char *victim; /* first argument */ const char *regexp; /* regular expression */ const char *repl; /* replacement string */ struct re_pattern_buffer buf; /* compiled regular expression */ struct re_registers regs; /* for subexpression mat...
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
29,223,973,710,942,390,000,000,000,000,000,000,000
52
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
int main(int argc, char **argv) { MY_INIT(argv[0]); /* ** Check out the args */ if (get_options(&argc, &argv)) { my_end(my_end_arg); exit(EX_USAGE); } if (dbConnect(current_host, current_user, opt_password)) exit(EX_MYSQLERR); if (!opt_write_binlog) { if (disable_binlog()) { f...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
65,190,076,826,792,180,000,000,000,000,000,000,000
70
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
FrameFactory::~FrameFactory() { delete d; }
0
[ "CWE-434", "CWE-352" ]
taglib
cb9f07d9dcd791b63e622da43f7b232adaec0a9a
89,642,902,655,886,740,000,000,000,000,000,000,000
4
Don't assume TDRC is an instance of TextIdentificationFrame (#831) If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame which causes problems in rebuildAggregateFrames() when it is assumed that TDRC is a TextIdentificationFrame
ZEND_INI_MH(OnUpdateEncode) { if (new_value && ZSTR_LEN(new_value)) { const zend_encoding **return_list; size_t return_size; if (FAILURE == zend_multibyte_parse_encoding_list(ZSTR_VAL(new_value), ZSTR_LEN(new_value), &return_list, &return_size, 0)) { php_error_docref(NULL, E_WARNING, "Illegal encoding ignore...
0
[ "CWE-416" ]
php-src
3fdde65617e9f954e2c964768aac8831005497e5
43,684,262,298,985,550,000,000,000,000,000,000,000
14
Fix #76409: heap use after free in _php_stream_free We must not close the stream in exif_read_from_impl(), since it is the responsibility of the (caller's) caller to do so, if it actually opened the stream. We simplify the reproduce script, which is actually about supplying a path to a directory (opposed to a regular...
int fixup_bug(struct pt_regs *regs, int trapnr) { if (trapnr != X86_TRAP_UD) return 0; switch (report_bug(regs->ip, regs)) { case BUG_TRAP_TYPE_NONE: case BUG_TRAP_TYPE_BUG: break; case BUG_TRAP_TYPE_WARN: regs->ip += LEN_UD2; return 1; } return 0; }
0
[ "CWE-362", "CWE-284" ]
linux
d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9
257,182,853,338,710,460,000,000,000,000,000,000,000
17
x86/entry/64: Don't use IST entry for #BP stack There's nothing IST-worthy about #BP/int3. We don't allow kprobes in the small handful of places in the kernel that run at CPL0 with an invalid stack, and 32-bit kernels have used normal interrupt gates for #BP forever. Furthermore, we don't allow kprobes in places tha...
store_local (VerifyContext *ctx, guint32 arg) { ILStackDesc *value; if (arg >= ctx->num_locals) { ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Method doesn't have local var %d at 0x%04x", arg + 1, ctx->ip_offset)); return; } /*TODO verify definite assigment */ if (check_underflow (ctx, 1)) { value = stack_pop...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
229,550,010,282,036,870,000,000,000,000,000,000,000
24
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 opj_j2k_setup_decoding (opj_j2k_t *p_j2k) { /* preconditions*/ assert(p_j2k != 00); opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_decode_tiles); /* DEVELOPER CORNER, add your custom procedures */ }
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
137,878,795,343,236,300,000,000,000,000,000,000,000
9
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { if ((scalar != NULL) && (num == 0)) { /* In this case we want to compute scalar * GeneratorPoint: * this codepath i...
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
21,075,151,985,458,596,000,000,000,000,000,000,000
400
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
static void opj_j2k_read_int16_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data; OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data; OPJ_UINT32 i; OPJ_UINT32 l_temp; for (i=0;i<p_nb_elem;++i) { ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
230,231,308,655,889,370,000,000,000,000,000,000,000
15
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
emacs_tags_parse_line(char_u *lbuf, tagptrs_T *tagp) { char_u *p_7f; char_u *p; // There are two formats for an emacs tag line: // 1: struct EnvBase ^?EnvBase^A139,4627 // 2: #define ARPB_WILD_WORLD ^?153,5194 p_7f = vim_strchr(lbuf, 0x7f); if (p_7f == NULL) { etag_fail: if (vim_strch...
0
[ "CWE-416" ]
vim
adce965162dd89bf29ee0e5baf53652e7515762c
304,225,237,619,428,250,000,000,000,000,000,000,000
58
patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer Problem: Using freed memory when 'tagfunc' deletes the buffer. Solution: Make a copy of the tag name.
cachedb_intcache_store(struct module_qstate* qstate) { uint32_t store_flags = qstate->query_flags; if(qstate->env->cfg->serve_expired) store_flags |= DNSCACHE_STORE_ZEROTTL; if(!qstate->return_msg) return; (void)dns_cache_store(qstate->env, &qstate->qinfo, qstate->return_msg->rep, 0, qstate->prefetch_leeway,...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
42,144,158,182,774,080,000,000,000,000,000,000,000
12
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
Item *Item_float::clone_item(THD *thd) { return new (thd->mem_root) Item_float(thd, name.str, value, decimals, max_length); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
127,002,590,997,630,900,000,000,000,000,000,000,000
5
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static void tg3_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct tg3 *tp = netdev_priv(dev); if (tg3_flag(tp, WOL_CAP) && device_can_wakeup(&tp->pdev->dev)) wol->supported = WAKE_MAGIC; else wol->supported = 0; wol->wolopts = 0; if (tg3_flag(tp, WOL_ENABLE) && device_can_wakeup(&tp->pdev-...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
155,634,401,069,762,150,000,000,000,000,000,000,000
13
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
writeBufferToSeparateStrips (TIFF* out, uint8* buf, uint32 length, uint32 width, uint16 spp, struct dump_opts *dump) { uint8 *src; uint16 bps; uint32 row, nrows, rowsize, rowsperstrip; uint32 bytes_per_sample; tsample_t s; tstrip_t strip = 0; tsize_t stripsize = TIFFStripSize(o...
1
[ "CWE-125" ]
libtiff
21d39de1002a5e69caa0574b2cc05d795d6fbfad
255,527,123,478,538,320,000,000,000,000,000,000,000
60
* tools/tiffcrop.c: fix multiple uint32 overflows in writeBufferToSeparateStrips(), writeBufferToContigTiles() and writeBufferToSeparateTiles() that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
static int get_classes_callback(void *k, void *d, void *args) { struct class_datum *datum = d; char *name = k, **classes = args; int value = datum->value - 1; classes[value] = kstrdup(name, GFP_ATOMIC); if (!classes[value]) return -ENOMEM; return 0; }
0
[ "CWE-20" ]
linux
2172fa709ab32ca60e86179dc67d0857be8e2c98
225,879,383,272,030,900,000,000,000,000,000,000,000
12
SELinux: Fix kernel BUG on empty security contexts. Setting an empty security context (length=0) on a file will lead to incorrectly dereferencing the type and other fields of the security context structure, yielding a kernel BUG. As a zero-length security context is never valid, just reject all such security contexts...
cmd_spec_header (const char *com, const char *val, void *place_ignored _GL_UNUSED) { /* Empty value means reset the list of headers. */ if (*val == '\0') { free_vec (opt.user_headers); opt.user_headers = NULL; return true; } if (!check_user_specified_header (val)) { fprintf (s...
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
73,479,408,594,989,210,000,000,000,000,000,000,000
19
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) { TAG *tStk; OPEN_INTERNAL_ENTITY *openEntityList; if (parser == NULL) return XML_FALSE; if (parentParser) return XML_FALSE; /* move tagStack to freeTagList */ tStk = tagStack; while (tStk) { TAG *tag = tStk; tStk = tStk-...
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
246,022,280,664,322,470,000,000,000,000,000,000,000
38
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
DEFUN_DEPRECATED (neighbor_transparent_as, neighbor_transparent_as_cmd, NEIGHBOR_CMD "transparent-as", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Do not append my AS number even peer is EBGP peer\n") { return peer_af_flag_set_vty (vty, argv[0], bgp_node_afi (vty), bgp_node_safi (vty), PEE...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
207,674,287,067,591,360,000,000,000,000,000,000,000
11
[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...
void lodepng_color_profile_init(LodePNGColorProfile* profile) { profile->colored = 0; profile->key = 0; profile->alpha = 0; profile->key_r = profile->key_g = profile->key_b = 0; profile->numcolors = 0; profile->bits = 1; }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
9,033,501,402,653,985,000,000,000,000,000,000,000
9
Fixed #5645: realloc return handling
CImg<T> get_opening(const CImg<t>& kernel, const unsigned int boundary_conditions=1, const bool is_real=false) const { const int sx = kernel.width(), sy = kernel.height(), sz = kernel.depth(); if (is_empty() || (sx<=1 && sy<=1 && sz<=1)) return *this; const int sx1 = (int)(...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
69,906,663,260,292,010,000,000,000,000,000,000,000
21
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool asn1_write_OID(struct asn1_data *data, const char *OID) { DATA_BLOB blob; if (!asn1_push_tag(data, ASN1_OID)) return false; if (!ber_write_OID_String(NULL, &blob, OID)) { data->has_error = true; return false; } if (!asn1_write(data, blob.data, blob.length)) { data_blob_free(&blob); data->has_error ...
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
129,295,240,206,477,140,000,000,000,000,000,000,000
19
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
void merge(_cimg_math_parser& mp) { if (&mp==this) return; cimg_rofY(mp.memmerge,k) { const unsigned int pos = (unsigned int)mp.memmerge(0,k), siz = (unsigned int)mp.memmerge(1,k), iop = (unsigned int)mp.memmerge(2,k); if (!siz) switch (iop) ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
121,267,746,747,247,340,000,000,000,000,000,000,000
66
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static LRESULT APIENTRY _handle_events(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) { #ifdef _WIN64 CImgDisplay *const disp = (CImgDisplay*)GetWindowLongPtr(window,GWLP_USERDATA); #else CImgDisplay *const disp = (CImgDisplay*)GetWindowLong(window,GWL_USERDATA); #endif MSG st_msg; sw...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
220,335,754,541,964,130,000,000,000,000,000,000,000
117
Fix other issues in 'CImg<T>::load_bmp()'.
static int skcipher_done_slow(struct skcipher_walk *walk, unsigned int bsize) { u8 *addr; addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); addr = skcipher_get_spot(addr, bsize); scatterwalk_copychunks(addr, &walk->out, bsize, (walk->flags & SKCIPHER_WALK_PHYS) ? 2 : 1); return 0; }
0
[ "CWE-476", "CWE-703" ]
linux
9933e113c2e87a9f46a40fde8dafbf801dca1ab9
122,826,189,546,092,480,000,000,000,000,000,000,000
10
crypto: skcipher - Add missing API setkey checks The API setkey checks for key sizes and alignment went AWOL during the skcipher conversion. This patch restores them. Cc: <stable@vger.kernel.org> Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...") Reported-by: Baozeng <sploving1@gmail.com> Signed-of...
void do_delimiter(struct st_command* command) { char* p= command->first_argument; DBUG_ENTER("do_delimiter"); DBUG_PRINT("enter", ("first_argument: %s", command->first_argument)); while (*p && my_isspace(charset_info, *p)) p++; if (!(*p)) die("Can't set empty delimiter"); delimiter_length= strmak...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
309,138,717,433,553,050,000,000,000,000,000,000,000
18
mysqltest: don't eat new lines in --exec pass them through as is
static int oidc_check_userid_openidc(request_rec *r, oidc_cfg *c) { if (oidc_get_redirect_uri(r, c) == NULL) { oidc_error(r, "configuration error: the authentication type is set to \"" OIDC_AUTH_TYPE_OPENID_CONNECT "\" but " OIDCRedirectURI " has not been set"); return HTTP_INTERNAL_SERVER_ERROR; } /* chec...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
283,218,533,163,853,260,000,000,000,000,000,000,000
105
Add a function to escape Javascript characters