func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void* AllocChunk(cmsIT8* it8, cmsUInt32Number size) { cmsUInt32Number Free = it8 ->Allocator.BlockSize - it8 ->Allocator.Used; cmsUInt8Number* ptr; size = _cmsALIGNMEM(size); if (size > Free) { if (it8 -> Allocator.BlockSize == 0) it8 -> Allocator.BlockSize = 20*1024; ...
0
[]
Little-CMS
65e2f1df3495edc984f7e0d7b7b24e29d851e240
259,592,366,101,395,700,000,000,000,000,000,000,000
28
Fix some warnings from static analysis
aclinsert(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("aclinsert is no longer supported"))); PG_RETURN_NULL(); /* keep compiler quiet */ }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
67,670,453,099,093,100,000,000,000,000,000,000,000
8
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
xmlParseElement(xmlParserCtxtPtr ctxt) { if (xmlParseElementStart(ctxt) != 0) return; xmlParseContent(ctxt); if (ctxt->instate == XML_PARSER_EOF) return; xmlParseElementEnd(ctxt); }
0
[]
libxml2
0e1a49c8907645d2e155f0d89d4d9895ac5112b5
296,567,723,911,959,570,000,000,000,000,000,000,000
8
Fix infinite loop in xmlStringLenDecodeEntities When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef return NULL which cause a infinite loop in xmlStringLenDecodeEntities Found with libFuzzer. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
void llhttp_set_error_reason(llhttp_t* parser, const char* reason) { parser->reason = reason; }
0
[ "CWE-444" ]
node
af488f8dc82d69847992ea1cd2f53dc8082b3b91
151,331,652,772,798,510,000,000,000,000,000,000,000
3
deps: update llhttp to 6.0.4 Refs: https://hackerone.com/reports/1238099 Refs: https://hackerone.com/reports/1238709 Refs: https://github.com/nodejs-private/llhttp-private/pull/6 Refs: https://github.com/nodejs-private/llhttp-private/pull/5 CVE-ID: CVE-2021-22959 CVE-ID: CVE-2021-22960 PR-URL: https://github.com/node...
static char *readString(ut8 *p, int off, int len) { if (off < 0 || off >= len) { return NULL; } return rz_str_ndup((const char *)p + off, len - off); }
0
[ "CWE-787" ]
rizin
348b1447d1452f978b69631d6de5b08dd3bdf79d
66,974,218,608,853,600,000,000,000,000,000,000,000
6
fix #2956 - oob write in mach0.c
SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) { struct swap_info_struct *p; char *name; struct file *swap_file = NULL; struct address_space *mapping; int i; int prio; int error; union swap_header *swap_header; int nr_extents; sector_t span; unsigned long maxpages; unsigned char ...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
128,731,104,882,188,860,000,000,000,000,000,000,000
156
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static int io_sqe_files_unregister(struct io_ring_ctx *ctx) { struct fixed_rsrc_data *data = ctx->file_data; unsigned nr_tables, i; int ret; /* * percpu_ref_is_dying() is to stop parallel files unregister * Since we possibly drop uring lock later in this function to * run task work. */ if (!data || percp...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
336,018,787,510,322,960,000,000,000,000,000,000,000
26
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...
ins_compl_continue_search(char_u *line) { // it is a continued search compl_cont_status &= ~CONT_INTRPT; // remove INTRPT if (ctrl_x_mode_normal() || ctrl_x_mode_path_patterns() || ctrl_x_mode_path_defines()) { if (compl_startpos.lnum != curwin->w_cursor.lnum) { // line (probably) wrapped, ...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
44,553,789,000,345,300,000,000,000,000,000,000,000
51
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
void CModCommand::AddHelp(CTable& Table) const { Table.AddRow(); Table.SetCell(t_s("Command", "modhelpcmd"), GetCommand() + " " + GetArgs()); Table.SetCell(t_s("Description", "modhelpcmd"), GetDescription()); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
280,015,015,484,795,070,000,000,000,000,000,000,000
5
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static int megasas_start_aen(struct megasas_instance *instance) { struct megasas_evt_log_info eli; union megasas_evt_class_locale class_locale; /* * Get the latest sequence number from FW */ memset(&eli, 0, sizeof(eli)); if (megasas_get_seq_num(instance, &eli)) return -1; /* * Register AEN with FW for ...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
74,687,448,234,848,920,000,000,000,000,000,000,000
24
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
fatalError(void) { fprintf(stderr, "Exitting tests on fatal error\n"); exit(1); }
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
306,976,037,418,709,780,000,000,000,000,000,000,000
4
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
void xlisten(int s, int backlog) { if (listen(s, backlog)) perror_msg_and_die("listen"); }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
4,076,072,226,724,453,000,000,000,000,000,000,000
5
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block, int n, int coded, int intra, int rvlc) { MpegEncContext *s = &ctx->m; int level, i, last, run, qmul, qadd; int av_uninit(dc_pred_dir); RLTable *rl; RL_VLC_ELEM *rl_vlc; const uint8_t *...
0
[ "CWE-703" ]
FFmpeg
3edc3b159503d512c919b3d5902f7026e961823a
200,606,471,380,825,300,000,000,000,000,000,000,000
263
avcodec/mpeg4videodec: Check for bitstream overread in decode_vol_header() Fixes out of array read Fixes: 08e48e9daae7d8f8ab6dbe3919e797e5-asan_heap-oob_157461c_5295_cov_1266798650_firefing.mpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
TEST_F(HeaderToMetadataTest, CookieValueUsed) { const std::string response_config_yaml = R"EOF( response_rules: - cookie: bar on_header_present: key: bar type: STRING remove: false )EOF"; initializeFilter(response_config_yaml); Http::TestResponseHeaderMapImpl incoming_headers{{"cookie", "bar...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
205,957,940,458,435,020,000,000,000,000,000,000,000
18
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
nameserver_probe_callback(int result, char type, int count, int ttl, void *addresses, void *arg) { struct nameserver *const ns = (struct nameserver *) arg; (void) type; (void) count; (void) ttl; (void) addresses; if (result == DNS_ERR_CANCEL) { /* We canceled this request because the nameserver came up * fo...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
97,080,760,502,429,820,000,000,000,000,000,000,000
24
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
Status RoleGraph::_recomputePrivilegeDataHelper(const RoleName& startingRole, stdx::unordered_set<RoleName>& visitedRoles) { if (visitedRoles.count(startingRole)) { return Status::OK(); } std::vector<RoleName> inProgressRoles; inProgressRoles.push...
0
[ "CWE-863" ]
mongo
fb87cc88ecb5d300f14cda7bc238d7d5132118f5
294,055,117,695,643,000,000,000,000,000,000,000,000
106
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
handle_assoc_request(netdissect_options *ndo, const u_char *p, u_int length) { struct mgmt_body_t pbody; int offset = 0; int ret; memset(&pbody, 0, sizeof(pbody)); if (!ND_TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN)) return 0; if (length < IEEE802_11_CAPINFO_LEN + IEEE80...
0
[ "CWE-125" ]
tcpdump
4846b3c5d0a850e860baf4f07340495d29837d09
137,297,380,748,208,970,000,000,000,000,000,000,000
26
(for 4.9.3) CVE-2018-16227/IEEE 802.11: add a missing bounds check ieee802_11_print() tried to access the Mesh Flags subfield of the Mesh Control field to find the size of the latter and increment the expected 802.11 header length before checking it is fully present in the input buffer. Add an intermediate bounds chec...
ImageRGBA::setPixel(size_t x, size_t y, value_type r, value_type g, value_type b, value_type a) { assert(x < _width); assert(y < _height); iterator data = scanline(*this, y) + 4 * x; *data = r; *(data + 1) = g; *(data + 2) = b; *(data + 3) = a; }
0
[ "CWE-189" ]
gnash
bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527
25,696,255,301,142,630,000,000,000,000,000,000,000
13
Fix crash in GnashImage.cpp
GF_Err gf_isom_insert_moov(GF_ISOFile *file) { GF_MovieHeaderBox *mvhd; if (file->moov) return GF_OK; //OK, create our boxes (mvhd, iods, ...) file->moov = (GF_MovieBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_MOOV); if (!file->moov) return GF_OUT_OF_MEM; file->moov->mov = file; //Header SetUp mvhd = (GF_MovieHeade...
0
[ "CWE-401" ]
gpac
fe5155cf047252d1c4cb91602048bfa682af0ea7
203,427,738,435,657,370,000,000,000,000,000,000,000
31
fixed #1783 (fuzz)
template<typename t> CImg<T>& operator*=(const t value) { if (is_empty()) return *this; cimg_openmp_for(*this,*ptr * value,262144); return *this;
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
138,257,124,181,275,480,000,000,000,000,000,000,000
5
.
undo_read(bufinfo_T *bi, char_u *buffer, size_t size) { int retval = OK; #ifdef FEAT_CRYPT if (bi->bi_buffer != NULL) { int size_todo = (int)size; char_u *p = buffer; while (size_todo > 0) { size_t n; if (bi->bi_used >= bi->bi_avail) { n = fread(bi->bi_buffer, 1, (size_t)CRYPT_BUF_SI...
0
[ "CWE-125", "CWE-787" ]
vim
8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa
239,221,373,049,228,100,000,000,000,000,000,000,000
46
patch 8.2.4217: illegal memory access when undo makes Visual area invalid Problem: Illegal memory access when undo makes Visual area invalid. Solution: Correct the Visual area after undo.
static void mbedtls_close_all(struct Curl_easy *data) { (void)data; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
70,509,030,624,889,450,000,000,000,000,000,000,000
4
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
dwarf_print_lines(Dwarf_Die die, Dwarf_Error * error, int *error_count) { int only_line_header = 0; int res = _dwarf_internal_printlines(die, error_count, only_line_header,error); return res; }
0
[]
libdwarf-code
faf99408e3f9f706fc3809dd400e831f989778d3
106,677,377,787,954,390,000,000,000,000,000,000,000
10
modified: libdwarf/dwarf_print_lines.c * dwarf_print_lines.c: In case of corrupted DWARF5 line header the fi_file_name field for a file entry can be null. Now we print a <no file name> string in that case to avoid passing a null to dwarfstring_append. Dwarfbug DW202010-003. Als...
static int shift_data(AVFormatContext *s) { int ret = 0, moov_size; MOVMuxContext *mov = s->priv_data; int64_t pos, pos_end = avio_tell(s->pb); uint8_t *buf, *read_buf[2]; int read_buf_id = 0; int read_size[2]; AVIOContext *read_pb; if (mov->flags & FF_MOV_FLAG_FRAGMENT) moov_si...
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
296,474,994,468,689,980,000,000,000,000,000,000,000
65
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
static void update_depend_map_for_order(JOIN *join, ORDER *order) { for (; order ; order=order->next) { table_map depend_map; order->item[0]->update_used_tables(); order->depend_map=depend_map=order->item[0]->used_tables(); order->used= 0; // Not item_sum(), RAND() and no reference to table outs...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
331,002,733,725,731,800,000,000,000,000,000,000,000
23
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static void bnx2x_pf_q_prep_general(struct bnx2x *bp, struct bnx2x_fastpath *fp, struct bnx2x_general_setup_params *gen_init, u8 cos) { gen_init->stat_id = bnx2x_stats_id(fp); gen_init->spcl_id = fp->cl_id; /* Always use mini-jumbo MTU for FCoE L2 ring */ if (IS_FCOE_FP(fp)) gen_init->mtu = BNX2X_FCOE_MINI_JUM...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
284,168,623,914,687,270,000,000,000,000,000,000,000
17
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
bool parse( char* ptr ) { if (!ptr) CV_PARSE_ERROR_CPP("Invalid input"); bool first = true; bool ok = true; FileNode root_collection(fs->getFS(), 0, 0); for(;;) { // 0. skip leading comments and directives and ... // 1. reach...
0
[ "CWE-476" ]
opencv
5691d998ead1d9b0542bcfced36c2dceb3a59023
34,137,908,680,322,044,000,000,000,000,000,000,000
79
core(persistence): added null ptr checks
static GF_Route *gf_dump_vrml_get_IS(GF_SceneDumper *sdump, GF_Node *node, GF_FieldInfo *field) { u32 i; GF_Route *r; i=0; while ((r = (GF_Route*)gf_list_enum(sdump->current_proto->sub_graph->Routes, &i))) { if (!r->IS_route) continue; if ((r->ToNode==node) && (r->ToField.fieldIndex==field->fieldIndex)) return ...
0
[ "CWE-476" ]
gpac
0102c5d4db7fdbf08b5b591b2a6264de33867a07
110,570,829,321,975,580,000,000,000,000,000,000,000
17
fixed #2232
static void update_cursor_data_simple(VirtIOGPU *g, struct virtio_gpu_scanout *s, uint32_t resource_id) { struct virtio_gpu_simple_resource *res; uint32_t pixels; res = virtio_gpu_find_resource(g, resource_id); if (!res) { ...
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
333,017,992,947,130,570,000,000,000,000,000,000,000
22
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
static struct tipc_peer *peer_nxt(struct tipc_peer *peer) { return list_first_entry(&peer->list, struct tipc_peer, list); }
0
[ "CWE-787" ]
linux
9aa422ad326634b76309e8ff342c246800621216
113,571,215,583,198,840,000,000,000,000,000,000,000
4
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...
nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd3_renameargs *args) { if (!(p = decode_fh(p, &args->ffh)) || !(p = decode_filename(p, &args->fname, &args->flen)) || !(p = decode_fh(p, &args->tfh)) || !(p = decode_filename(p, &args->tname, &args->tlen))) return 0; return xdr_argsi...
0
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
108,258,137,731,462,060,000,000,000,000,000,000,000
11
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
gs_window_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GSWindow *self; self = GS_WINDOW (object); switch (prop_id) { case PROP_LOCK_...
0
[]
gnome-screensaver
a5f66339be6719c2b8fc478a1d5fc6545297d950
66,899,636,241,701,060,000,000,000,000,000,000,000
39
Ensure keyboard grab and unlock dialog exist after monitor removal gnome-screensaver currently doesn't deal with monitors getting removed properly. If the unlock dialog is on the removed monitor then the unlock dialog and its associated keyboard grab are not moved to an existing monitor when the monitor removal is pr...
static inline void VectorAdd(const DDSVector4 left, const DDSVector4 right, DDSVector4 *destination) { destination->x = left.x + right.x; destination->y = left.y + right.y; destination->z = left.z + right.z; destination->w = left.w + right.w; }
0
[ "CWE-20", "CWE-617" ]
ImageMagick
0c5b1e430a83ef793a7334bbbee408cf3c628699
215,085,921,289,191,950,000,000,000,000,000,000,000
8
Added check to prevent image being 0x0 (reported in #489).
sftp_server_cleanup_exit(int i) { if (pw != NULL && client_addr != NULL) { handle_log_exit(); logit("session closed for local user %s from [%s]", pw->pw_name, client_addr); } _exit(i); }
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
294,156,619,683,014,050,000,000,000,000,000,000,000
9
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
verifier_load_field (VerifyContext *ctx, int token, MonoClass **out_klass, const char *opcode) { MonoClassField *field; MonoClass *klass = NULL; if (!IS_FIELD_DEF_OR_REF (token) || !token_bounds_check (ctx->image, token)) { ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid field token 0x%08x for %s at 0x%04x", to...
0
[ "CWE-20" ]
mono
cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
66,605,004,605,345,280,000,000,000,000,000,000,000
29
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 inline bool perf_sample_save_hw_index(struct perf_event *event) { return event->attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; }
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
333,203,514,214,211,500,000,000,000,000,000,000,000
4
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
void Utility::sendLocalReply(const bool& is_reset, StreamDecoderFilterCallbacks& callbacks, const LocalReplyData& local_reply_data) { absl::string_view details; if (callbacks.streamInfo().responseCodeDetails().has_value()) { details = callbacks.streamInfo().responseCodeDetails().val...
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
52,694,677,417,589,890,000,000,000,000,000,000,000
18
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
static int iswordchar(int c) { return c == '_' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); }
0
[ "CWE-703", "CWE-674" ]
mujs
160ae29578054dc09fd91e5401ef040d52797e61
124,191,963,918,476,980,000,000,000,000,000,000,000
7
Issue #162: Check stack overflow during regexp compilation. Only bother checking during the first compilation pass that counts the size of the program.
push_restarted (SoupMessage *msg, gpointer user_data) { PushHandle *handle = user_data; handle->read_status = PUSH_READ_STATUS_RESET; msg->method = SOUP_METHOD_PUT; push_setup_message (handle); }
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
85,452,491,125,686,020,000,000,000,000,000,000,000
8
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key) { Bucket *p; IS_CONSISTENT(ht); p = zend_hash_find_bucket(ht, key); return p ? 1 : 0; }
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
97,834,711,655,993,340,000,000,000,000,000,000,000
9
Fix #73832 - leave the table in a safe state if the size is too big.
rend_service_launch_establish_intro(rend_service_t *service, rend_intro_point_t *intro) { origin_circuit_t *launched; int flags = CIRCLAUNCH_NEED_UPTIME|CIRCLAUNCH_IS_INTERNAL; const or_options_t *options = get_options(); extend_info_t *launch_ei = intro->extend_info; exten...
0
[ "CWE-532" ]
tor
09ea89764a4d3a907808ed7d4fe42abfe64bd486
14,427,920,135,954,196,000,000,000,000,000,000,000
83
Fix log-uninitialized-stack bug in rend_service_intro_established. Fixes bug 23490; bugfix on 0.2.7.2-alpha. TROVE-2017-008 CVE-2017-0380
GF_Err gf_isom_hevc_config_update(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex, GF_HEVCConfig *cfg) { return gf_isom_hevc_config_update_ex(the_file, trackNumber, DescriptionIndex, cfg, GF_ISOM_HVCC_UPDATE); }
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
44,812,518,393,599,820,000,000,000,000,000,000,000
4
fix some exploitable overflows (#994, #997)
static int network_config_add_server(const oconfig_item_t *ci) /* {{{ */ { sockent_t *se; int status; if ((ci->values_num < 1) || (ci->values_num > 2) || (ci->values[0].type != OCONFIG_TYPE_STRING) || ((ci->values_num > 1) && (ci->values[1].type != OCONFIG_TYPE_STRING))) { ERROR("network plugin: ...
0
[ "CWE-835" ]
collectd
f6be4f9b49b949b379326c3d7002476e6ce4f211
66,658,474,109,669,080,000,000,000,000,000,000,000
77
network plugin: Fix endless loop DOS in parse_packet() When correct 'Signature part' is received by Collectd, configured without AuthFile option, condition for endless loop occurs due to missing increase of pointer to next unprocessed part. This is a forward-port of #2233. Fixes: CVE-2017-7401 Closes: #2174 Signed-o...
void jpc_ft_fwdlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first liftin...
0
[ "CWE-119", "CWE-787" ]
jasper
4a59cfaf9ab3d48fca4a15c0d2674bf7138e3d1a
5,288,551,709,190,221,000,000,000,000,000,000,000
104
Fixed a buffer overrun problem in the QMFB code in the JPC codec that was caused by a buffer being allocated with a size that was too small in some cases. Added a new regression test case.
void BN_GENCB_free(BN_GENCB *cb) { if (cb == NULL) return; OPENSSL_free(cb); }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
275,097,277,783,071,900,000,000,000,000,000,000,000
6
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
static int read_user_chunk_callback(png_struct *ping, png_unknown_chunkp chunk) { Image *image; /* The unknown chunk structure contains the chunk data: png_byte name[5]; png_byte *data; png_size_t size; Note that libpng has already taken care of the CRC handling. Returns one of the ...
1
[ "CWE-772", "CWE-787" ]
ImageMagick
8ca35831e91c3db8c6d281d09b605001003bec08
188,234,011,474,023,170,000,000,000,000,000,000,000
152
coders/png.c: Stop a memory leak in read_user_chunk_callback() (reference https://github.com/ImageMagick/ImageMagick/issues/517).
all_streams_prerolled (GstASFDemux * demux) { GstClockTime preroll_time; guint i, num_no_data = 0; /* Allow at least 500ms of preroll_time */ preroll_time = MAX (demux->preroll, 500 * GST_MSECOND); /* returns TRUE as long as there isn't a stream which (a) has data queued * and (b) the timestamp of last ...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
227,444,813,026,058,560,000,000,000,000,000,000,000
45
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
static double mp_jxyzc(_cimg_math_parser& mp) { const unsigned int interpolation = (unsigned int)_mp_arg(6), boundary_conditions = (unsigned int)_mp_arg(7); const CImg<T> &img = mp.imgin; const double ox = mp.mem[_cimg_mp_slot_x], oy = mp.mem[_cimg_mp_slot_y],...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
300,024,847,665,061,300,000,000,000,000,000,000,000
79
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void static_cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { if (ev == MG_EV_WRITE || ev == MG_EV_POLL) { struct mg_fd *fd = (struct mg_fd *) fn_data; // Read to send IO buffer directly, avoid extra on-stack buffer size_t n, max = 2 * MG_IO_SIZE; if (c->...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
154,883,251,879,947,200,000,000,000,000,000,000,000
17
Protect against the directory traversal in mg_upload()
static BOOL rdp_print_control_capability_set(wStream* s, UINT16 length) { UINT16 controlFlags; UINT16 remoteDetachFlag; UINT16 controlInterest; UINT16 detachInterest; WLog_INFO(TAG, "ControlCapabilitySet (length %" PRIu16 "):", length); if (length < 12) return FALSE; Stream_Read_UINT16(s, controlFlags); ...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
112,568,296,590,823,750,000,000,000,000,000,000,000
21
Fixed #6011: Bounds check in rdp_read_font_capability_set
char* PE_(r_bin_pe_get_class)(struct PE_(r_bin_pe_obj_t)* bin) { if (bin && bin->nt_headers) { switch (bin->nt_headers->optional_header.Magic) { case PE_IMAGE_FILE_TYPE_PE32: return strdup ("PE32"); case PE_IMAGE_FILE_TYPE_PE32PLUS: return strdup ("PE32+"); default: return strdup ("Unknown"); } } return NU...
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
199,221,341,007,749,880,000,000,000,000,000,000,000
10
Fix crash in pe
int crypt_get_volume_key_size(struct crypt_device *cd) { int r; if (!cd) return 0; if (isPLAIN(cd->type)) return cd->u.plain.key_size; if (isLUKS1(cd->type)) return cd->u.luks1.hdr.keyBytes; if (isLUKS2(cd->type)) { r = LUKS2_get_volume_key_size(&cd->u.luks2.hdr, CRYPT_DEFAULT_SEGMENT); if (r < 0 && ...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
130,207,267,771,749,620,000,000,000,000,000,000,000
37
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static int calc_dimension(const char* str) { int i = 1; while (*str != ']' && *str != '\0') { if (*str == ',') { i++; } str++; } return i; }
0
[ "CWE-19" ]
php-src
c8eaca013a3922e8383def6158ece2b63f6ec483
78,075,199,286,645,530,000,000,000,000,000,000,000
11
Added type checks
RZ_API void rz_core_analysis_callgraph(RzCore *core, ut64 addr, int fmt) { const char *font = rz_config_get(core->config, "graph.font"); int is_html = rz_cons_singleton()->is_html; bool refgraph = rz_config_get_i(core->config, "graph.refs"); RzListIter *iter, *iter2; int usenames = rz_config_get_i(core->config, "g...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
58,087,900,383,843,040,000,000,000,000,000,000,000
220
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static void free_pmu_context(struct pmu *pmu) { mutex_lock(&pmus_lock); free_percpu(pmu->pmu_cpu_context); mutex_unlock(&pmus_lock); }
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
259,205,840,404,917,780,000,000,000,000,000,000,000
6
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
void OpenSSLDie(const char *file,int line,const char *assertion) { OPENSSL_showfatal( "%s(%d): OpenSSL internal error, assertion failed: %s\n", file,line,assertion); #if !defined(_WIN32) || defined(__CYGWIN__) abort(); #else /* Win32 abort() customarily shows a dialog, but we just did that... */ raise(SIGABRT)...
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
162,853,544,149,693,470,000,000,000,000,000,000,000
13
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
int ssl3_send_server_key_exchange(SSL *s) { #ifndef OPENSSL_NO_RSA unsigned char *q; int j, num; RSA *rsa; unsigned char md_buf[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH]; unsigned int u; #endif #ifndef OPENSSL_NO_DH DH *dh = NULL, *dhp; #endif #ifndef OPENSSL_NO_ECDH EC_KEY *ecdh = NULL, *ecdhp...
0
[ "CWE-362" ]
openssl
3c66a669dfc7b3792f7af0758ea26fe8502ce70c
288,509,803,386,286,820,000,000,000,000,000,000,000
440
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org>
clusterip_config_get(struct clusterip_config *c) { atomic_inc(&c->refcount); }
0
[ "CWE-120" ]
linux-2.6
961ed183a9fd080cf306c659b8736007e44065a5
109,103,792,789,536,950,000,000,000,000,000,000,000
4
netfilter: ipt_CLUSTERIP: fix buffer overflow 'buffer' string is copied from userspace. It is not checked whether it is zero terminated. This may lead to overflow inside of simple_strtoul(). Changli Gao suggested to copy not more than user supplied 'size' bytes. It was introduced before the git epoch. Files "ipt_C...
bool CIRCNetwork::SetNextServer(const CServer* pServer) { for (unsigned int a = 0; a < m_vServers.size(); a++) { if (m_vServers[a] == pServer) { m_uServerIdx = a; return true; } } return false; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
201,511,793,763,325,600,000,000,000,000,000,000,000
10
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static ssize_t queue_nomerges_show(struct request_queue *q, char *page) { return queue_var_show((blk_queue_nomerges(q) << 1) | blk_queue_noxmerges(q), page); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
65,628,961,293,343,220,000,000,000,000,000,000,000
5
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
bool LibarchivePlugin::initializeReader() { m_archiveReader.reset(archive_read_new()); if (!(m_archiveReader.data())) { emit error(i18n("The archive reader could not be initialized.")); return false; } if (archive_read_support_filter_all(m_archiveReader.data()) != ARCHIVE_OK) { ...
0
[ "CWE-59", "CWE-61" ]
ark
8bf8c5ef07b0ac5e914d752681e470dea403a5bd
337,522,830,809,235,120,000,000,000,000,000,000,000
25
Pass the ARCHIVE_EXTRACT_SECURE_SYMLINKS flag to libarchive There are archive types which allow to first create a symlink and then later on dereference it. If the symlink points outside of the archive, this results in writing outside of the destination directory. With the ARCHIVE_EXTRACT_SECURE_SYMLINKS option set, l...
CmdRevokeRolesFromUser() : BasicCommand("revokeRolesFromUser") {}
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
17,066,825,528,615,985,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit
static int nfs4_xdr_dec_close(struct rpc_rqst *rqstp, struct xdr_stream *xdr, struct nfs_closeres *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto out; status = decode_pu...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
338,133,307,539,913,720,000,000,000,000,000,000,000
29
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
MOBI_RET mobi_find_attrname(MOBIResult *result, const unsigned char *data_start, const unsigned char *data_end, const char *attrname) { if (!result) { debug_print("Result structure is null%s", "\n"); return MOBI_PARAM_ERR; } result->start = result->end = NULL; *(result->value) = '\0'; ...
0
[ "CWE-703", "CWE-125" ]
libmobi
fb1ab50e448ddbed746fd27ae07469bc506d838b
104,601,316,977,032,900,000,000,000,000,000,000,000
63
Fix array boundary check when parsing inflections which could result in buffer over-read with corrupt input
int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) { kuid_t euid; kgid_t egid; int id; int next_id = ids->next_id; if (size > IPCMNI) size = IPCMNI; if (ids->in_use >= size) return -ENOSPC; idr_preload(GFP_KERNEL); spin_lock_init(&new->lock); new->deleted = 0; rcu_read_lock(); sp...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
124,151,526,064,914,100,000,000,000,000,000,000,000
48
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
mrb_singleton_class(mrb_state *mrb, mrb_value v) { struct RBasic *obj; switch (mrb_type(v)) { case MRB_TT_FALSE: if (mrb_nil_p(v)) return mrb_obj_value(mrb->nil_class); return mrb_obj_value(mrb->false_class); case MRB_TT_TRUE: return mrb_obj_value(mrb->true_class); case MRB_TT_CPTR: ret...
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
58,837,244,136,703,570,000,000,000,000,000,000,000
27
`mrb_class_real()` did not work for `BasicObject`; fix #4037
void t_cpp_generator::generate_struct_reader(ofstream& out, t_struct* tstruct, bool pointers) { if (gen_templates_) { out << indent() << "template <class Protocol_>" << endl << indent() << "uint32_t " << tstruct->get_name() << "::read(Protocol_* iprot) {" << endl; } else { indent(out) << "uint32_t "...
1
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
324,492,229,553,791,400,000,000,000,000,000,000,000
110
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
void InitOcspResponse(OcspResponse* resp, OcspEntry* single, CertStatus* status, byte* source, word32 inSz, void* heap) { WOLFSSL_ENTER("InitOcspResponse"); XMEMSET(status, 0, sizeof(CertStatus)); XMEMSET(single, 0, sizeof(OcspEntry)); XMEMSET(resp, 0, sizeof(OcspResponse)); ...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
20,697,820,000,447,014,000,000,000,000,000,000,000
16
OCSP: improve handling of OCSP no check extension
int APE::Properties::bitsPerSample() const { return d->bitsPerSample; }
0
[]
taglib
77d61c6eca4d08b9b025738acf6b926cc750db23
282,011,372,006,630,230,000,000,000,000,000,000,000
4
Make sure to not try dividing by zero
GF_Err fdsa_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem) { GF_HintSample *ptr = (GF_HintSample *)s; switch(a->type) { case GF_ISOM_BOX_TYPE_FDPA: BOX_FIELD_LIST_ASSIGN(packetTable) return GF_OK; case GF_ISOM_BOX_TYPE_EXTR: BOX_FIELD_ASSIGN(extra_data, GF_ExtraDataBox) break; } return GF_OK;
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
16,231,677,898,973,220,000,000,000,000,000,000,000
13
fixed #1757
static void update_exception_bitmap(struct kvm_vcpu *vcpu) { u32 eb; eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR) | (1u << NM_VECTOR) | (1u << DB_VECTOR); if ((vcpu->guest_debug & (KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP)) == (KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP)) ...
1
[ "CWE-399" ]
linux
54a20552e1eae07aa240fa370a0293e006b5faed
139,585,539,752,625,600,000,000,000,000,000,000,000
27
KVM: x86: work around infinite loop in microcode when #AC is delivered It was found that a guest can DoS a host by triggering an infinite stream of "alignment check" (#AC) exceptions. This causes the microcode to enter an infinite loop where the core never receives another interrupt. The host kernel panics pretty qu...
static void print_inode(struct ext2_inode *inode) { if (!inode) return; fprintf(stderr, " i_mode = %d\n", inode->i_mode); fprintf(stderr, " i_uid = %d\n", inode->i_uid); fprintf(stderr, " i_size = %d\n", inode->i_size); fprintf(stderr, " i_atime = %d\n", inode->i_atime); fprintf(stderr, " i_ctime = %d\n",...
0
[ "CWE-787" ]
e2fsprogs
8dbe7b475ec5e91ed767239f0e85880f416fc384
187,796,098,570,251,540,000,000,000,000,000,000,000
19
libsupport: add checks to prevent buffer overrun bugs in quota code A maliciously corrupted file systems can trigger buffer overruns in the quota code used by e2fsck. To fix this, add sanity checks to the quota header fields as well as to block number references in the quota tree. Addresses: CVE-2019-5094 Addresses:...
static int bpf_skb_generic_push(struct sk_buff *skb, u32 off, u32 len) { /* Caller already did skb_cow() with len as headroom, * so no need to do it here. */ skb_push(skb, len); memmove(skb->data, skb->data + len, off); memset(skb->data + off, 0, len); /* No skb_postpush_rcsum(skb, skb->data + off, len) * n...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
255,468,740,160,672,350,000,000,000,000,000,000,000
16
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static int set_invariant_sys_reg(u64 id, void __user *uaddr) { struct sys_reg_params params; const struct sys_reg_desc *r; int err; u64 val = 0; /* Make sure high bits are 0 for 32-bit regs */ if (!index_to_params(id, &params)) return -ENOENT; r = find_reg(&params, invariant_sys_regs, ARRAY_SIZE(invariant_sys_...
0
[ "CWE-20", "CWE-617" ]
linux
9e3f7a29694049edd728e2400ab57ad7553e5aa9
339,555,279,879,946,170,000,000,000,000,000,000,000
23
arm64: KVM: pmu: Fix AArch32 cycle counter access We're missing the handling code for the cycle counter accessed from a 32bit guest, leading to unexpected results. Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
static SECURITY_STATUS SEC_ENTRY kerberos_InitializeSecurityContextA( PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG* pfContextA...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
246,655,123,712,671,600,000,000,000,000,000,000,000
247
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ zend_free_op free_op1; zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VA...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
141,374,719,739,465,800,000,000,000,000,000,000,000
36
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
int main(int argc, char* argv[]) { QUtil::setLineBuf(stdout); if ((whoami = strrchr(argv[0], '/')) == NULL) { whoami = argv[0]; } else { ++whoami; } // For libtool's sake.... if (strncmp(whoami, "lt-", 3) == 0) { whoami += 3; } char const* filename = 0; size_t max...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
161,412,698,997,555,480,000,000,000,000,000,000,000
71
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int dccp_print_option(netdissect_options *ndo, const u_char *option, u_int hlen) { uint8_t optlen, i; ND_TCHECK(*option); if (*option >= 32) { ND_TCHECK(*(option+1)); optlen = *(option +1); if (optlen < 2) { if (*option >= 128) ND_PRINT((ndo, "CCID option %u optlen too short", *option)); els...
1
[ "CWE-125" ]
tcpdump
211124b972e74f0da66bc8b16f181f78793e2f66
287,760,599,165,072,160,000,000,000,000,000,000,000
127
(for 4.9.3) CVE-2018-16229/DCCP: Fix printing "Timestamp" and "Timestamp Echo" options Add some comments. Moreover: Put a function definition name at the beginning of the line. (This change was ported from commit 6df4852 in the master branch.) Ryan Ackroyd had independently identified this buffer over-read later by...
http_PutStatus(struct http *to, uint16_t status) { assert(status >= 100 && status <= 999); to->status = status; }
0
[]
Varnish-Cache
29870c8fe95e4e8a672f6f28c5fbe692bea09e9c
101,910,182,075,883,970,000,000,000,000,000,000,000
6
Check for duplicate Content-Length headers in requests If a duplicate CL header is in the request, we fail the request with a 400 (Bad Request) Fix a test case that was sending duplicate CL by misstake and would not fail because of that.
ipmi_get_session_info(struct ipmi_intf * intf, Ipmi_Session_Request_Type session_request_type, uint32_t id_or_handle) { int i, retval = 0; struct ipmi_rs * rsp; struct ipmi_rq req; uint8_t rqdata[5]; // max length of the variable length request struct get_session_info_rsp...
1
[ "CWE-120" ]
ipmitool
41d7026946fafbd4d1ec0bcaca3ea30a6e8eed22
224,137,137,758,231,100,000,000,000,000,000,000,000
109
session: Fix buffer overflow in ipmi_get_session_info Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `ipmi_get_session_info` function does not properly check the response `data_len`, which is used as a copy size, allowing stack buffer overflow.
static int sixpack_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct sixpack *sp = sp_get(tty); struct net_device *dev; unsigned int tmp, err; if (!sp) return -ENXIO; dev = sp->dev; switch(cmd) { case SIOCGIFNAME: err = copy_to_user((void __user *) arg, dev->na...
0
[ "CWE-416" ]
linux
0b9111922b1f399aba6ed1e1b8f2079c3da1aed8
46,479,928,671,683,170,000,000,000,000,000,000,000
59
hamradio: defer 6pack kfree after unregister_netdev There is a possible race condition (use-after-free) like below (USE) | (FREE) dev_queue_xmit | __dev_queue_xmit | __dev_xmit_skb | sch_direct_xmit | ... xmit_one | ...
BoundsCheckBbData* NextInBasicBlock() const { return next_in_bb_; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
259,682,584,345,308,470,000,000,000,000,000,000,000
1
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void fileblobDestroy(fileblob *fb) { assert(fb != NULL); #ifdef CL_DEBUG assert(fb->b.magic == BLOBCLASS); #endif if (fb->b.name && fb->fp) { fclose(fb->fp); if (fb->fullname) { cli_dbgmsg("fileblobDestroy: %s\n", fb->fullname); if (!fb->isNotEmpty) { ...
0
[ "CWE-476" ]
clamav-devel
8bb3716be9c7ab7c6a3a1889267b1072f48af87b
89,628,638,894,170,100,000,000,000,000,000,000,000
36
fuzz-22348 null deref in egg utf8 conversion Corrected memory leaks and a null dereference in the egg utf8 conversion.
alloc_invoke_arguments(argc, argv) int argc; VALUE *argv; { int i; int thr_crit_bup; #if TCL_MAJOR_VERSION >= 8 Tcl_Obj **av; #else /* TCL_MAJOR_VERSION < 8 */ char **av; #endif thr_crit_bup = rb_thread_critical; rb_thread_critical = Qtrue; /* memory allocation */ #if TCL_MAJOR_VE...
0
[]
tk
d098136e3f62a4879a7d7cd34bbd50f482ba3331
248,180,528,805,685,750,000,000,000,000,000,000,000
46
tcltklib.c: use StringValueCStr [ci skip] * ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core, ip_init, ip_create_slave_core, get_obj_from_str, ip_cancel_eval_core, lib_set_system_encoding, alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr instead of StringValuePtr for values to be passed to...
static void ext4_rereserve_cluster(struct inode *inode, ext4_lblk_t lblk) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); struct ext4_inode_info *ei = EXT4_I(inode); dquot_reclaim_block(inode, EXT4_C2B(sbi, 1)); spin_lock(&ei->i_block_reservation_lock); ei->i_reserved_data_blocks++; percpu_counter_add(&sbi->...
0
[ "CWE-200", "CWE-908" ]
linux
592acbf16821288ecdc4192c47e3774a4c48bb64
43,444,580,582,510,055,000,000,000,000,000,000,000
15
ext4: zero out the unused memory region in the extent tree block This commit zeroes out the unused memory region in the buffer_head corresponding to the extent metablock after writing the extent header and the corresponding extent node entries. This is done to prevent random uninitialized data from getting into the f...
int set_bitrate(struct wif *wi, int rate) { int i, newrate; if( wi_set_rate(wi, rate) ) return 1; // if( reset_ifaces() ) // return 1; //Workaround for buggy drivers (rt73) that do not accept 5.5M, but 5M instead if (rate == 5500000 && wi_get_rate(wi) != 5500000) { if( wi_set_rate(...
0
[ "CWE-787" ]
aircrack-ng
091b153f294b9b695b0b2831e65936438b550d7b
296,057,625,914,973,300,000,000,000,000,000,000,000
51
Aireplay-ng: Fixed tcp_test stack overflow (Closes #14 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2417 28c6078b-6c39-48e3-add9-af49d547ecab
stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st) { get_inode_and_dev (hdr, st); /* For POSIX systems that don't define the S_IF macros, we can't assume that S_ISfoo means the standard Unix S_IFfoo bit(s) are set. So do it manually, with a different name. Bleah. */ hdr->c_mode = (st->s...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
319,660,113,759,015,670,000,000,000,000,000,000,000
55
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
CHARSET_INFO *charset_for_protocol(void) const { return type_handler()->charset_for_protocol(this); };
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
303,306,954,859,079,670,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int io_register_rsrc(struct io_ring_ctx *ctx, void __user *arg, unsigned int size, unsigned int type) { struct io_uring_rsrc_register rr; /* keep it extendible */ if (size != sizeof(rr)) return -EINVAL; memset(&rr, 0, sizeof(rr)); if (copy_from_user(&rr, arg, size)) return -EFAULT; if (!rr.nr...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
92,114,606,243,447,130,000,000,000,000,000,000,000
25
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
subshell_exit (s) int s; { fflush (stdout); fflush (stderr); /* Do trap[0] if defined. Allow it to override the exit status passed to us. */ if (signal_is_trapped (0)) s = run_exit_trap (); sh_exit (s); }
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
200,799,982,193,684,700,000,000,000,000,000,000,000
13
commit bash-20190628 snapshot
static void bearssl_session_free(void *ptr) { free(ptr); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
250,481,613,266,307,380,000,000,000,000,000,000,000
4
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
bool CIRCNetwork::DelServer(const CString& sName, unsigned short uPort, const CString& sPass) { if (sName.empty()) { return false; } unsigned int a = 0; bool bSawCurrentServer = false; CServer* pCurServer = GetCurrentServer(); for (vector<CServer*>::iterator...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
195,950,400,675,582,500,000,000,000,000,000,000,000
50
Don't crash if user specified invalid encoding. This is CVE-2019-9917
void Item_ref::cleanup() { DBUG_ENTER("Item_ref::cleanup"); Item_ident::cleanup(); if (reference_trough_name) { /* We have to reset the reference as it may been freed */ ref= 0; } DBUG_VOID_RETURN; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
34,179,309,539,684,357,000,000,000,000,000,000,000
11
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 int selinux_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen) { int rc = selinux_inode_setsecurity(inode, XATTR_SELINUX_SUFFIX, ctx, ctxlen, 0); /* Do not return error when suppressing label (SBLABEL_MNT not set). */ return rc == -EOPNOTSUPP ? 0 : rc; }
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
40,384,059,954,661,090,000,000,000,000,000,000,000
7
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
ngx_mail_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) { ngx_mail_core_srv_conf_t *prev = parent; ngx_mail_core_srv_conf_t *conf = child; ngx_conf_merge_msec_value(conf->timeout, prev->timeout, 60000); ngx_conf_merge_msec_value(conf->resolver_timeout, prev->resolver_timeout, ...
1
[ "CWE-284", "CWE-295" ]
nginx
173f16f736c10eae46cd15dd861b04b82d91a37a
76,251,872,673,176,010,000,000,000,000,000,000,000
35
Mail: max_errors directive. Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands in Exim, specifies the number of errors after which the connection is closed.
void* Init(TfLiteContext* context, const char* buffer, size_t length) { // This is a builtin op, so we don't use the contents in 'buffer', if any. // Instead, we allocate a new object to use as scratch space for im2col, and // to carry information from Prepare() to Eval(). auto* data = new OpData; #if defined(T...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
158,719,243,051,732,900,000,000,000,000,000,000,000
10
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static int ext4_htree_next_block(struct inode *dir, __u32 hash, struct dx_frame *frame, struct dx_frame *frames, __u32 *start_hash) { struct dx_frame *p; struct buffer_head *bh; int err, num_frames = 0; __u32 bhash; p = frame; /* * Find the next leaf page by incrementing the frame pointer. * I...
0
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
290,117,274,387,773,450,000,000,000,000,000,000,000
56
ext4: Add sanity check to make_indexed_dir Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodor...
ofputil_encode_nx_packet_in(const struct ofputil_packet_in *pin, enum ofp_version version) { struct nx_packet_in *npi; struct ofpbuf *msg; size_t match_len; /* The final argument is just an estimate of the space required. */ msg = ofpraw_alloc_xid(OFPRAW_NXT_PACKET_IN, v...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
93,734,680,200,969,130,000,000,000,000,000,000,000
24
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int emulator_write_std(struct x86_emulate_ctxt *ctxt, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception, bool system) { struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt); u32 access = PFERR_WRITE_MASK; if (!system && static_call(kvm_x86_get_cpl)(vcpu) == 3) access |= PFE...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
137,899,447,630,067,800,000,000,000,000,000,000,000
13
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
GF_Box *lsr1_New() { ISOM_DECL_BOX_ALLOC(GF_LASeRSampleEntryBox, GF_ISOM_BOX_TYPE_LSR1); gf_isom_sample_entry_init((GF_SampleEntryBox*)tmp); return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
147,702,370,085,508,060,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)