func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
page_objects_list_set_page_object(fz_context *ctx, pdf_write_state *opts, int page, int object) { page_objects_list_ensure(ctx, &opts->page_object_lists, page+1); opts->page_object_lists->page[page]->page_object_number = object; }
0
[ "CWE-119" ]
mupdf
520cc26d18c9ee245b56e9e91f9d4fcae02be5f0
82,291,909,844,943,370,000,000,000,000,000,000,000
5
Bug 689699: Avoid buffer overrun. When cleaning a pdf file, various lists (of pdf_xref_len length) are defined early on. If we trigger a repair during the clean, this can cause pdf_xref_len to increase causing an overrun. Fix this by watching for changes in the length, and checking accesses to the list for validity....
static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) { struct net *net = sock_net(sk); unsigned int dir; int err = 0, delete; struct sadb_x_policy *pol; struct xfrm_policy *xp; struct km_event c; if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL) re...
0
[ "CWE-362" ]
linux
ba953a9d89a00c078b85f4b190bc1dde66fe16b5
78,732,548,509,953,710,000,000,000,000,000,000,000
40
af_key: Do not call xfrm_probe_algs in parallel When namespace support was added to xfrm/afkey, it caused the previously single-threaded call to xfrm_probe_algs to become multi-threaded. This is buggy and needs to be fixed with a mutex. Reported-by: Abhishek Shah <abhishek.shah@columbia.edu> Fixes: 283bc9f35bbb ("xf...
static void uas_cmd_cmplt(struct urb *urb) { if (urb->status) dev_err(&urb->dev->dev, "cmd cmplt err %d\n", urb->status); usb_free_urb(urb); }
0
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
9,017,682,255,791,840,000,000,000,000,000,000,000
7
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
MemoryRegion *iotlb_to_region(CPUState *cpu, hwaddr index) { AddressSpaceDispatch *d = atomic_rcu_read(&cpu->memory_dispatch); MemoryRegionSection *sections = d->map.sections; return sections[index & ~TARGET_PAGE_MASK].mr; }
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
309,050,921,225,961,770,000,000,000,000,000,000,000
7
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n", inet_sk(sk), inet_sk(sk)->inet_num, skb); if (sock_queue_rcv_skb(sk, skb) < 0) { kfree_skb(skb); pr_debug("ping_queue_rcv_skb -> failed\n"); return -1; } return 0; }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
153,725,214,145,124,760,000,000,000,000,000,000,000
11
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
string_continue(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr obj = esp - 1; if (r_size(obj)) { /* continue */ r_dec_size(obj, 1); push(1); make_int(op, *obj->value.bytes); obj->value.bytes++; esp += 2; *esp = obj[1]; return o_push_estack; } else {...
0
[]
ghostpdl
d683d1e6450d74619e6277efeebfc222d9a5cb91
254,297,342,735,259,480,000,000,000,000,000,000,000
18
Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps. We were under the impression that the Windows driver 'PScript5.dll' used superexec, but after testing with our extensive suite of PostScript file, and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear that this operator is ...
intrusive_ptr<Expression> ExpressionDateToString::parse( const boost::intrusive_ptr<ExpressionContext>& expCtx, BSONElement expr, const VariablesParseState& vps) { verify(expr.fieldNameStringData() == "$dateToString"); uassert(18629, "$dateToString only supports an object as its argumen...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
261,472,719,988,104,120,000,000,000,000,000,000,000
38
SERVER-43699 $mod should not overflow for large negative values
messageCreate(void) { message *m = (message *)cli_calloc(1, sizeof(message)); if(m) m->mimeType = NOMIME; return m; }
0
[ "CWE-125" ]
clamav-devel
586a5180287262070637c8943f2f7efd652e4a2c
9,649,463,051,738,017,000,000,000,000,000,000,000
9
bb11797 - fix invalid read in fuzzed mail file.
advertise_sasl_exit(hook_data_client_exit *data) { if (!ConfigFileEntry.sasl_service) return; if (irccmp(data->target->name, ConfigFileEntry.sasl_service)) return; sendto_local_clients_with_capability(CLICAP_CAP_NOTIFY, ":%s CAP * DEL :sasl", me.name); }
0
[ "CWE-703", "CWE-285" ]
charybdis
818a3fda944b26d4814132cee14cfda4ea4aa824
113,579,979,203,498,480,000,000,000,000,000,000,000
10
SASL: Disallow beginning : and space anywhere in AUTHENTICATE parameter This is a FIX FOR A SECURITY VULNERABILITY. All Charybdis users must apply this fix if you support SASL on your servers, or unload m_sasl.so in the meantime.
UnicodeString DecimalQuantity::toString() const { MaybeStackArray<char, 30> digits(precision + 1); for (int32_t i = 0; i < precision; i++) { digits[i] = getDigitPos(precision - i - 1) + '0'; } digits[precision] = 0; // terminate buffer char buffer8[100]; snprintf( buffer8, ...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
218,238,575,183,492,460,000,000,000,000,000,000,000
22
ICU-20246 Fixing another integer overflow in number parsing.
bool remove_dir( CephContext *cct, ObjectStore *store, SnapMapper *mapper, OSDriver *osdriver, ObjectStore::Sequencer *osr, coll_t coll, DeletingStateRef dstate, bool *finished, ThreadPool::TPHandle &handle) { vector<ghobject_t> olist; int64_t num = 0; ObjectStore::Transaction t; ghobject_t next; ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
330,468,838,179,344,540,000,000,000,000,000,000,000
65
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 ...
rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) { struct rar *rar = (struct rar *)(a->format->data); const void *h = __archive_read_ahead(a, min, avail); int ret; if (avail) { if (a->archive.read_data_is_posix_read && *avail > (ssize_t)a->archive.read_data_requested) *avail = a->a...
1
[ "CWE-416" ]
libarchive
bfcfe6f04ed20db2504db8a254d1f40a1d84eb28
169,694,895,987,441,800,000,000,000,000,000,000,000
29
rar: file split across multi-part archives must match Fuzzing uncovered some UAF and memory overrun bugs where a file in a single file archive reported that it was split across multiple volumes. This was caused by ppmd7 operations calling rar_br_fillup. This would invoke rar_read_ahead, which would in some situations ...
unsigned long vb2_fop_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct video_device *vdev = video_devdata(file); return vb2_get_unmapped_area(vdev->queue, addr, len, pgoff, flags); }
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
31,153,952,821,848,323,000,000,000,000,000,000,000
7
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
void DocumentSourceMatch::joinMatchWith(intrusive_ptr<DocumentSourceMatch> other) { BSONObjBuilder bob; BSONArrayBuilder arrBob(bob.subarrayStart("$and")); auto addPredicates = [&](const auto& predicates) { if (predicates.isEmpty()) { arrBob.append(predicates); } for (a...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
141,957,091,747,726,300,000,000,000,000,000,000,000
29
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op_array *new_op_array=NULL; int return_value_used; zval *inc_filename = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); zval tmp_inc_filename; zend_bool failure_retval=0; i...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
273,137,730,490,762,470,000,000,000,000,000,000,000
140
- 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
static void process_slab(struct loc_track *t, struct kmem_cache *s, struct page *page, enum track_item alloc) { void *addr = page_address(page); DECLARE_BITMAP(map, page->objects); void *p; bitmap_zero(map, page->objects); for_each_free_object(p, s, page->freelist) set_bit(slab_index(p, s, addr), map); for_...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
60,291,454,709,180,770,000,000,000,000,000,000,000
15
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
Status AuthorizationSession::checkAuthForGetMore(const std::string& ns) { return checkAuthForQuery(ns); }
0
[ "CWE-264" ]
mongo
c5ad04549e40b1069029026081d9324e9e06156c
248,578,918,544,948,180,000,000,000,000,000,000,000
3
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
static struct block_device *ext4_blkdev_get(dev_t dev) { struct block_device *bdev; char b[BDEVNAME_SIZE]; bdev = open_by_devnum(dev, FMODE_READ|FMODE_WRITE); if (IS_ERR(bdev)) goto fail; return bdev; fail: printk(KERN_ERR "EXT4: failed to open journal device %s: %ld\n", __bdevname(dev, b), PTR_ERR(bdev));...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
54,924,861,055,994,130,000,000,000,000,000,000,000
15
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static void ath_drain_txq_list(struct ath_softc *sc, struct ath_txq *txq, struct list_head *list) { struct ath_buf *bf, *lastbf; struct list_head bf_head; struct ath_tx_status ts; memset(&ts, 0, sizeof(ts)); ts.ts_status = ATH9K_TX_FLUSH; INIT_LIST_HEAD(&bf_head); while (!list_empty(list)) { bf = l...
0
[ "CWE-362", "CWE-241" ]
linux
21f8aaee0c62708654988ce092838aa7df4d25d8
93,358,929,805,334,000,000,000,000,000,000,000,000
26
ath9k: protect tid->sched check We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That is race condition which can result of doing list_del(&tid->list) twice (second time with poisoned list node) and cause crash like shown below: [424271.637220] BUG: unable to handle kernel paging request at 00100104 [...
static void ffs_data_put(struct ffs_data *ffs) { ENTER(); if (unlikely(atomic_dec_and_test(&ffs->ref))) { pr_info("%s(): freeing\n", __func__); ffs_data_clear(ffs); BUG_ON(waitqueue_active(&ffs->ev.waitq) || waitqueue_active(&ffs->ep0req_completion.wait)); kfree(ffs->dev_name); kfree(ffs); } }
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
305,873,845,194,509,480,000,000,000,000,000,000,000
13
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
bool dcn20_fast_validate_bw( struct dc *dc, struct dc_state *context, display_e2e_pipe_params_st *pipes, int *pipe_cnt_out, int *pipe_split_from, int *vlevel_out) { bool out = false; int pipe_cnt, i, pipe_idx, vlevel, vlevel_unsplit; bool odm_capable = context->bw_ctx.dml.ip.odm_capable; bool force_spl...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
81,360,388,743,103,850,000,000,000,000,000,000,000
262
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
bool TABLE_LIST::is_active_sjm() { return sj_mat_info && sj_mat_info->is_used; }
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
52,605,196,281,755,460,000,000,000,000,000,000,000
4
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...
EIGEN_STRONG_INLINE QInt32 operator*(const QUInt8 a, const QInt32 b) { return QInt32(static_cast<int32_t>(a.value) * b.value); }
0
[ "CWE-908", "CWE-787" ]
tensorflow
ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2
70,740,275,988,537,790,000,000,000,000,000,000,000
3
Default initialize fixed point Eigen types. In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN. PiperOrigin-RevId: 344101137 Change-Id: I14555fd...
pair<PGRef, DeletingStateRef> _dequeue() override { assert(!remove_queue.empty()); pair<PGRef, DeletingStateRef> item = remove_queue.front(); remove_queue.pop_front(); return item; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
298,549,006,578,525,440,000,000,000,000,000,000,000
6
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 ...
av_cold void ff_mpeg4videodec_static_init(void) { static int done = 0; if (!done) { ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]); ff_init_rl(&ff_rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]); ff_init_rl(&ff_rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]); ...
0
[ "CWE-703" ]
FFmpeg
3edc3b159503d512c919b3d5902f7026e961823a
128,989,956,541,274,820,000,000,000,000,000,000,000
25
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>
text_color_of (char *name) { int i = 0, sum = 0; while (name[i]) sum += name[i++]; sum %= sizeof (rcolors) / sizeof (char); return rcolors[sum]; }
0
[ "CWE-22" ]
hexchat
15600f405f2d5bda6ccf0dd73957395716e0d4d3
63,394,155,467,819,830,000,000,000,000,000,000,000
9
Sanitize network name for scrollback files This prevents using invalid chars on Windows or creating directories
int bpf_map_new_fd(struct bpf_map *map, int flags) { int ret; ret = security_bpf_map(map, OPEN_FMODE(flags)); if (ret < 0) return ret; return anon_inode_getfd("bpf-map", &bpf_map_fops, map, flags | O_CLOEXEC); }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
88,924,318,082,251,920,000,000,000,000,000,000,000
11
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
**/ inline double atof(const char *const str) { double x = 0, y = 1; return str && cimg_sscanf(str,"%lf/%lf",&x,&y)>0?x/y:0;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
289,908,766,182,765,080,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
dump_uses(const char *name, bool infodump) /* dump "use=" clauses in the appropriate format */ { char buffer[MAX_TERMINFO_LENGTH]; if (TcOutput()) trim_trailing(); _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%s%s", infodump ? "use=" : "tc=", name); wrap_concat1(buffer); }
0
[ "CWE-125" ]
ncurses
b025434573f466efe27862656a6a9d41dd2bd609
28,510,411,198,970,310,000,000,000,000,000,000,000
11
ncurses 6.1 - patch 20191012 + amend recent changes to ncurses*-config and pc-files to filter out Debian linker-flags (report by Sven Joachim, cf: 20150516). + clarify relationship between tic, infocmp and captoinfo in manpage. + check for invalid hashcode in _nc_find_type_entry and _nc_find_name_entry. > fix seve...
process_polygon2(STREAM s, POLYGON2_ORDER * os, uint32 present, RD_BOOL delta) { int index, data, next; uint8 flags = 0; RD_POINT *points; BRUSH brush; if (present & 0x0001) rdp_in_coord(s, &os->x, delta); if (present & 0x0002) rdp_in_coord(s, &os->y, delta); if (present & 0x0004) in_uint8(s, os->opcode...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
173,863,023,451,714,470,000,000,000,000,000,000,000
85
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::UsersInfoArgs args; Status status = auth::parseUsersInfoCommand(cmdObj, dbname, &args); if (!status.isOK()) { return appendCommand...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
130,441,929,989,084,820,000,000,000,000,000,000,000
99
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static void DestroyImagePixelCache(Image *image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->cache == (void *) NULL) return; image->cache=Destro...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
43,684,667,902,284,285,000,000,000,000,000,000,000
10
Set pixel cache to undefined if any resource limit is exceeded
pdf14_begin_typed_image(gx_device * dev, const gs_gstate * pgs, const gs_matrix *pmat, const gs_image_common_t *pic, const gs_int_rect * prect, const gx_drawing_color * pdcolor, const gx_clip_path * pcpath, gs_me...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
218,427,964,786,302,560,000,000,000,000,000,000,000
37
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...
void readRawInto(bool& b, FieldType fieldType) { DCHECK(fieldType == FieldType::True || fieldType == FieldType::False) << "Invalid fieldType: " << static_cast<uint8_t>(fieldType); b = fieldType == FieldType::True; }
0
[ "CWE-400", "CWE-522", "CWE-674" ]
mcrouter
97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b
109,946,966,626,948,140,000,000,000,000,000,000,000
5
Attempt to make CarbonProtocolReader::skip tail recursive Reviewed By: edenzik Differential Revision: D17967570 fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284
u32 gf_sg_get_next_available_node_id(GF_SceneGraph *sg) { u32 ID; NodeIDedItem *reg_node; if (!sg->id_node) return 1; reg_node = sg->id_node; ID = reg_node->NodeID; /*nodes are sorted*/ while (reg_node->next) { if (ID+1<reg_node->next->NodeID) return ID+1; ID = reg_node->next->NodeID; reg_node = reg_node->...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
174,587,901,889,624,960,000,000,000,000,000,000,000
15
fixed #2109
getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread, wgint restval, ccon *con, int count, wgint *last_expected_bytes, FILE *warc_tmp) { int csock, dtsock, local_sock, res; uerr_t err = RETROK; /* appease the compiler */ FILE *fp; char *respline, *tms; const char *user, ...
0
[]
wget
075d7556964f5a871a73c22ac4b69f5361295099
169,470,716,998,589,070,000,000,000,000,000,000,000
1,296
Fix IP address exposure in FTP code * src/ftp.c (getftp): Do not use PORT when PASV fails. * tests/FTPServer.px: Add pasv_not_supported server flag. * tests/Makefile.am: Add Test-ftp-pasv-not-supported.px * tests/Test-ftp-pasv-not-supported.px: New test Fix IP address exposure when automatically falling back from pas...
static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) { gdImagePtr pim = 0, tim = im; int interlace, BitsPerPixel; interlace = im->interlace; if (im->trueColor) { /* Expensive, but the only way that produces an acceptable result: mix down to a palette based temporary image. */ pim = gdImageCreatePalett...
0
[ "CWE-415" ]
php-src
089f7c0bc28d399b0420aa6ef058e4c1c120b2ae
64,295,995,795,856,870,000,000,000,000,000,000,000
27
Sync with upstream Even though libgd/libgd#492 is not a relevant bug fix for PHP, since the binding doesn't use the `gdImage*Ptr()` functions at all, we're porting the fix to stay in sync here.
static void GTextField_Replace(GTextField *gt, const unichar_t *str) { _GTextFieldReplace(gt,str); GTextField_Show(gt,gt->sel_start); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
9,670,217,069,216,168,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f) { unsigned long key; xmlHashEntryPtr entry; xmlHashEntryPtr prev = NULL; if (table == NULL || name == NULL) return(-1); key = xmlHashComputeKey(table, name,...
0
[ "CWE-399" ]
libxml2
8973d58b7498fa5100a876815476b81fd1a2412a
151,460,361,182,670,880,000,000,000,000,000,000,000
48
Add hash randomization to hash and dict structures Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash...
static int fts3NodeAddTerm( Fts3Table *p, /* Virtual table handle */ SegmentNode **ppTree, /* IN/OUT: SegmentNode handle */ int isCopyTerm, /* True if zTerm/nTerm is transient */ const char *zTerm, /* Pointer to buffer containing term */ int nTerm ...
1
[ "CWE-125" ]
sqlite
94febb3a77a8c79bc090119585fc7878f44bbf38
217,220,248,430,806,960,000,000,000,000,000,000,000
107
Improved detection of corrupt shadow tables in FTS3. Enable the debugging special-inserts for FTS3 for both SQLITE_DEBUG and SQLITE_TEST. FossilOrigin-Name: 04b2873be5aedeb1c4325cf36c4b5d180f929a641caf1e3829c03778adb29c8e
backend_extents (struct backend *b, struct connection *conn, uint32_t count, uint64_t offset, uint32_t flags, struct nbdkit_extents *extents, int *err) { struct b_conn_handle *h = &conn->handles[b->i]; int r; assert (h->can_extents >= 0); assert (backend_valid_range (b, conn, ...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
228,951,480,683,013,400,000,000,000,000,000,000,000
27
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
DEFUN (clear_ip_bgp_external_soft_in, clear_ip_bgp_external_soft_in_cmd, "clear ip bgp external soft in", CLEAR_STR IP_STR BGP_STR "Clear all external peers\n" "Soft reconfig\n" "Soft reconfig inbound update\n") { return bgp_clear_vty (vty, NULL, AFI_IP, SAFI_UN...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
281,739,693,859,635,900,000,000,000,000,000,000,000
13
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
pkinit_fini_pkinit_oids(pkinit_plg_crypto_context ctx) { if (ctx == NULL) return; /* Only call OBJ_cleanup once! */ if (--pkinit_oids_refs == 0) OBJ_cleanup(); }
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
84,616,640,766,248,200,000,000,000,000,000,000,000
9
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
static int php_stream_temp_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ { php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract; if (!ts || !ts->innerstream) { return -1; } return php_stream_stat(ts->innerstream, ssb); }
0
[ "CWE-20" ]
php-src
6297a117d77fa3a0df2e21ca926a92c231819cd5
266,187,855,356,117,300,000,000,000,000,000,000,000
9
Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
cmsBool GammaTableEquals(cmsUInt16Number* g1, cmsUInt16Number* g2, cmsUInt32Number nEntries) { return memcmp(g1, g2, nEntries* sizeof(cmsUInt16Number)) == 0; }
0
[]
Little-CMS
d1fcbdc6bcdd50432ae95e9c6f83e79338f87690
283,982,674,109,837,130,000,000,000,000,000,000,000
4
Buffer overflow fix. BuildColorantList() concatenates 32 bit data in each iteration. The max value of iteration can be 16. Thus buffer overflow can occur with storage of 128 bytes. It would need 512 bytes in worst case.
njs_typed_array_alloc(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_bool_t zeroing, njs_object_type_t type) { double num; int64_t i, length; uint32_t element_size; uint64_t size, offset; njs_int_t ret; njs_value_t *val...
1
[ "CWE-476" ]
njs
86c2c8270240d0a7a1bc4757fd2010fd989e8037
106,598,782,395,441,950,000,000,000,000,000,000,000
188
Fixed typed-array ctor when source array is changed while iterating. Previously, the function used optimization for ordinary arrays with no gaps (so called fast arrays). For a fast array code took elements directly from internal flat C array. The direct pointer may become invalid as side-effect of custom valueOf() me...
int getthebyte(jas_stream_t *in, long off) { int c; long oldpos; oldpos = jas_stream_tell(in); assert(oldpos >= 0); jas_stream_seek(in, off, SEEK_SET); c = jas_stream_peekc(in); jas_stream_seek(in, oldpos, SEEK_SET); return c; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
170,610,501,654,222,000,000,000,000,000,000,000,000
11
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl) { uint32_t retval = fdctrl->msr; fdctrl->dsr &= ~FD_DSR_PWRDOWN; fdctrl->dor |= FD_DOR_nRESET; FLOPPY_DPRINTF("main status register: 0x%02x\n", retval); return retval; }
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
67,301,949,835,040,690,000,000,000,000,000,000,000
11
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ { char line[32768], /* Line from client... */ locale[64], /* Locale */ *ptr; /* Pointer into strings */ http_status_t status; /* Transfer status */ ipp_state_t ipp_state; /* State of IPP transfer */ int bytes; /* Number of bytes t...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
66,163,498,103,230,100,000,000,000,000,000,000,000
1,552
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
mb_str2wide(char_u *s) { int *res; char_u *p; int i = 0; res = ALLOC_MULT(int, mb_charlen(s) + 1); if (res != NULL) { for (p = s; *p != NUL; ) res[i++] = mb_ptr2char_adv(&p); res[i] = NUL; } return res; }
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
161,265,709,419,895,810,000,000,000,000,000,000,000
15
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.
TPMS_SIGNATURE_RSAPSS_Marshal(TPMS_SIGNATURE_RSAPSS *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMS_SIGNATURE_RSA_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
108,365,368,842,765,070,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
evdns_getaddrinfo(struct evdns_base *dns_base, const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, evdns_getaddrinfo_cb cb, void *arg) { struct evdns_getaddrinfo_request *data; struct evutil_addrinfo hints; struct evutil_addrinfo *res = NULL; int err; int port = 0; int ...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
101,026,698,965,854,750,000,000,000,000,000,000,000
123
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 + ...
static void foreachOffset(RCore *core, const char *_cmd, const char *each) { char *cmd = strdup (_cmd); char *nextLine = NULL; ut64 addr; /* foreach list of items */ while (each) { // skip spaces while (*each == ' ') { each++; } // stahp if empty string if (!*each) { break; } // find newline ...
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
294,422,724,611,180,900,000,000,000,000,000,000,000
54
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
AlterForeignServerOwner_oid(Oid srvId, Oid newOwnerId) { HeapTuple tup; Relation rel; rel = heap_open(ForeignServerRelationId, RowExclusiveLock); tup = SearchSysCacheCopy1(FOREIGNSERVEROID, ObjectIdGetDatum(srvId)); if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
18,130,390,522,021,448,000,000,000,000,000,000,000
20
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
longlong val_int() { return longlong_from_hex_hybrid(str_value.ptr(), str_value.length()); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
295,421,238,889,146,960,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 ...
START_TEST(strjoin_test) { struct strjoin_test { char *strv[10]; const char *joiner; const char *result; } tests[] = { { { "one", "two", "three", NULL }, " ", "one two three" }, { { "one", NULL }, "x", "one" }, { { "one", "two", NULL }, "x", "onextwo" }, { { "one", "two", NULL }, ",", "one,two" }, { {...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
318,173,428,980,138,050,000,000,000,000,000,000,000
36
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static int evaluate_permissions(struct libmnt_context *cxt) { struct libmnt_table *fstab; unsigned long u_flags = 0; const char *tgt, *src, *optstr; int rc = 0, ok = 0; struct libmnt_fs *fs; assert(cxt); assert(cxt->fs); assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED)); if (!mnt_context_is_restricted(cxt)) ...
0
[ "CWE-552", "CWE-703" ]
util-linux
57202f5713afa2af20ffbb6ab5331481d0396f8d
210,022,744,998,435,060,000,000,000,000,000,000,000
160
libmount: fix UID check for FUSE umount [CVE-2021-3995] Improper UID check allows an unprivileged user to unmount FUSE filesystems of users with similar UID. Signed-off-by: Karel Zak <kzak@redhat.com>
WriteCompressedData(mat_t *mat,z_streamp z,void *data,int N, enum matio_types data_type) { int nBytes = 0, data_size, data_tag[2], byteswritten = 0; int buf_size = 1024; mat_uint8_t buf[1024], pad[8] = {0,}; if ( mat == NULL || mat->fp == NULL ) return 0; data_size = Mat_SizeOf(data_...
0
[ "CWE-190", "CWE-401" ]
matio
5fa49ef9fc4368fe3d19b5fdaa36d8fa5e7f4606
203,753,192,854,465,820,000,000,000,000,000,000,000
48
Fix integer addition overflow As reported by https://github.com/tbeu/matio/issues/121
int mainloop(CLIENT *client) { struct nbd_request request; struct nbd_reply reply; gboolean go_on=TRUE; #ifdef DODBG int i = 0; #endif negotiate(client->net, client, NULL, client->modern ? NEG_MODERN : (NEG_OLD | NEG_INIT)); DEBUG("Entering request loop!\n"); reply.magic = htonl(NBD_REPLY_MAGIC); reply.error = ...
0
[ "CWE-399", "CWE-310" ]
nbd
741495cb08503fd32a9d22648e63b64390c601f4
250,563,638,638,406,900,000,000,000,000,000,000,000
157
nbd-server: handle modern-style negotiation in a child process Previously, the modern style negotiation was carried out in the root server (listener) process before forking the actual client handler. This made it possible for a malfunctioning or evil client to terminate the root process simply by querying a non-existe...
R_API size_t r_str_len_utf8_ansi(const char *str) { int i = 0, len = 0, fullwidths = 0; while (str[i]) { char ch = str[i]; size_t chlen = __str_ansi_length (str + i); if (chlen > 1) { i += chlen - 1; } else if ((ch & 0xc0) != 0x80) { // utf8 len++; if (r_str_char_fullwidth (str + i, 4)) { fullwid...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
246,882,952,988,880,530,000,000,000,000,000,000,000
17
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...
static void init_alloc_cpu_cpu(int cpu) { int i; if (cpu_isset(cpu, kmem_cach_cpu_free_init_once)) return; for (i = NR_KMEM_CACHE_CPU - 1; i >= 0; i--) free_kmem_cache_cpu(&per_cpu(kmem_cache_cpu, cpu)[i], cpu); cpu_set(cpu, kmem_cach_cpu_free_init_once); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
153,546,055,537,656,460,000,000,000,000,000,000,000
12
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
handle_put_command(GraphicsManager *self, const GraphicsCommand *g, Cursor *c, bool *is_dirty, Image *img, CellPixelSize cell) { has_add_respose = false; if (img == NULL) img = img_by_client_id(self, g->id); if (img == NULL) { set_add_response("ENOENT", "Put command refers to non-existent image with id: %u"...
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
241,580,124,510,824,720,000,000,000,000,000,000,000
33
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
int pn_ssl_domain_allow_unsecured_client(pn_ssl_domain_t *domain) { if (!domain) return -1; if (domain->mode != PN_SSL_MODE_SERVER) { ssl_log_error("Cannot permit unsecured clients - not a server."); return -1; } domain->allow_unsecured = true; return 0; }
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
196,903,442,239,325,540,000,000,000,000,000,000,000
10
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
void LinkResolver::throw_abstract_method_error(const methodHandle& resolved_method, const methodHandle& selected_method, Klass *recv_klass, TRAPS) { Klass *resolved_klass = resolved_method->method_holder(); ResourceMark rm...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
268,747,605,248,007,130,000,000,000,000,000,000,000
36
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
dissect_kafka_elect_leaders_response_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
250,135,986,455,155,900,000,000,000,000,000,000,000
25
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) { bool fault = false; ctxt->ops->get_fpu(ctxt); asm volatile("1: fwait \n\t" "2: \n\t" ".pushsection .fixup,\"ax\" \n\t" "3: \n\t" "movb $1, %[fault] \n\t" "jmp 2b \n\t" ".popsection \n\t" _ASM_EXTABL...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
85,645,069,242,474,200,000,000,000,000,000,000,000
21
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static void conn_close(conn *c) { assert(c != NULL); /* delete the event, the socket and the conn */ event_del(&c->event); if (settings.verbose > 1) fprintf(stderr, "<%d connection closed.\n", c->sfd); conn_cleanup(c); MEMCACHED_CONN_RELEASE(c->sfd); conn_set_state(c, conn_closed...
0
[ "CWE-125" ]
memcached
554b56687a19300a75ec24184746b5512580c819
27,826,316,969,799,365,000,000,000,000,000,000,000
30
fix strncpy call to avoid ASAN violation Ensure we're only reading to the size of the smallest buffer, since they're both on the stack and could potentially overlap. Overlapping is defined as ... undefined behavior. I've looked through all available implementations of strncpy and they still only copy from the first \0...
lyd_validate_value(struct lys_node *node, const char *value) { struct lyd_node_leaf_list leaf; struct lys_node_leaf *sleaf = (struct lys_node_leaf*)node; int ret = EXIT_SUCCESS; if (!node || !(node->nodetype & (LYS_LEAF | LYS_LEAFLIST))) { LOGARG; return EXIT_FAILURE; } if (!va...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
275,325,796,775,783,150,000,000,000,000,000,000,000
43
schema tree BUGFIX do not check features while still resolving schema Fixes #723
void dccp_close(struct sock *sk, long timeout) { struct dccp_sock *dp = dccp_sk(sk); struct sk_buff *skb; u32 data_was_unread = 0; int state; lock_sock(sk); sk->sk_shutdown = SHUTDOWN_MASK; if (sk->sk_state == DCCP_LISTEN) { dccp_set_state(sk, DCCP_CLOSED); /* Special case. */ inet_csk_listen_stop(sk);...
0
[ "CWE-189" ]
linux-2.6
3e8a0a559c66ee9e7468195691a56fefc3589740
7,363,945,176,387,300,000,000,000,000,000,000,000
78
dccp: change L/R must have at least one byte in the dccpsf_val field Thanks to Eugene Teo for reporting this problem. Signed-off-by: Eugene Teo <eugenete@kernel.sg> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <da...
int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx, int (*cb)(SSL *,int *,void *)) { return tls1_ctx_callback_ctrl(ctx,SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB, (void (*)(void))cb); }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
241,232,655,972,369,180,000,000,000,000,000,000,000
6
Add SRP support.
static inline __u32 skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6) { if (!skb->l4_hash && !skb->sw_hash) { struct flow_keys keys; __u32 hash = __get_hash_from_flowi6(fl6, &keys); __skb_set_sw_hash(skb, hash, flow_keys_have_l4(&keys)); } return skb->hash;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
249,460,740,345,320,240,000,000,000,000,000,000,000
11
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static inline u64 ioat_chansts(struct ioat_chan_common *chan) { u8 ver = chan->device->version; u64 status; /* With IOAT v3.3 the status register is 64bit. */ if (ver >= IOAT_VER_3_3) status = readq(chan->reg_base + IOAT_CHANSTS_OFFSET(ver)); else status = ioat_chansts_32(chan); return status; }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
307,928,674,288,930,800,000,000,000,000,000,000,000
13
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; sctp_arg_t force = SCTP_NOFORCE(); int error; if (!sctp_vtag_verif...
0
[]
linux
196d67593439b03088913227093e374235596e33
95,571,714,119,794,470,000,000,000,000,000,000,000
105
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offset, struct inode **i) { squashfs_dir_header_3 dirh; char buffer[sizeof(squashfs_dir_entry_3) + SQUASHFS_NAME_LEN + 1] __attribute__((aligned)); squashfs_dir_entry_3 *dire = (squashfs_dir_entry_3 *) buffer; long long start; int bytes ...
1
[ "CWE-200", "CWE-59", "CWE-22" ]
squashfs-tools
e0485802ec72996c20026da320650d8362f555bd
65,180,591,611,652,100,000,000,000,000,000,000,000
132
Unsquashfs: additional write outside destination directory exploit fix An issue on github (https://github.com/plougher/squashfs-tools/issues/72) showed how some specially crafted Squashfs filesystems containing invalid file names (with '/' and '..') can cause Unsquashfs to write files outside of the destination direct...
unserialize_uep(bufinfo_T *bi, int *error, char_u *file_name) { int i; u_entry_T *uep; char_u **array = NULL; char_u *line; int line_len; uep = (u_entry_T *)U_ALLOC_LINE(sizeof(u_entry_T)); if (uep == NULL) return NULL; vim_memset(uep, 0, sizeof(u_entry_T)); #ifdef U_DEBUG uep->u...
0
[ "CWE-190" ]
vim
0c8485f0e4931463c0f7986e1ea84a7d79f10c75
113,002,822,976,245,580,000,000,000,000,000,000,000
51
patch 8.0.0378: possible overflow when reading corrupted undo file Problem: Another possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King)
int64_t mg_millis(void) { #if MG_ARCH == MG_ARCH_WIN32 return GetTickCount(); #elif MG_ARCH == MG_ARCH_ESP32 return esp_timer_get_time() / 1000; #elif MG_ARCH == MG_ARCH_ESP8266 return xTaskGetTickCount() * portTICK_PERIOD_MS; #elif MG_ARCH == MG_ARCH_FREERTOS_TCP || MG_ARCH == MG_ARCH_FREERTOS_LWIP return xTas...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
250,705,024,584,243,000,000,000,000,000,000,000,000
34
Protect against the directory traversal in mg_upload()
input_parse(struct window_pane *wp) { struct input_ctx *ictx = wp->ictx; const struct input_transition *itr; struct evbuffer *evb = wp->event->input; u_char *buf; size_t len, off; if (EVBUFFER_LENGTH(evb) == 0) return; window_update_activity(wp->window); wp->flags |= PANE_CHANGED; /* * Open th...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
44,776,640,136,840,180,000,000,000,000,000,000,000
80
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
Napi::Object Statement::Init(Napi::Env env, Napi::Object exports) { Napi::HandleScope scope(env); Napi::Function t = DefineClass(env, "Statement", { InstanceMethod("bind", &Statement::Bind), InstanceMethod("get", &Statement::Get), InstanceMethod("run", &Statement::Run), InstanceMethod("...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
196,847,304,292,695,100,000,000,000,000,000,000,000
16
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
void fx_TypedArray_prototype_map(txMachine* the) { mxTypedArrayDeclarations; txSlot* function = fxArgToCallback(the, 0); fxCreateTypedArraySpecies(the); mxPushNumber(length); mxRunCount(1); mxPullSlot(mxResult); { mxResultTypedArrayDeclarations; txU2 shift = resultDispatch->value.typedArray.dispatch->shift; ...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
276,481,273,768,041,340,000,000,000,000,000,000,000
25
XS: #896
void CLASS fuji_rotate() { int i, row, col; double step; float r, c, fr, fc; unsigned ur, uc; ushort wide, high, (*img)[4], (*pix)[4]; if (!fuji_width) return; #ifdef DCRAW_VERBOSE if (verbose) fprintf (stderr,_("Rotating image 45 degrees...\n")); #endif fuji_width = (fuji_width - 1 + shrink) >> sh...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
271,653,387,201,172,600,000,000,000,000,000,000,000
47
backported 0.15.4 datachecks
u32 gf_latm_get_value(GF_BitStream *bs) { u32 i, tmp, value = 0; u32 bytesForValue = gf_bs_read_int(bs, 2); for (i = 0; i <= bytesForValue; i++) { value <<= 8; tmp = gf_bs_read_int(bs, 8); value += tmp; } return value; }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
331,158,742,024,880,270,000,000,000,000,000,000,000
11
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
inotify_dev_get_last_event(struct inotify_device *dev) { if (list_empty(&dev->events)) return NULL; return list_entry(dev->events.prev, struct inotify_kernel_event, list); }
0
[ "CWE-399" ]
linux-2.6
3632dee2f8b8a9720329f29eeaa4ec4669a3aff8
112,655,674,781,071,650,000,000,000,000,000,000,000
6
inotify: clean up inotify_read and fix locking problems If userspace supplies an invalid pointer to a read() of an inotify instance, the inotify device's event list mutex is unlocked twice. This causes an unbalance which effectively leaves the data structure unprotected, and we can trigger oopses by accessing the inot...
static int hwpoison_filter_task(struct page *p) { if (!hwpoison_filter_memcg) return 0; if (page_cgroup_ino(p) != hwpoison_filter_memcg) return -EINVAL; return 0; }
0
[]
linux
46612b751c4941c5c0472ddf04027e877ae5990f
184,474,025,042,808,900,000,000,000,000,000,000,000
10
mm: hwpoison: fix thp split handing in soft_offline_in_use_page() When soft_offline_in_use_page() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): Memory failure: 0x3755ff: non anonymous thp __get_any_page: 0x3755ff: unknown zero refcount page type 2fffff80000000 Soft offli...
static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1, free_op2; if (IS_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switc...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
175,494,800,585,532,700,000,000,000,000,000,000,000
31
- 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
bool checkreturn pb_skip_varint(pb_istream_t *stream) { uint8_t byte; do { if (!pb_read(stream, &byte, 1)) return false; } while (byte & 0x80); return true; }
0
[ "CWE-125" ]
nanopb
7b396821ddd06df8e39143f16e1dc0a4645b89a3
89,952,592,128,958,310,000,000,000,000,000,000,000
10
Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)
static void sv_usage(void) { BIO_printf(bio_err,"usage: s_server [args ...]\n"); BIO_printf(bio_err,"\n"); BIO_printf(bio_err," -accept arg - port to accept on (default is %d)\n",PORT); BIO_printf(bio_err," -context arg - set session ID context\n"); BIO_printf(bio_err," -verify arg - turn on peer certificate...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
289,592,728,465,849,230,000,000,000,000,000,000,000
102
Add SRP support.
inline const char* filenamerand() { cimg::mutex(6); static char randomid[9]; for (unsigned int k = 0; k<8; ++k) { const int v = (int)cimg::rand(65535)%3; randomid[k] = (char)(v==0?('0' + ((int)cimg::rand(65535)%10)): (v==1?('a' + ((int)cimg::rand(65535)...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
47,066,488,753,580,300,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status) { struct l2cap_conn *conn; BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); if (hcon->type != ACL_LINK) return 0; if (!status) { conn = l2cap_conn_add(hcon, status); if (conn) l2cap_conn_ready(conn); } else l2cap_...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
304,630,993,687,738,700,000,000,000,000,000,000,000
18
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
char *r_pkcs7_cms_dump (RCMS* container) { RPKCS7SignedData *sd; ut32 i, length, p = 0; int r; char *buffer = NULL, *tmp = NULL; if (!container) { return NULL; } sd = &container->signedData; length = 2048 + (container->signedData.certificates.length * 1024); if(!length) { return NULL; } buffer = (char*) ...
0
[ "CWE-476" ]
radare2
7ab66cca5bbdf6cb2d69339ef4f513d95e532dbf
144,276,341,680,058,870,000,000,000,000,000,000,000
79
Fix #7152 - Null deref in cms
method_to_str(unsigned short m) { switch (m) { case HTTP_DELETE: return delete_sym; case HTTP_GET: return get_sym; case HTTP_HEAD: return head_sym; case HTTP_POST: return post_sym; case HTTP_PUT: return put_sym; case HTTP_CONNECT: return connect_sym; case H...
0
[]
node
c9a231db0e59658be419d926b1dfa17b939ba158
185,782,619,822,275,560,000,000,000,000,000,000,000
29
typo in node_http_parser
static void add_key_fields_for_nj(JOIN *join, TABLE_LIST *nested_join_table, KEY_FIELD **end, uint *and_level, SARGABLE_PARAM **sargables) { List_iterator<TABLE_LIST> li(nested_join_table->nested_join->join_list); List_iterator<TABLE_LIST> li2(nest...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
38,020,807,419,244,224,000,000,000,000,000,000,000
34
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...
ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, struct ext4_ext_path *path, ext4_fsblk_t *partial_cluster, ext4_lblk_t start, ext4_lblk_t end) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); int err = 0, correct_index = 0; int depth = ext_depth(inode), credits; struct ext4_extent_header *eh; ext4_...
0
[ "CWE-362" ]
linux-2.6
dee1f973ca341c266229faa5a1a5bb268bed3531
178,613,066,365,606,540,000,000,000,000,000,000,000
171
ext4: race-condition protection for ext4_convert_unwritten_extents_endio We assumed that at the time we call ext4_convert_unwritten_extents_endio() extent in question is fully inside [map.m_lblk, map->m_len] because it was already split during submission. But this may not be true due to a race between writeback vs fa...
SCM_DEFINE (scm_mkdir, "mkdir", 1, 1, 0, (SCM path, SCM mode), "Create a new directory named by @var{path}. If @var{mode} is omitted\n" "then the permissions of the directory are set to @code{#o777}\n" "masked with the current umask (@pxref{Processes, @code{umask}}).\n" "Otherwise they ...
0
[]
guile
245608911698adb3472803856019bdd5670b6614
317,441,240,695,773,850,000,000,000,000,000,000,000
20
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
ecb_ews_restore_original_comp (ECalComponent *from_comp) { ECalComponent *comp = NULL; const gchar *original_base64; guchar *decoded; gsize len = -1; g_return_val_if_fail (E_IS_CAL_COMPONENT (from_comp), NULL); original_base64 = e_cal_util_get_x_property (e_cal_component_get_icalcomponent (from_comp), X_EWS_ORI...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
246,308,985,466,277,800,000,000,000,000,000,000,000
36
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void mdvi_setpage(DviContext *dvi, int pageno) { if(pageno < 0) pageno = 0; if(pageno > dvi->npages-1) pageno = dvi->npages - 1; dvi->currpage = pageno; }
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
187,519,873,926,098,500,000,000,000,000,000,000,000
8
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
static inline void kvm_irq_routing_update(struct kvm *kvm, struct kvm_irq_routing_table *irq_rt) { rcu_assign_pointer(kvm->irq_routing, irq_rt); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
8,892,212,217,428,008,000,000,000,000,000,000,000
5
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static void bpf_flush_icache(void *start, void *end) { mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); smp_wmb(); flush_icache_range((unsigned long)start, (unsigned long)end); set_fs(old_fs); }
0
[ "CWE-17" ]
net
3f7352bf21f8fd7ba3e2fcef9488756f188e12be
331,157,120,287,316,270,000,000,000,000,000,000,000
9
x86: bpf_jit: fix compilation of large bpf programs x86 has variable length encoding. x86 JIT compiler is trying to pick the shortest encoding for given bpf instruction. While doing so the jump targets are changing, so JIT is doing multiple passes over the program. Typical program needs 3 passes. Some very short progr...
ns_clientmgr_destroy(ns_clientmgr_t **managerp) { isc_result_t result; ns_clientmgr_t *manager; bool unlock = false; REQUIRE(managerp != NULL); manager = *managerp; *managerp = NULL; REQUIRE(VALID_MANAGER(manager)); MTRACE("destroy"); /* * Check for success because we may already be task-exclusive * at ...
0
[ "CWE-617" ]
bind9
15996f0cb15631b95a801e3e88928494a69ad6ee
74,845,850,818,860,550,000,000,000,000,000,000,000
32
ns_client_error() could assert if rcode was overridden to NOERROR The client->rcode_override was originally created to force the server to send SERVFAIL in some cases when it would normally have sent FORMERR. More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2 commit (part of GL #2790) to force the...
int nfs_write_need_commit(struct nfs_write_data *data) { if (data->verf.committed == NFS_DATA_SYNC) return data->header->lseg == NULL; return data->verf.committed != NFS_FILE_SYNC; }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
242,760,458,689,069,560,000,000,000,000,000,000,000
6
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...
static SLJIT_INLINE void do_reset_match(compiler_common *common, int length) { DEFINE_COMPILER; struct sljit_label *loop; int i; SLJIT_ASSERT(length > 1); /* OVECTOR(1) contains the "string begin - 1" constant. */ if (length > 2) OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1)); if (length < 8) { for (i...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
156,577,004,673,547,060,000,000,000,000,000,000,000
53
Fixed a unicode properrty matching issue in JIT