func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int keyring_gc_check_iterator(const void *object, void *iterator_data) { const struct key *key = keyring_ptr_to_key(object); time_t *limit = iterator_data; key_check(key); return key_is_dead(key, *limit); }
0
[ "CWE-476" ]
linux
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
6,519,183,374,151,509,000,000,000,000,000,000,000
8
KEYS: Remove key_type::match in favour of overriding default by match_preparse A previous patch added a ->match_preparse() method to the key type. This is allowed to override the function called by the iteration algorithm. Therefore, we can just set a default that simply checks for an exact match of the key descripti...
input_init(struct window_pane *wp) { struct input_ctx *ictx; ictx = wp->ictx = xcalloc(1, sizeof *ictx); ictx->input_space = INPUT_BUF_START; ictx->input_buf = xmalloc(INPUT_BUF_START); ictx->since_ground = evbuffer_new(); if (ictx->since_ground == NULL) fatalx("out of memory"); evtimer_set(&ictx->timer, i...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
135,566,277,941,545,630,000,000,000,000,000,000,000
17
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
void ConnectionManagerImpl::ActiveStream::onAboveWriteBufferHighWatermark() { ENVOY_STREAM_LOG(debug, "Disabling upstream stream due to downstream stream watermark.", *this); filter_manager_.callHighWatermarkCallbacks(); }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
64,101,452,501,230,710,000,000,000,000,000,000,000
4
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
inline void DepthwiseConvPerChannel( const DepthwiseParams& params, const int32* output_multiplier, const int32* output_shift, const RuntimeShape& input_shape, const int8* input_data, const RuntimeShape& filter_shape, const int8* filter_data, const RuntimeShape& bias_shape, const int32* bias_data, c...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
103,041,820,814,686,920,000,000,000,000,000,000,000
54
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
setint(struct tbl *vq, mksh_ari_t n) { if (!(vq->flag&INTEGER)) { struct tbl *vp = &vtemp; vp->flag = (ISSET|INTEGER); vp->type = 0; vp->areap = ATEMP; vp->val.i = n; /* setstr can't fail here */ setstr(vq, str_val(vp), KSH_RETURN_ERROR); } else vq->val.i = n; vq->flag |= ISSET; if ((vq->flag&SPECIA...
0
[]
mksh
de53d2df1c3b812c262cc1bddbfe0b3bfc25c14b
289,119,925,163,787,140,000,000,000,000,000,000,000
16
SECURITY: do not permit += from environment either this makes our environment filter/sanitisation complete
KillRing() : size(0), index(0), lastAction(actionOther) { theRing.reserve(capacity); }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
134,506,743,936,641,140,000,000,000,000,000,000,000
3
SERVER-25335 avoid group and other permissions when creating .dbshell history file
BOOL update_write_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2, BOOL compressed, UINT16* flags) { BOOL rc; BYTE bitsPerPixelId; if (!Stream_EnsureRemainingCapacity( s, update_approximate_cache_bitmap_v2_order(cache_bitmap_v2, compressed, f...
0
[ "CWE-125" ]
FreeRDP
b8beb55913471952f92770c90c372139d78c16c0
266,292,177,709,462,140,000,000,000,000,000,000,000
71
Fixed OOB read in update_read_cache_bitmap_v3_order CVE-2020-11096 thanks @antonio-morales for finding this.
double Ordered_key::null_selectivity() { /* We should not be processing empty tables. */ DBUG_ASSERT(tbl->file->stats.records); return (1 - (double) null_count / (double) tbl->file->stats.records); }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
211,834,797,162,253,840,000,000,000,000,000,000,000
6
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
static void digi_disconnect(struct usb_serial *serial) { int i; /* stop reads and writes on all ports */ for (i = 0; i < serial->type->num_ports + 1; i++) { usb_kill_urb(serial->port[i]->read_urb); usb_kill_urb(serial->port[i]->write_urb); } }
0
[ "CWE-703" ]
linux
5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f
19,364,813,026,155,190,000,000,000,000,000,000,000
10
USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <ONeukum@suse.com> [johan: fix OOB endpoint check and add error messages ] Cc: stab...
gsm_xsmp_server_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GsmXsmpServer *self; self = GSM_XSMP_SERVER (object); switch (prop_id) { case PROP_CL...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
213,417,050,519,245,900,000,000,000,000,000,000,000
18
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
ut64 PE_(r_bin_pe_get_image_base)(struct PE_(r_bin_pe_obj_t)* bin) { ut64 imageBase = 0; if (!bin || !bin->nt_headers) { return 0LL; } imageBase = bin->nt_headers->optional_header.ImageBase; if (!imageBase) { //this should only happens with messed up binaries //XXX this value should be user defined by bin.ba...
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
285,670,418,893,537,400,000,000,000,000,000,000,000
14
Fix crash in pe
#define UNKNOWN_UNICODE 0xFFFD static Uint32 UTF8_getch(const char *src, size_t srclen, int *inc) { const Uint8 *p = (const Uint8 *)src; size_t left = 0; size_t save_srclen = srclen; SDL_bool overlong = SDL_FALSE; SDL_bool underflow = SDL_FALSE; Uint32 ch = UNKNOWN_UNICODE; if (srclen == 0)...
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
149,931,031,340,701,230,000,000,000,000,000,000,000
92
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
FormatError(const FormatError &ferr) : std::runtime_error(ferr) {}
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
311,408,920,650,225,100,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
pcl_inquire_readback_entity(pcl_args_t * pargs, pcl_state_t * pcs) { uint i = uint_arg(pargs); int unit = pcs->location_unit; stream st; static const char *entity_types[] = { "FONTS", "MACROS", "PATTERNS", "SYMBOLSETS", "FONTS EXTENDED" }; pcl_data_storage_t storage; int code = 0; ...
0
[ "CWE-787" ]
ghostpdl
e1134d375e2ca176068e19a2aa9b040baffe1c22
250,102,561,690,478,740,000,000,000,000,000,000,000
87
Bug 705156(1): Avoid double free of PCL error buffer
static void keyring_free_preparse(struct key_preparsed_payload *prep) { }
0
[ "CWE-476" ]
linux
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
79,659,549,158,578,690,000,000,000,000,000,000,000
3
KEYS: Remove key_type::match in favour of overriding default by match_preparse A previous patch added a ->match_preparse() method to the key type. This is allowed to override the function called by the iteration algorithm. Therefore, we can just set a default that simply checks for an exact match of the key descripti...
bgp_do_rx_update(struct bgp_conn *conn, byte *withdrawn UNUSED, int withdrawn_len, byte *nlri UNUSED, int nlri_len, byte *attrs, int attr_len) { struct bgp_proto *p = conn->bgp; struct rte_src *src = p->p.main_source; byte *x; int len, len0; unsigned af; rta *a0, *a = NULL; ip_addr prefix; int ...
0
[ "CWE-787" ]
bird
1657c41c96b3c07d9265b07dd4912033ead4124b
191,165,759,017,483,680,000,000,000,000,000,000,000
81
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
virDomainChrEquals(virDomainChrDefPtr src, virDomainChrDefPtr tgt) { if (!src || !tgt) return src == tgt; if (src->deviceType != tgt->deviceType || !virDomainChrSourceDefIsEqual(src->source, tgt->source)) return false; switch ((virDomainChrDeviceType) src->device...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
153,086,340,798,900,060,000,000,000,000,000,000,000
49
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static int hextoint(char *src, unsigned int len) { char hex[16]; char *end; int res; if(len >= sizeof(hex)) return -1; strncpy(hex, src, len+1); hex[len] = '\0'; res = strtol(hex, &end, 0x10); if(end != (char*)&hex[len]) return -1; return res; }
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
251,440,997,270,770,870,000,000,000,000,000,000,000
15
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static void DetectFlow(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, Packet *p) { if (p->flags & PKT_NOPACKET_INSPECTION) { /* hack: if we are in pass the entire flow mode, we need to still * update the inspect_id forward. So ...
0
[ "CWE-347" ]
suricata
d8634daf74c882356659addb65fb142b738a186b
212,369,117,143,960,840,000,000,000,000,000,000,000
28
stream: fix false negative on bad RST If a bad RST was received the stream inspection would not happen for that packet, but it would still move the 'raw progress' tracker forward. Following good packets would then fail to detect anything before the 'raw progress' position. Bug #2770 Reported-by: Alexey Vishnyakov
spa_mdfour64 (uint32x * M) { int j; uint32x AA, BB, CC, DD; uint32x X[16]; for (j = 0; j < 16; j++) X[j] = M[j]; AA = A; BB = B; CC = C; DD = D; ROUND1 (A, B, C, D, 0, 3); ROUND1 (D, A, B, C, 1, 7); ROUND1 (C, D, A, B, 2, 11); ROUND1 (B, C, D, A, 3, 19); ROUND1 (A, B, C, D, 4, 3); ROUND1 (D, A, B, C, 5, 7); ROUND1...
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
77,054,695,666,069,970,000,000,000,000,000,000,000
78
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, AlterTableCmd *cmd, LOCKMODE lockmode) { switch (cmd->subtype) { case AT_AddColumn: /* ADD COLUMN */ case AT_AddColumnToView: /* add column via CREATE OR REPLACE * VIEW */ ATExecAddColumn(wqueue, tab, rel, (ColumnDef *) cmd->def, ...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
58,921,182,888,730,790,000,000,000,000,000,000,000
213
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
ngx_http_lua_ngx_location_capture(lua_State *L) { int n; n = lua_gettop(L); if (n != 1 && n != 2) { return luaL_error(L, "expecting one or two arguments"); } lua_createtable(L, n, 0); /* uri opts? table */ lua_insert(L, 1); /* table uri opts? */ if (n == 1) { /* t...
0
[ "CWE-444" ]
lua-nginx-module
9ab38e8ee35fc08a57636b1b6190dca70b0076fa
129,181,039,653,978,820,000,000,000,000,000,000,000
26
bugfix: prevented request smuggling in the ngx.location.capture API. Signed-off-by: Yichun Zhang (agentzh) <yichun@openresty.com>
static struct key *construct_key_and_link(struct keyring_search_context *ctx, const char *callout_info, size_t callout_len, void *aux, struct key *dest_keyring, unsigned long flags) { struct key_user *user; struct key *key; int ret; kenter(""); if (ctx->index_key.type == &key_t...
1
[ "CWE-284", "CWE-862" ]
linux
4dca6ea1d9432052afb06baf2e3ae78188a4410b
298,796,663,514,089,560,000,000,000,000,000,000,000
50
KEYS: add missing permission check for request_key() destination When the request_key() syscall is not passed a destination keyring, it links the requested key (if constructed) into the "default" request-key keyring. This should require Write permission to the keyring. However, there is actually no permission check....
struct r_bin_pe_addr_t *PE_(r_bin_pe_get_main_vaddr)(RBinPEObj *pe) { struct r_bin_pe_addr_t *winmain = PE_(check_msvcseh) (pe); if (!winmain) { winmain = PE_(check_mingw) (pe); if (!winmain) { winmain = PE_(check_unknow) (pe); } } return winmain; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
190,770,280,920,017,960,000,000,000,000,000,000,000
10
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static int usb_parse_configuration(struct usb_device *dev, int cfgidx, struct usb_host_config *config, unsigned char *buffer, int size) { struct device *ddev = &dev->dev; unsigned char *buffer0 = buffer; int cfgno; int nintf, nintf_orig; int i, j, n; struct usb_interface_cache *intfc; unsigned char *buffer2;...
1
[ "CWE-119", "CWE-787" ]
linux
bd7a3fe770ebd8391d1c7d072ff88e9e76d063eb
267,953,046,411,941,800,000,000,000,000,000,000,000
206
USB: fix out-of-bounds in usb_set_configuration Andrey Konovalov reported a possible out-of-bounds problem for a USB interface association descriptor. He writes: It seems there's no proper size check of a USB_DT_INTERFACE_ASSOCIATION descriptor. It's only checked that the size is >= 2 in usb_parse_configuration(),...
parser_parse_with_statement_end (parser_context_t *context_p) /**< context */ { parser_with_statement_t with_statement; JERRY_ASSERT (context_p->status_flags & PARSER_INSIDE_WITH); parser_stack_pop_uint8 (context_p); if (!context_p->stack_top_uint8) { context_p->status_flags &= (uint32_t) ~PARSER_INSID...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
165,407,398,778,908,290,000,000,000,000,000,000,000
26
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
processDataRcvd(ptcpsess_t *const __restrict__ pThis, char **buff, const int buffLen, struct syslogTime *stTime, const time_t ttGenTime, multi_submit_t *pMultiSub, unsigned *const __restrict__ pnMsgs) { DEFiRet; char c = **buff; int octatesToCopy, octatesToDiscard; if(pThis->inputState == eAtStrtFram) { if...
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
115,476,976,234,016,630,000,000,000,000,000,000,000
134
imptcp: fix Segmentation Fault when octet count is to high
static inline s64 get_pages(struct f2fs_sb_info *sbi, int count_type) { return atomic_read(&sbi->nr_pages[count_type]); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
307,656,777,486,172,560,000,000,000,000,000,000,000
4
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static void pit_realizefn(DeviceState *dev, Error **errp) { PITCommonState *pit = PIT_COMMON(dev); PITClass *pc = PIT_GET_CLASS(dev); PITChannelState *s; s = &pit->channels[0]; /* the timer 0 is connected to an IRQ */ s->irq_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, pit_irq_timer, s); qdev_i...
0
[ "CWE-119" ]
qemu
d4862a87e31a51de9eb260f25c9e99a75efe3235
282,092,745,443,898,000,000,000,000,000,000,000,000
18
i8254: fix out-of-bounds memory access in pit_ioport_read() Due converting PIO to the new memory read/write api we no longer provide separate I/O region lenghts for read and write operations. As a result, reading from PIT Mode/Command register will end with accessing pit->channels with invalid index. Fix this by igno...
void vrend_bind_shader(struct vrend_context *ctx, uint32_t handle, uint32_t type) { struct vrend_shader_selector *sel; if (type > PIPE_SHADER_COMPUTE) return; struct vrend_sub_context *sub_ctx = ctx->sub; if (handle == 0) { if (type == PIPE_SHADER_COMPUTE) sub_...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
149,734,785,007,255,170,000,000,000,000,000,000,000
36
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static int descriptor_sd_propagation_recursive(struct ldb_module *module, struct descriptor_changes *change) { struct descriptor_data *descriptor_private = talloc_get_type_abort(ldb_module_get_private(module), struct descriptor_data); struct descriptor_transaction *t = &descriptor_private->transaction...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
287,920,239,707,697,840,000,000,000,000,000,000,000
184
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
MagickExport Image *XAnimateImages(Display *display, XResourceInfo *resource_info,char **argv,const int argc,Image *images) { #define MagickMenus 4 #define MaXWindows 8 #define MagickTitle "Commands" static const char *CommandMenu[]= { "Animate", "Speed", "Direction", "Help", ...
0
[ "CWE-772" ]
ImageMagick6
6ce6d25b47caf9b6b2979a510b6202ce0f3dd2d4
235,234,945,109,429,860,000,000,000,000,000,000,000
1,651
https://github.com/ImageMagick/ImageMagick/issues/1195
rb_str_associate(VALUE str, VALUE add) { /* sanity check */ if (OBJ_FROZEN(str)) rb_error_frozen("string"); if (STR_ASSOC_P(str)) { /* already associated */ rb_ary_concat(RSTRING(str)->as.heap.aux.shared, add); } else { if (STR_SHARED_P(str)) { VALUE assoc = RSTRING(str)->as.heap.aux.shared;...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
115,019,261,455,131,760,000,000,000,000,000,000,000
29
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
MagickExport MagickBooleanType DeleteImageRegistry(const char *key) { if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",key); if (registry == (void *) NULL) return(MagickFalse); return(DeleteNodeFromSplayTree(registry,key)); }
0
[ "CWE-476" ]
ImageMagick
cca91aa1861818342e3d072bb0fad7dc4ffac24a
100,739,249,892,495,820,000,000,000,000,000,000,000
8
https://github.com/ImageMagick/ImageMagick/issues/790
int _gnutls_session_is_ecc(gnutls_session_t session) { gnutls_kx_algorithm_t kx; /* We get the key exchange algorithm through the ciphersuite because * the negotiated key exchange might not have been set yet. */ kx = session->security_parameters.cs->kx_algorithm; return _gnutls_kx_is_ecc(kx); }
0
[]
gnutls
3d7fae761e65e9d0f16d7247ee8a464d4fe002da
91,118,745,938,053,970,000,000,000,000,000,000,000
11
valgrind: check if session ticket key is used without initialization This adds a valgrind client request for session->key.session_ticket_key to make sure that it is not used without initialization. Signed-off-by: Daiki Ueno <ueno@gnu.org>
static void snd_timer_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_timer *timer; struct snd_timer_instance *ti; mutex_lock(&register_mutex); list_for_each_entry(timer, &snd_timer_list, device_list) { if (timer->card && timer->card->shutdown) continue; switch (time...
0
[ "CWE-200" ]
sound
cec8f96e49d9be372fdb0c3836dcf31ec71e457e
219,384,159,920,780,040,000,000,000,000,000,000,000
45
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse...
static void Ins_SFVTL( INS_ARG ) { if ( INS_SxVTL( (Int)(args[1]), (Int)(args[0]), CUR.opcode, &CUR.GS.freeVector) == FAILURE ) return; COMPUTE_Funcs(); }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
247,541,146,749,612,450,000,000,000,000,000,000,000
10
Bug 698024: bounds check zone pointer in Ins_MIRP()
char *mg_hexdump(const void *buf, size_t len) { const unsigned char *p = (const unsigned char *) buf; size_t i, idx, n = 0, ofs = 0, dlen = len * 5 + 100; char ascii[17] = "", *dst = (char *) calloc(1, dlen); if (dst == NULL) return dst; for (i = 0; i < len; i++) { idx = i % 16; if (idx == 0) { ...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
242,903,154,352,100,280,000,000,000,000,000,000,000
26
Protect against the directory traversal in mg_upload()
static int ul_send(ULHandler * const ulhandler) { double ts_start = 0.0; off_t uploaded = (off_t) 0; int pollret; int timeout; int ret; if (ulhandler->bandwidth > 0UL && (ts_start = get_usec_time()) <= 0.0) { error(451, "gettimeofday()"); return -1; } for (;;) { ...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
118,145,574,678,925,550,000,000,000,000,000,000,000
67
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
mkfmt (buf, prec, lng, sec, sec_fraction) char *buf; int prec, lng; time_t sec; int sec_fraction; { time_t min; char abuf[INT_STRLEN_BOUND(time_t) + 1]; int ind, aind; ind = 0; abuf[sizeof(abuf) - 1] = '\0'; /* If LNG is non-zero, we want to decompose SEC into minutes and seconds. */ ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
272,515,276,149,452,670,000,000,000,000,000,000,000
56
commit bash-20120224 snapshot
int LibRaw::copy_mem_image(void* scan0, int stride, int bgr) { // the image memory pointed to by scan0 is assumed to be in the format returned by get_mem_image_format if((imgdata.progress_flags & LIBRAW_PROGRESS_THUMB_MASK) < LIBRAW_PROGRESS_PRE_INTERPOLATE) return LIBRAW_OUT_OF_ORDER_CALL; if(lib...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
211,646,794,599,154,400,000,000,000,000,000,000,000
76
fixed two more problems found by fuzzer
CmdGetNonce() : Command("getnonce"), _randMutex("getnonce"), _random(SecureRandom::create()) { }
0
[]
mongo
f85ceb17b37210eef71e8113162c41368bfd5c12
17,341,891,611,960,699,000,000,000,000,000,000,000
5
SERVER-9476 Redact some potentially sensitive information when logging authentications.
void NumberFormatTest::TestCurrencyUsage() { double agent = 123.567; UErrorCode status; DecimalFormat *fmt; // compare the Currency and Currency Cash Digits // Note that as of CLDR 26: // * TWD and PKR switched from 0 decimals to 2; ISK still has 0, so change test to that // * CAD rounds t...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
32,647,127,730,221,465,000,000,000,000,000,000,000
107
ICU-20246 Fixing another integer overflow in number parsing.
x_set_buffer(gx_device_X * xdev) { /* * We must use the stable memory here, since the existence of the * buffer is independent of save/restore. */ gs_memory_t *mem = gs_memory_stable(xdev->memory); bool buffered = xdev->space_params.MaxBitmap > 0; const gx_device_procs *procs; setup: ...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
314,352,290,049,960,830,000,000,000,000,000,000,000
128
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
static inline int rtnetlink_fill_iwinfo(struct sk_buff * skb, struct net_device * dev, int type, char * event, int event_len) { struct ifinfomsg *r; struct nlmsghdr *nlh; unsigned char *b = skb->tail; nlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r)); r = NLMSG_DATA(nlh); r->ifi_family = A...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
165,017,963,994,712,210,000,000,000,000,000,000,000
31
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static int mct_u232_port_remove(struct usb_serial_port *port) { struct mct_u232_private *priv; priv = usb_get_serial_port_data(port); kfree(priv); return 0; }
0
[ "CWE-703" ]
linux
4e9a0b05257f29cf4b75f3209243ed71614d062e
65,872,556,258,995,290,000,000,000,000,000,000,000
9
USB: mct_u232: add sanity checking in probe An attack using the lack of sanity checking in probe is known. This patch checks for the existence of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org [johan: add error message ] Signed-off-by: Johan Hovold <johan@kern...
parseAndSubmitMessage(uchar *hname, uchar *hnameIP, uchar *msg, int len, int flags, flowControl_t flowCtlType, prop_t *pInputName, struct syslogTime *stTime, time_t ttGenTime) { DEFiRet; register int iMsg; uchar *pMsg; uchar *pData; uchar *pEnd; int iMaxLine; uchar *tmpline = NULL; # ifdef USE_NETZIP uchar *de...
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
184,178,990,917,875,170,000,000,000,000,000,000,000
175
bugfix: off-by-one(two) bug in legacy syslog parser
libssh2_channel_close(LIBSSH2_CHANNEL *channel) { int rc; if(!channel) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, channel->session, _libssh2_channel_close(channel) ); return rc; }
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
181,383,567,524,418,700,000,000,000,000,000,000,000
10
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
do_select_end(XtermWidget xw, XEvent *event, /* must be XButtonEvent */ String *params, /* selections */ Cardinal *num_params, Bool use_cursor_loc) { TScreen *screen = TScreenOf(xw); screen->selection_time = event->xbutton.time; TRACE(("do_select_end %s @%ld\n", visibleEven...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
291,679,232,326,973,270,000,000,000,000,000,000,000
27
snapshot of project "xterm", label xterm-365d
static NTSTATUS pdb_samba_dsdb_delete_dom_group(struct pdb_methods *m, TALLOC_CTX *mem_ctx, uint32_t rid) { const char *attrs[] = { NULL }; struct pdb_samba_dsdb_state *state = talloc_get_type_abort( m->private_data, struct pdb_samba_dsdb_state); struct dom_sid sid; struct ldb_message *msg; struct ldb_dn *...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
76,385,987,513,372,440,000,000,000,000,000,000,000
55
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
R_API char *r_bin_java_print_long_cp_stringify(RBinJavaCPTypeObj *obj) { ut32 size = 255, consumed = 0; char *value = malloc (size); if (value) { memset (value, 0, size); consumed = snprintf (value, size, "%d.0x%04"PFMT64x ".%s.0x%08"PFMT64x "", obj->metas->ord, obj->file_offset, ((RBinJavaCPTypeMetas *...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
20,147,394,560,150,878,000,000,000,000,000,000,000
26
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static inline void ext4_quota_off_umount(struct super_block *sb) { }
0
[]
linux
a45403b51582a87872927a3e0fc0a389c26867f1
49,367,944,895,074,490,000,000,000,000,000,000,000
3
ext4: always initialize the crc32c checksum driver The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mou...
static void hidp_session_dev_destroy(struct hidp_session *session) { if (session->hid) put_device(&session->hid->dev); else if (session->input) input_put_device(session->input); kfree(session->rd_data); session->rd_data = NULL; }
0
[ "CWE-843" ]
linux
51bda2bca53b265715ca1852528f38dc67429d9a
285,358,070,460,226,350,000,000,000,000,000,000,000
10
Bluetooth: hidp_connection_add() unsafe use of l2cap_pi() it's OK after we'd verified the sockets, but not before that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
int __weak kgdb_skipexception(int exception, struct pt_regs *regs) { return 0; }
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
77,990,700,252,423,230,000,000,000,000,000,000,000
4
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
SPL_METHOD(SplDoublyLinkedList, next) { spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->llist, intern->fla...
1
[ "CWE-416" ]
php-src
863bf294feb9ad425eadb94f288bc7f18673089d
247,244,292,829,937,040,000,000,000,000,000,000,000
10
Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
policy_summary_create(void) { smartlist_t *summary; policy_summary_item_t* item; item = tor_malloc_zero(sizeof(policy_summary_item_t)); item->prt_min = 1; item->prt_max = 65535; item->reject_count = 0; item->accepted = 0; summary = smartlist_new(); smartlist_add(summary, item); return summary; }
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
200,355,892,985,438,300,000,000,000,000,000,000,000
16
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
Item *Item_time_literal::clone_item(THD *thd) { return new (thd->mem_root) Item_time_literal(thd, &cached_time, decimals); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
277,373,935,258,333,300,000,000,000,000,000,000,000
4
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.
nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lock *lock) { struct xdr_stream *xdr = &resp->xdr; if (!nfserr) nfserr = nfsd4_encode_stateid(xdr, &lock->lk_resp_stateid); else if (nfserr == nfserr_denied) nfserr = nfsd4_encode_lock_denied(xdr, &lock->lk_denied); return nfserr; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
46,875,970,102,840,120,000,000,000,000,000,000,000
11
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
void CLASS redcine_load_raw() { #ifdef HAVE_LIBJASPER int c, row, col; jas_stream_t *in; jas_image_t *jimg; jas_matrix_t *jmat; jas_seqent_t *data; ushort *img, *pix; jas_init(); in = jas_stream_fopen (ifname, "rb"); jas_stream_seek (in, data_offset+20, SEEK_SET); jimg = jas_image_decode (in, -1, 0...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
26,721,956,519,102,865,000,000,000,000,000,000,000
51
Avoid overflow in ljpeg_start().
static MagickBooleanType WriteYUVImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { Image *chroma_image, *yuv_image; InterlaceType interlace; MagickBooleanType status; MagickOffsetType scene; register const Quantum *p, *s; register ssize_t x; ...
0
[ "CWE-399", "CWE-772" ]
ImageMagick
ef8f40689ac452398026c07da41656a7c87e4683
226,380,519,219,675,870,000,000,000,000,000,000,000
282
fix multiple memory leak in ReadYUVImage
gdm_session_worker_ask_question (GdmSessionWorker *worker, const char *question, char **answerp) { return gdm_dbus_worker_manager_call_info_query_sync (worker->priv->manager, ...
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
134,501,780,448,736,840,000,000,000,000,000,000,000
11
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
void type( const TypeObjectV1& other_type) { type_ = other_type; }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
323,992,850,016,108,080,000,000,000,000,000,000,000
5
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
snmp_in_toggle_options(char *options) { return snmp_in_options( options, 0, NULL ); }
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
106,095,489,079,500,950,000,000,000,000,000,000,000
4
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
static uint64_t emac_read(void *opaque, hwaddr addr, unsigned int size) { MSF2EmacState *s = opaque; uint32_t r = 0; addr >>= 2; switch (addr) { case R_DMA_IRQ: r = emac_get_isr(s); break; default: if (addr >= ARRAY_SIZE(s->regs)) { qemu_log_mask(LOG_GUEST_E...
0
[ "CWE-835" ]
qemu
26194a58f4eb83c5bdf4061a1628508084450ba1
135,504,479,882,235,930,000,000,000,000,000,000,000
23
msf2-mac: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.c...
vbf_stp_done(void) { WRONG("Just plain wrong"); NEEDLESS(return(F_STP_DONE)); }
0
[ "CWE-119", "CWE-787" ]
varnish-cache
176f8a075a963ffbfa56f1c460c15f6a1a6af5a7
303,937,666,571,644,100,000,000,000,000,000,000,000
5
Avoid buffer read overflow on vcl_error and -sfile The file stevedore may return a buffer larger than asked for when requesting storage. Due to lack of check for this condition, the code to copy the synthetic error memory buffer from vcl_error would overrun the buffer. Patch by @shamger Fixes: #2429
handle_die_with_parent (void) { if (opt_die_with_parent && prctl (PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0) != 0) die_with_error ("prctl"); }
0
[ "CWE-20", "CWE-269" ]
bubblewrap
efc89e3b939b4bde42c10f065f6b7b02958ed50e
161,105,882,701,230,190,000,000,000,000,000,000,000
5
Don't create our own temporary mount point for pivot_root An attacker could pre-create /tmp/.bubblewrap-$UID and make it a non-directory, non-symlink (in which case mounting our tmpfs would fail, causing denial of service), or make it a symlink under their control (potentially allowing bad things if the protected_syml...
walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; if (str->utf8 == NULL) return; do { char *s = &str->utf8[str->pos]; size_t len; int n = fz_chartorune(&rune, s); if (rune == uni) { /* Match. Skip over that one. */ str->pos += n; } else if (uni == 32) { /* W...
1
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
101,285,331,598,037,540,000,000,000,000,000,000,000
44
Bug 701292: Fix test for missing/empty string.
path_area(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P(0); double area = 0.0; int i, j; if (!path->closed) PG_RETURN_NULL(); for (i = 0; i < path->npts; i++) { j = (i + 1) % path->npts; area += path->p[i].x * path->p[j].y; area -= path->p[i].y * path->p[j].x; } area *= 0.5; PG_RETURN_...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
5,955,673,709,594,563,000,000,000,000,000,000,000
20
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
int git_smart__store_refs(transport_smart *t, int flushes) { gitno_buffer *buf = &t->buffer; git_vector *refs = &t->refs; int error, flush = 0, recvd; const char *line_end = NULL; git_pkt *pkt = NULL; size_t i; /* Clear existing refs in case git_remote_connect() is called again * after git_remote_disconnect()...
0
[ "CWE-476" ]
libgit2
84d30d569ada986f3eef527cbdb932643c2dd037
262,277,902,584,133,850,000,000,000,000,000,000,000
57
smart_pkt: treat empty packet lines as error The Git protocol does not specify what should happen in the case of an empty packet line (that is a packet line "0004"). We currently indicate success, but do not return a packet in the case where we hit an empty line. The smart protocol was not prepared to handle such pack...
R_API int r_str_utf16_to_utf8(ut8 *dst, int len_dst, const ut8 *src, int len_src, int little_endian) { ut8 *outstart = dst; ut8 *outend = dst + len_dst; ut16 *in = (ut16*)src; ut16 *inend; ut32 c, d, inlen; ut8 *tmp; int bits; if ((len_src % 2) == 1) { len_src--; } inlen = len_src / 2; inend = in + inlen;...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
99,295,984,193,115,970,000,000,000,000,000,000,000
75
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
bool operator()(const IdAndVariable& lhs, const IdAndVariable& rhs) const { return lhs.id < rhs.id; }
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
186,131,310,145,871,300,000,000,000,000,000,000,000
3
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
set_ssl_version_min_max(struct Curl_easy *data, struct connectdata *conn, int sockindex) { struct ssl_connect_data *connssl = &conn->ssl[sockindex]; struct ssl_backend_data *backend = connssl->backend; int mbedtls_ver_min = MBEDTLS_SSL_MINOR_VERSION_1; int mbedtls_ver_max = MBEDTLS_SSL_M...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
289,071,050,988,384,750,000,000,000,000,000,000,000
43
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static void io_queue_sqe(struct io_kiocb *req) { int ret; ret = io_req_defer(req); if (ret) { if (ret != -EIOCBQUEUED) { fail_req: req_set_fail_links(req); io_put_req(req); io_req_complete(req, ret); } } else if (req->flags & REQ_F_FORCE_ASYNC) { ret = io_req_defer_prep(req); if (unlikely(ret)) ...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
320,487,484,236,080,620,000,000,000,000,000,000,000
21
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static __be32 to_mlx5_access_flags(struct mlx5_ib_qp *qp, const struct ib_qp_attr *attr, int attr_mask) { u32 hw_access_flags = 0; u8 dest_rd_atomic; u32 access_flags; if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) dest_rd_atomic = attr->max_dest_rd_atomic; else dest_rd_atomic = qp->trans_qp.resp_depth; i...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
313,370,165,185,045,000,000,000,000,000,000,000,000
29
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c) { int err; #ifndef WOLFSSL_SMALL_STACK fp_int t[1]; #else fp_int *t; #endif #ifdef WOLFSSL_SMALL_STACK t = (fp_int*)XMALLOC(sizeof(fp_int), NULL, DYNAMIC_TYPE_BIGINT); if (t == NULL) return FP_MEM; #endif fp_init(t); err = fp_sqr(a, t); if (err...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
321,806,325,656,549,500,000,000,000,000,000,000,000
35
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int ksm_memory_callback(struct notifier_block *self, unsigned long action, void *arg) { struct memory_notify *mn = arg; struct stable_node *stable_node; switch (action) { case MEM_GOING_OFFLINE: /* * Keep it very simple for now: just lock out ksmd and * MADV_UNMERGEABLE while any memory is...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
91,616,499,206,647,600,000,000,000,000,000,000,000
37
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static int hid_parser_local(struct hid_parser *parser, struct hid_item *item) { __u32 data; unsigned n; __u32 count; data = item_udata(item); switch (item->tag) { case HID_LOCAL_ITEM_TAG_DELIMITER: if (data) { /* * We treat items before the first delimiter * as global to all usage sets (branch 0)....
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
98,571,600,820,661,850,000,000,000,000,000,000,000
100
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
int getname(FILE *sfd, char *tokbuf) { int ch; while ( isspace(ch = nlgetc(sfd))); ungetc(ch,sfd); return( getprotectedname(sfd,tokbuf)); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
146,063,342,873,872,310,000,000,000,000,000,000,000
7
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
get_u32(const void *vp) { const u_char *p = (const u_char *)vp; u_int32_t v; v = (u_int32_t)p[0] << 24; v |= (u_int32_t)p[1] << 16; v |= (u_int32_t)p[2] << 8; v |= (u_int32_t)p[3]; return (v); }
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
124,347,967,173,967,620,000,000,000,000,000,000,000
12
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
dissect_tcpopt_qs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *field_tree; proto_item *item; proto_item *length_item; guint8 rate; int offset = 0; item = proto_tree_add_item(tree, proto_tcp_option_qs, tvb, offset, -1, ENC_NA); field_tree = proto_item_ad...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
102,026,317,412,875,720,000,000,000,000,000,000,000
30
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
bool Field_num::get_int(CHARSET_INFO *cs, const char *from, uint len, longlong *rnd, ulonglong unsigned_max, longlong signed_min, longlong signed_max) { char *end; int error; *rnd= (longlong) cs->cset->strntoull10rnd(cs, from, len, ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
108,457,209,305,621,590,000,000,000,000,000,000,000
42
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
vhost_user_get_protocol_features(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; uint64_t features, protocol_features; if (validate_msg_fds(msg, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; rte_vhost_driver_get_features(dev->ifname, &features); ...
0
[]
dpdk
bf472259dde6d9c4dd3ebad2c2b477a168c6e021
297,910,034,415,642,160,000,000,000,000,000,000,000
28
vhost: fix possible denial of service by leaking FDs A malicious Vhost-user master could send in loop hand-crafted vhost-user messages containing more file descriptors the vhost-user slave expects. Doing so causes the application using the vhost-user library to run out of FDs. This issue has been assigned CVE-2019-14...
static struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu) { struct kvm_mmu_role_regs regs = { .cr0 = kvm_read_cr0_bits(vcpu, KVM_MMU_CR0_ROLE_BITS), .cr4 = kvm_read_cr4_bits(vcpu, KVM_MMU_CR4_ROLE_BITS), .efer = vcpu->arch.efer, }; return regs; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
22,683,914,731,738,770,000,000,000,000,000,000,000
10
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, List<Item> &fields, List<Item> &all_fields, ORDER *order, bool *hidden_group_fields, bool from_window_spec) { enum_parsing_place context_analysis_place= thd->lex->current_select->context_analysis_place; *hidden...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
32,261,194,165,251,557,000,000,000,000,000,000,000
103
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
static void migrate_dead(unsigned int dead_cpu, struct task_struct *p) { struct rq *rq = cpu_rq(dead_cpu); /* Must be exiting, otherwise would be on tasklist. */ BUG_ON(!p->exit_state); /* Cannot have done final schedule yet: would have vanished. */ BUG_ON(p->state == TASK_DEAD); get_task_struct(p); /* * D...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
98,517,111,472,825,340,000,000,000,000,000,000,000
23
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 ...
int nfs_generic_flush(struct nfs_pageio_descriptor *desc, struct nfs_pgio_header *hdr) { if (desc->pg_bsize < PAGE_CACHE_SIZE) return nfs_flush_multi(desc, hdr); return nfs_flush_one(desc, hdr); }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
94,957,996,261,487,450,000,000,000,000,000,000,000
7
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
void init_revisions(struct rev_info *revs, const char *prefix) { memset(revs, 0, sizeof(*revs)); revs->abbrev = DEFAULT_ABBREV; revs->ignore_merges = 1; revs->simplify_history = 1; DIFF_OPT_SET(&revs->pruning, RECURSIVE); DIFF_OPT_SET(&revs->pruning, QUIET); revs->pruning.add_remove = file_add_remove; revs->pr...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
85,328,794,137,540,680,000,000,000,000,000,000,000
27
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
MessengerTest(): server_msgr(NULL), client_msgr(NULL) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
203,518,481,168,411,940,000,000,000,000,000,000,000
1
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 ...
perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct perf_event *event = file->private_data; struct perf_event_context *ctx; int ret; ctx = perf_event_ctx_lock(event); ret = perf_read_hw(event, buf, count); perf_event_ctx_unlock(event, ctx); return ret; }
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
22,007,563,193,681,510,000,000,000,000,000,000,000
12
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
parse_bag(Node** np, PToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r, num; Node *target; OnigOptionType option; OnigCodePoint c; int list_capture; OnigEncoding enc = env->enc; UChar* p = *src; PFETCH_READY; *np = NULL; if (PEND) return ONIGERR_END_PATTERN_WITH_UNMAT...
0
[ "CWE-125" ]
oniguruma
aa0188eaedc056dca8374ac03d0177429b495515
84,744,015,162,740,730,000,000,000,000,000,000,000
585
fix #163: heap-buffer-overflow in gb18030_mbc_enc_len
GF_Err gf_isom_reset_track_switch_parameter(GF_ISOFile *movie, u32 trackNumber, Bool reset_all_group) { GF_TrackBox *trak; u32 alternateGroupID = 0; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak) return GF_BAD_PARAM; if (!trak->Header->alternate_group) return GF_OK; alternateGroupID = trak->...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
188,339,816,410,627,700,000,000,000,000,000,000,000
23
fixed #1706
dwarf_formexprloc(Dwarf_Attribute attr, Dwarf_Unsigned * return_exprlen, Dwarf_Ptr * block_ptr, Dwarf_Error * error) { Dwarf_Debug dbg = 0; Dwarf_CU_Context cu_context = 0; int res = get_attr_dbg(&dbg,&cu_context,attr,error); if (res != DW_DLV_OK) { return res; } if (attr-...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
129,328,449,491,709,160,000,000,000,000,000,000,000
97
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
s4u_identify_user(krb5_context context, krb5_creds *in_creds, krb5_data *subject_cert, krb5_principal *canon_user) { krb5_error_code code; krb5_preauthtype ptypes[1] = { KRB5_PADATA_S4U_X509_USER }; krb5_creds creds; int use_master = 0; krb5_get_...
1
[ "CWE-617", "CWE-703" ]
krb5
5e6d1796106df8ba6bc1973ee0917c170d929086
5,363,244,018,475,068,000,000,000,000,000,000,000
78
Ignore password attributes for S4U2Self requests For consistency with Windows KDCs, allow protocol transition to work even if the password has expired or needs changing. Also, when looking up an enterprise principal with an AS request, treat ERR_KEY_EXP as confirmation that the client is present in the realm. [ghuds...
bool alloc_and_init_significant_coeff_ctxIdx_lookupTable() { int tableSize = 4*4*(2) + 8*8*(2*2*4) + 16*16*(2*4) + 32*32*(2*4); uint8_t* p = (uint8_t*)malloc(tableSize); if (p==NULL) { return false; } memset(p,0xFF,tableSize); // just for debugging // --- Set pointers to memory areas. Note that som...
0
[]
libde265
e83f3798dd904aa579425c53020c67e03735138d
290,326,545,774,865,460,000,000,000,000,000,000,000
153
fix check for valid PPS idx (#298)
static void comedi_unmap(struct vm_area_struct *area) { struct comedi_async *async; struct comedi_device *dev; async = area->vm_private_data; dev = async->subdevice->device; mutex_lock(&dev->mutex); async->mmap_count--; mutex_unlock(&dev->mutex); }
0
[ "CWE-200" ]
linux
819cbb120eaec7e014e5abd029260db1ca8c5735
209,310,024,139,177,100,000,000,000,000,000,000,000
12
staging: comedi: fix infoleak to userspace driver_name and board_name are pointers to strings, not buffers of size COMEDI_NAMELEN. Copying COMEDI_NAMELEN bytes of a string containing less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Cc: stable <sta...
int coroutine_fn bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { int64_t ret = bdrv_get_block_status(bs, sector_num, nb_sectors, pnum); if (ret < 0) { return ret; } return (ret & BDRV_BLOCK_DATA) || ((ret...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
233,586,018,505,590,250,000,000,000,000,000,000,000
11
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
GF_Err trex_dump(GF_Box *a, FILE * trace) { GF_TrackExtendsBox *p; p = (GF_TrackExtendsBox *)a; gf_isom_box_dump_start(a, "TrackExtendsBox", trace); fprintf(trace, "TrackID=\"%d\"", p->trackID); fprintf(trace, " SampleDescriptionIndex=\"%d\" SampleDuration=\"%d\" SampleSize=\"%d\"", p->def_sample_desc_index, p->de...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
174,863,498,602,684,730,000,000,000,000,000,000,000
12
fixed 2 possible heap overflows (inc. #1088)
void PSOutputDev::setupImages(Dict *resDict) { Object xObjDict, xObj, xObjRef, subtypeObj; int i; if (!(mode == psModeForm || inType3Char || preload)) { return; } //----- recursively scan XObjects resDict->lookup("XObject", &xObjDict); if (xObjDict.isDict()) { for (i = 0; i < xObjDict.dictGetLen...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
81,874,210,753,649,520,000,000,000,000,000,000,000
31
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
date_s__valid_commercial_p(int argc, VALUE *argv, VALUE klass) { VALUE vy, vw, vd, vsg; VALUE argv2[4]; rb_scan_args(argc, argv, "31", &vy, &vw, &vd, &vsg); argv2[0] = vy; argv2[1] = vw; argv2[2] = vd; if (argc < 4) argv2[3] = DBL2NUM(GREGORIAN); else argv2[3] = vsg; return vali...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
179,883,409,117,204,680,000,000,000,000,000,000,000
17
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`...
CURLcode smtp_perform(struct connectdata *conn, bool *connected, /* connect status after PASV / PORT */ bool *dophase_done) { /* this is SMTP and no proxy */ CURLcode result = CURLE_OK; DEBUGF(infof(conn->data, "DO phase starts\n")); if(conn->data->set.opt_no_body) {...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
147,558,572,138,999,560,000,000,000,000,000,000,000
36
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...