func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void dcn10_clock_source_destroy(struct clock_source **clk_src) { kfree(TO_DCE110_CLK_SRC(*clk_src)); *clk_src = NULL; }
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
176,085,259,165,528,350,000,000,000,000,000,000,000
5
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
void CoreUserInputHandler::issueQuit(const QString &reason) { emit putCmd("QUIT", serverEncode(reason)); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
240,981,230,194,819,240,000,000,000,000,000,000,000
4
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
g_file_new_tmp (const char *tmpl, GFileIOStream **iostream, GError **error) { gint fd; gchar *path; GFile *file; GFileOutputStream *output; g_return_val_if_fail (iostream != NULL, NULL); fd = g_file_open_tmp (tmpl, &path, error); if (fd == -1) return NULL; ...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
234,083,301,842,312,900,000,000,000,000,000,000,000
25
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
void Magick::Image::adaptiveBlur(const double radius_,const double sigma_) { MagickCore::Image *newImage; GetPPException; newImage=AdaptiveBlurImage(constImage(),radius_,sigma_,exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
319,584,976,803,547,400,000,000,000,000,000,000,000
10
Added missing return to avoid use after free.
static int compat_nfs_svc_trans(struct nfsctl_arg *karg, struct compat_nfsctl_arg __user *arg) { if (!access_ok(VERIFY_READ, &arg->ca32_svc, sizeof(arg->ca32_svc)) || get_user(karg->ca_version, &arg->ca32_version) || __get_user(karg->ca_svc.svc_port, &arg->ca32_svc.svc32_port) || __get_user(karg->ca_svc.svc_...
0
[]
linux-2.6
822191a2fa1584a29c3224ab328507adcaeac1ab
137,311,404,663,951,650,000,000,000,000,000,000,000
11
[PATCH] skip data conversion in compat_sys_mount when data_page is NULL OpenVZ Linux kernel team has found a problem with mounting in compat mode. Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode leads to oops: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp...
static void esp_output_encap_csum(struct sk_buff *skb) { /* UDP encap with IPv6 requires a valid checksum */ if (*skb_mac_header(skb) == IPPROTO_UDP) { struct udphdr *uh = udp_hdr(skb); struct ipv6hdr *ip6h = ipv6_hdr(skb); int len = ntohs(uh->len); unsigned int offset = skb_transport_offset(skb); __wsum cs...
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
329,324,944,182,528,150,000,000,000,000,000,000,000
16
esp: Fix possible buffer overflow in ESP transformation The maximum message size that can be send is bigger than the maximum site that skb_page_frag_refill can allocate. So it is possible to write beyond the allocated buffer. Fix this by doing a fallback to COW in that case. v2: Avoid get get_order() costs as sugg...
MagickExport MagickBooleanType FunctionImage(Image *image, const MagickFunction function,const size_t number_parameters, const double *parameters,ExceptionInfo *exception) { #define FunctionImageTag "Function/Image " CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
025e77fcb2f45b21689931ba3bf74eac153afa48
128,919,894,374,743,970,000,000,000,000,000,000,000
91
https://github.com/ImageMagick/ImageMagick/issues/1615
void write_events_details(int s) { int n; char buff[80]; struct upnp_event_notify * obj; struct subscriber * sub; write(s, "Events details :\n", 17); for(obj = notifylist.lh_first; obj != NULL; obj = obj->entries.le_next) { n = snprintf(buff, sizeof(buff), " %p sub=%p state=%d s=%d\n", obj, obj->...
0
[ "CWE-200", "CWE-252" ]
miniupnp
bec6ccec63cadc95655721bc0e1dd49dac759d94
219,963,355,780,761,300,000,000,000,000,000,000,000
24
upnp_event_prepare(): check the return value of snprintf()
_gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue, gcry_ctx_t ctx) { mpi_ec_t ec = _gcry_ctx_get_pointer (ctx, CONTEXT_TYPE_EC); return _gcry_ecc_set_mpi (name, newvalue, ec); }
0
[ "CWE-200" ]
libgcrypt
88e1358962e902ff1cbec8d53ba3eee46407851a
52,316,443,464,783,800,000,000,000,000,000,000,000
7
ecc: Constant-time multiplication for Weierstrass curve. * mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary method for Weierstrass curve when SCALAR is secure.
PHP_FUNCTION(mkdir) { char *dir; int dir_len; zval *zcontext = NULL; long mode = 0777; zend_bool recursive = 0; php_stream_context *context; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lbr", &dir, &dir_len, &mode, &recursive, &zcontext) == FAILURE) { RETURN_FALSE; } context = php_stream_context...
1
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
74,091,355,230,748,000,000,000,000,000,000,000,000
17
- 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 trio_get_quote TRIO_ARGS1((ref), trio_pointer_t ref) { return (((trio_reference_t*)ref)->parameter->flags & FLAGS_QUOTE) ? TRUE : FALSE; }
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
263,598,095,625,701,330,000,000,000,000,000,000,000
4
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
TEST(ExpressionObjectParse, ShouldAcceptNestedObjects) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); VariablesParseState vps = expCtx->variablesParseState; auto object = ExpressionObject::parse(expCtx, fromjson("{a: {b: 1}, c: {d: {e: 1, f: 1}}}"), vps); auto ...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
336,920,502,606,204,340,000,000,000,000,000,000,000
10
SERVER-38070 fix infinite loop in agg expression
static void *createIntegerObject(const redisReadTask *task, long long value) { redisReply *r, *parent; r = createReplyObject(REDIS_REPLY_INTEGER); if (r == NULL) return NULL; r->integer = value; if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_R...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
174,767,716,129,759,600,000,000,000,000,000,000,000
19
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
QString Helper::lastWarningString() { return m_warningString; }
0
[ "CWE-59", "CWE-61" ]
deepin-clone
e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab
18,788,203,809,754,967,000,000,000,000,000,000,000
4
fix: Do not use the "/tmp" directory https://github.com/linuxdeepin/deepin-clone/issues/16 https://bugzilla.opensuse.org/show_bug.cgi?id=1130388
void composite_suspend(struct usb_gadget *gadget) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_function *f; /* REVISIT: should we have config level * suspend/resume callbacks? */ DBG(cdev, "suspend\n"); if (cdev->config) { list_for_each_entry(f, &cdev->config->functions, list) { ...
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
85,677,903,715,302,130,000,000,000,000,000,000,000
23
USB: gadget: validate interface OS descriptor requests Stall the control endpoint in case provided index exceeds array size of MAX_CONFIG_INTERFACES or when the retrieved function pointer is null. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregk...
static BOOL gdi_Glyph_BeginDraw(rdpContext* context, INT32 x, INT32 y, INT32 width, INT32 height, UINT32 bgcolor, UINT32 fgcolor, BOOL fOpRedundant) { rdpGdi* gdi; if (!context || !context->gdi) return FALSE; gdi = context->gdi; if (!gdi->drawing ...
0
[ "CWE-190", "CWE-787" ]
FreeRDP
09b9d4f1994a674c4ec85b4947aa656eda1aed8a
307,850,853,370,605,640,000,000,000,000,000,000,000
54
Fixed CVE-2018-8787 Thanks to Eyal Itkin from Check Point Software Technologies.
Status check_index_ordering(const Tensor& indices) { auto findices = indices.flat<int>(); for (std::size_t i = 0; i < findices.dimension(0) - 1; ++i) { if (findices(i) < findices(i + 1)) { continue; } return Status( errors::InvalidArgument("Indices are not strictly ordere...
1
[ "CWE-125", "CWE-824" ]
tensorflow
532f5c5a547126c634fefd43bbad1dc6417678ac
300,676,102,485,457,530,000,000,000,000,000,000,000
14
Prevent nullptr deref in validation of indexes in map ops. PiperOrigin-RevId: 387738023 Change-Id: I83d18d36a7b82ffd2a40b5124a4e5b4c72238f27
OPJ_BOOL opj_j2k_mct_validation ( opj_j2k_t * p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { OPJ_BOOL l_is_valid = OPJ_TRUE; OPJ_UINT32 i,j; ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
55,585,248,644,327,960,000,000,000,000,000,000,000
32
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
static inline uint64_t vring_desc_addr(hwaddr desc_pa, int i) { hwaddr pa; pa = desc_pa + sizeof(VRingDesc) * i + offsetof(VRingDesc, addr); return ldq_phys(&address_space_memory, pa); }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
30,841,309,910,547,676,000,000,000,000,000,000,000
6
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
static int FVScroll(GGadget *g, GEvent *e) { FontView *fv = GGadgetGetUserData(g); int newpos = fv->rowoff; struct sbevent *sb = &e->u.control.u.sb; switch( sb->type ) { case et_sb_top: newpos = 0; break; case et_sb_uppage: newpos -= fv->rowcnt; break; case...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
74,585,752,024,013,190,000,000,000,000,000,000,000
40
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void ssl3_free(SSL *s) { if(s == NULL) return; ssl3_cleanup_key_block(s); if (s->s3->rbuf.buf != NULL) OPENSSL_free(s->s3->rbuf.buf); if (s->s3->wbuf.buf != NULL) OPENSSL_free(s->s3->wbuf.buf); if (s->s3->rrec.comp != NULL) OPENSSL_free(s->s3->rrec.comp); #ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NU...
0
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
218,256,156,029,975,500,000,000,000,000,000,000,000
30
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
int git_path_diriter_fullpath( const char **out, size_t *out_len, git_path_diriter *diriter) { assert(out && out_len && diriter); *out = diriter->path.ptr; *out_len = diriter->path.size; return 0; }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
7,792,875,537,539,797,000,000,000,000,000,000,000
11
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
static bool test_writex(struct torture_context *tctx, struct smbcli_state *cli) { union smb_write io; NTSTATUS status; bool ret = true; int fnum, i; uint8_t *buf; const int maxsize = 90000; const char *fname = BASEDIR "\\test.txt"; unsigned int seed = time(NULL); union smb_fileinfo finfo; int max_bits=63; ...
0
[ "CWE-200" ]
samba
a60863458dc6b60a09aa8d31fada6c36f5043c76
25,754,583,055,662,623,000,000,000,000,000,000,000
181
CVE-2022-32742: s4: torture: Add raw.write.bad-write test. Reproduces the test code in: BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085 Add knownfail. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
void flush_vsx_to_thread(struct task_struct *tsk) { if (tsk->thread.regs) { preempt_disable(); if (tsk->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP)) { BUG_ON(tsk != current); giveup_vsx(tsk); } preempt_enable(); } }
0
[ "CWE-862" ]
linux
8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
1,803,254,200,751,538,300,000,000,000,000,000,000
11
powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn'...
ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags, splice_actor *actor) { ssize_t ret; struct inode *inode = out->f_mapping->host; /* * The actor worker might be calling ->prepare_write and * ->commit_write. Most of the time, these expe...
0
[ "CWE-264" ]
linux-2.6
8c34e2d63231d4bf4852bac8521883944d770fe3
222,298,524,524,505,740,000,000,000,000,000,000,000
19
[PATCH] Remove SUID when splicing into an inode Originally from Mark Fasheh <mark.fasheh@oracle.com> generic_file_splice_write() does not remove S_ISUID or S_ISGID. This is inconsistent with the way we generally write to files. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Jens Axboe <jens.axboe...
static int cbs_jpeg_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit) { CodedBitstreamJPEGContext *priv = ctx->priv_data; PutBitContext pbc; int err; if (!priv->write_buffer) { // Initial write buffer size is 1MB. priv->write_buffer_size = ...
0
[ "CWE-787" ]
FFmpeg
a3a3730b5456ca00587455004d40c047f7b20a99
172,230,623,366,917,900,000,000,000,000,000,000,000
54
avcodec/cbs_jpeg: Check length for SOS Fixes: out of array access Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 Found-by: continuous fuzzing process https://github.com/google/oss...
static bool is_inf(const int) { return false; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
22,836,189,748,991,450,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
*/ static inline int ext4_fs_is_busy(struct ext4_sb_info *sbi) { return (atomic_read(&sbi->s_lock_busy) > EXT4_CONTENTION_THRESHOLD);
0
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
335,339,299,895,888,300,000,000,000,000,000,000,000
4
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
QPDFObjectHandle::isNull() { dereference(); return QPDFObjectTypeAccessor<QPDF_Null>::check(m->obj.getPointer()); }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
310,370,811,573,633,300,000,000,000,000,000,000,000
5
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
static int sony_resume(struct hid_device *hdev) { struct sony_sc *sc = hid_get_drvdata(hdev); /* * The Sixaxis and navigation controllers on USB need to be * reinitialized on resume or they won't behave properly. */ if ((sc->quirks & SIXAXIS_CONTROLLER_USB) || (sc->quirks & NAVIGATION_CONTROLLER_USB)) { s...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
188,633,275,805,772,780,000,000,000,000,000,000,000
16
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
ZEND_VM_COLD_CONSTCONST_HANDLER(90, ZEND_FETCH_DIM_IS, CONST|TMPVAR|CV, CONST|TMPVAR|CV) { USE_OPLINE zend_free_op free_op1, free_op2; zval *container; SAVE_OPLINE(); container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_IS); zend_fetch_dimension_address_read_IS(container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE OPLINE_C...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
173,317,469,688,221,960,000,000,000,000,000,000,000
13
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
void Item_subselect::get_cache_parameters(List<Item> &parameters) { Collect_deps_prm prm= {&parameters, // parameters unit->first_select()->nest_level_base, // nest_level_base 0, // count unit->first_select()->nest_level, // nest_level TRUE ...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
141,692,558,835,170,140,000,000,000,000,000,000,000
10
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
bool MonConnection::have_session() const { return state == State::HAVE_SESSION; }
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
188,796,876,495,486,100,000,000,000,000,000,000,000
4
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static void hns_rcb_set_port_desc_cnt(struct rcb_common_cb *rcb_common, u32 port_idx, u32 desc_cnt) { dsaf_write_dev(rcb_common, RCB_CFG_BD_NUM_REG + port_idx * 4, desc_cnt); }
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
294,176,648,388,165,870,000,000,000,000,000,000,000
6
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
ccss_unrecoverable_error (CRDocHandler * a_handler) { /* yup, like i care about CSS parsing errors ;-) ignore, chug along */ g_warning (_("CSS unrecoverable error\n")); }
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
83,178,367,463,090,950,000,000,000,000,000,000,000
6
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
static int setcos_list_files(sc_card_t *card, u8 * buf, size_t buflen) { sc_apdu_t apdu; int r; sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xAA, 0, 0); if (card->type == SC_CARD_TYPE_SETCOS_44 || card->type == SC_CARD_TYPE_SETCOS_NIDEL || SETCOS_IS_EID_APPLET(card)) apdu.cla = 0x80; apdu.resp ...
0
[ "CWE-125" ]
OpenSC
c3f23b836e5a1766c36617fe1da30d22f7b63de2
136,171,322,567,121,560,000,000,000,000,000,000,000
21
fixed UNKNOWN READ Reported by OSS-Fuzz https://oss-fuzz.com/testcase-detail/5681169970757632
copy_file_progress_callback (goffset current_num_bytes, goffset total_num_bytes, gpointer user_data) { ProgressData *pdata; goffset new_size; pdata = user_data; new_size = current_num_bytes - pdata->last_size; if (new_size > 0) { ...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
44,518,317,421,695,300,000,000,000,000,000,000,000
20
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { int ret = 0; int avail, tlen; xmlChar cur, next; const xmlChar *lastlt, *lastgt; if (ctxt->input == NULL) return(0); #ifdef DEBUG_PUSH switch (ctxt->instate) { case XML_PARSER_EOF: xmlGenericError(xmlGenericErrorContext,...
1
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
160,276,695,918,049,420,000,000,000,000,000,000,000
929
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
int json_object_set_new_nocheck(json_t *json, const char *key, json_t *value) { json_object_t *object; if(!value) return -1; if(!key || !json_is_object(json) || json == value) { json_decref(value); return -1; } object = json_to_object(json); if(hashtable_set(&objec...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
101,425,742,464,190,130,000,000,000,000,000,000,000
22
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
pdf_close_text_contents(gx_device_pdf *pdev) { /* * Clear the font pointer. This is probably left over from old code, * but it is appropriate in case we ever choose in the future to write * out and free font resources before the end of the document. */ pdf_text_state_t *pts = pdev->text->te...
0
[ "CWE-119" ]
ghostpdl
39b1e54b2968620723bf32e96764c88797714879
272,120,276,778,814,100,000,000,000,000,000,000,000
12
pdfwrite - Guard against trying to output an infinite number Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf" The file uses an enormous parameter to xyxhow, causing an overflow in the calculation of text positioning (value > 1e39). Since this is basically a nonsense value, and ...
static int interrupt_window_interception(struct kvm_vcpu *vcpu) { kvm_make_request(KVM_REQ_EVENT, vcpu); svm_clear_vintr(to_svm(vcpu)); /* * For AVIC, the only reason to end up here is ExtINTs. * In this case AVIC was temporarily disabled for * requesting the IRQ window and we have to re-enable it. */ svm_...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
312,577,796,484,467,870,000,000,000,000,000,000,000
15
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
obtain_nonce(unsigned char* nonce) { NTSTATUS status; status = BCryptGenRandom(NULL, nonce, 8, BCRYPT_USE_SYSTEM_PREFERRED_RNG); if (!NT_SUCCESS(status)) return (-1); return (0); }
0
[ "CWE-119", "CWE-908", "CWE-22" ]
libu2f-host
e4bb58cc8b6202a421e65f8230217d8ae6e16eb5
142,681,993,372,860,690,000,000,000,000,000,000,000
12
fix filling out of initresp
static DWORD WINAPI _events_thread(void* arg) { CImgDisplay *const disp = (CImgDisplay*)(((void**)arg)[0]); const char *const title = (const char*)(((void**)arg)[1]); MSG msg; delete[] (void**)arg; disp->_bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); disp->_bmi.bmiHeader.biWi...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
135,670,439,347,034,450,000,000,000,000,000,000,000
70
.
void snd_usbmidi_input_stop(struct list_head *p) { struct snd_usb_midi *umidi; unsigned int i, j; umidi = list_entry(p, struct snd_usb_midi, list); if (!umidi->input_running) return; for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i]; if (ep->in) for (j = 0...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
116,004,496,206,395,240,000,000,000,000,000,000,000
16
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
void ConnectionManagerImpl::onIdleTimeout() { ENVOY_CONN_LOG(debug, "idle timeout", read_callbacks_->connection()); stats_.named_.downstream_cx_idle_timeout_.inc(); if (!codec_) { // No need to delay close after flushing since an idle timeout has already fired. Attempt to // write out buffered data one la...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
40,525,693,797,659,224,000,000,000,000,000,000,000
11
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) { struct acpi_table_hpet *hpet_tbl; struct resource *hpet_res; resource_size_t res_start; if (!phys || !size) return -EINVAL; hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size); if (!hpet_tbl) { printk(KERN_WARNING PREF...
0
[]
linux-2.6
f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff
73,361,527,373,490,630,000,000,000,000,000,000,000
60
[PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@suse.de>
void LibRaw::adjust_bl() { int clear_repeat=0; if (O.user_black >= 0) { C.black = O.user_black; clear_repeat = 1; } for(int i=0; i<4; i++) if(O.user_cblack[i]>-1000000) { C.cblack[i] = O.user_cblack[i]; clear_repeat = 1; } if(clear_repeat) C...
0
[ "CWE-787" ]
LibRaw
8682ad204392b914ab1cc6ebcca9c27c19c1a4b4
289,147,711,790,073,860,000,000,000,000,000,000,000
73
0.18.17
bool TABLE_LIST::is_with_table() { return derived && derived->with_element; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
208,420,893,504,354,200,000,000,000,000,000,000,000
4
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static int do_recv_XAnyEvent(rpc_message_t *message, XEvent *xevent) { uint32_t serial, send_event, window; int error; if ((error = rpc_message_recv_uint32(message, &serial)) < 0) return error; if ((error = rpc_message_recv_uint32(message, &send_event)) < 0) return error; // display shall be filled in by th...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
67,145,218,520,058,860,000,000,000,000,000,000,000
16
Support all the new variables added
ttwu_stat(struct task_struct *p, int cpu, int wake_flags) { #ifdef CONFIG_SCHEDSTATS struct rq *rq = this_rq(); #ifdef CONFIG_SMP int this_cpu = smp_processor_id(); if (cpu == this_cpu) { schedstat_inc(rq, ttwu_local); schedstat_inc(p, se.statistics.nr_wakeups_local); } else { struct sched_domain *sd; sc...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
33,106,180,351,411,047,000,000,000,000,000,000,000
38
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
zfs_zaccess_aces_check(znode_t *zp, uint32_t *working_mode, boolean_t anyaccess, cred_t *cr) { zfsvfs_t *zfsvfs = zp->z_zfsvfs; zfs_acl_t *aclp; int error; uid_t uid = crgetuid(cr); uint64_t who; uint16_t type, iflags; uint16_t entry_type; uint32_t access_mask; uint32_t deny_mask = 0; zfs_ace_hdr_t *ac...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
68,844,068,790,805,770,000,000,000,000,000,000,000
119
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
bool ClientConnectionImpl::cannotHaveBody() { if (pending_response_.has_value() && pending_response_.value().encoder_.headRequest()) { ASSERT(!pending_response_done_); return true; } else if (parser_->statusCode() == 204 || parser_->statusCode() == 304 || (parser_->statusCode() >= 200 && ...
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
22,239,761,353,778,940,000,000,000,000,000,000,000
13
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static void StorePicturePTS( encoder_t *p_enc, uint32_t u_pnum, mtime_t i_pts ) { encoder_sys_t *p_sys = p_enc->p_sys; for( int i = 0; i<SCHRO_PTS_TLB_SIZE; i++ ) { if( p_sys->pts_tlb[i].b_empty ) { p_sys->pts_tlb[i].u_pnum = u_pnum; p_sys->pts_tlb[i].i_pts = i_pts; ...
0
[ "CWE-120", "CWE-787" ]
vlc
9bb0353a5c63a7f8c6fc853faa3df4b4df1f5eb5
24,487,247,931,831,000,000,000,000,000,000,000,000
18
codec: schroedinger: fix potential buffer overflow. The variable len is a raw 32 bit value read using GetDWBE. If this value is larger than UINT32_MAX - sizeof(eos), this will cause an integer overflow in the subsequent call to malloc, and finally a buffer overflow when calling memcpy. We fix this by checking len acco...
static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) { rtl8150_t *dev = netdev_priv(netdev); u16 *data = (u16 *) & rq->ifr_ifru; int res = 0; switch (cmd) { case SIOCDEVPRIVATE: data[0] = dev->phy; case SIOCDEVPRIVATE + 1: read_mii_word(dev, dev->phy, (data[1] & 0x1f), &data[3]); ...
0
[ "CWE-119", "CWE-787" ]
linux
7926aff5c57b577ab0f43364ff0c59d968f6a414
175,779,998,620,191,100,000,000,000,000,000,000,000
23
rtl8150: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net...
int Field_decimal::cmp(const uchar *a_ptr,const uchar *b_ptr) { const uchar *end; int swap=0; /* First remove prefixes '0', ' ', and '-' */ for (end=a_ptr+field_length; a_ptr != end && (*a_ptr == *b_ptr || ((my_isspace(&my_charset_bin,*a_ptr) || *a_ptr == '+' || *a_ptr == '0') && (...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
136,258,429,356,895,950,000,000,000,000,000,000,000
31
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
flatpak_bwrap_add_fd (FlatpakBwrap *bwrap, int fd) { g_array_append_val (bwrap->fds, fd); }
0
[ "CWE-94", "CWE-74" ]
flatpak
6d1773d2a54dde9b099043f07a2094a4f1c2f486
62,712,082,992,895,890,000,000,000,000,000,000,000
5
run: Convert all environment variables into bwrap arguments This avoids some of them being filtered out by a setuid bwrap. It also means that if they came from an untrusted source, they cannot be used to inject arbitrary code into a non-setuid bwrap via mechanisms like LD_PRELOAD. Because they get bundled into a memf...
regtail(char_u *p, char_u *val) { char_u *scan; char_u *temp; int offset; if (p == JUST_CALC_SIZE) return; // Find last node. scan = p; for (;;) { temp = regnext(scan); if (temp == NULL) break; scan = temp; } if (OP(scan) == BACK) offset = (int)(scan - val); els...
0
[ "CWE-823", "CWE-703" ]
vim
6456fae9ba8e72c74b2c0c499eaf09974604ff30
217,945,398,278,166,500,000,000,000,000,000,000,000
34
patch 8.2.4440: crash with specific regexp pattern and string Problem: Crash with specific regexp pattern and string. Solution: Stop at the start of the string.
MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr, MemTxAttrs attrs, void *ptr, hwaddr len, hwaddr addr1, hwaddr l, MemoryRegion *mr) { uint8_t *ram_ptr; uint64_t val; MemTxResult result = MEM...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
160,547,188,369,311,100,000,000,000,000,000,000,000
45
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
double ruby_strtod(const char *s00, char **se) { #ifdef Avoid_Underflow int scale; #endif int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; const char *s, *s0, *s1; double aadj, adj; double_u aadj1, rv, rv0; Long L; ULong y, z; ...
0
[ "CWE-119" ]
ruby
60c29bbbf6574e0e947c56e71c3c3ca11620ee15
307,327,314,971,178,630,000,000,000,000,000,000,000
953
merge revision(s) 43775: * util.c (ruby_strtod): ignore too long fraction part, which does not affect the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void *yam_seq_next(struct seq_file *seq, void *v, loff_t *pos) { ++*pos; return (*pos < NR_PORTS) ? yam_devs[*pos] : NULL; }
0
[ "CWE-401" ]
linux
29eb31542787e1019208a2e1047bb7c76c069536
229,647,459,705,491,070,000,000,000,000,000,000,000
5
yam: fix a memory leak in yam_siocdevprivate() ym needs to be free when ym->cmd != SIOCYAMSMCS. Fixes: 0781168e23a2 ("yam: fix a missing-check bug") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int phar_call_openssl_signverify(int is_sign, php_stream *fp, zend_off_t end, char *key, int key_len, char **signature, int *signature_len) /* {{{ */ { zend_fcall_info fci; zend_fcall_info_cache fcc; zval retval, zp[3], openssl; zend_string *str; ZVAL_STRINGL(&openssl, is_sign ? "openssl_sign" : "openssl_v...
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
268,165,024,685,826,160,000,000,000,000,000,000,000
85
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
static khint_t fix_chromosome(const bcf_hdr_t *h, vdict_t *d, const char *p) { // Simple error recovery for chromosomes not defined in the header. It will not help when VCF header has // been already printed, but will enable tools like vcfcheck to proceed. kstring_t tmp = {0,0,0}; khint_t k; int l;...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
270,032,419,084,524,640,000,000,000,000,000,000,000
17
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED) { callbacks++; if (noout) return(0); fprintf(stdout, "SAX.hasInternalSubset()\n"); return(0); }
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
306,327,245,536,040,380,000,000,000,000,000,000,000
8
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
static void fdctrl_handle_format_track(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fdctrl->data_state |= FD_STATE_FORMAT; if (fdctrl->fifo[0] & 0x80) fdctrl->data_state |= FD_STATE_MULTI; else ...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
227,374,656,067,745,130,000,000,000,000,000,000,000
27
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...
static ssize_t iwl_dbgfs_csr_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct iwl_trans *trans = file->private_data; iwl_pcie_dump_csr(trans); return count; }
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
1,488,879,204,285,607,300,000,000,000,000,000,000
10
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
AuthAuthorizer* MonClient::build_authorizer(int service_id) const { std::lock_guard l(monc_lock); if (auth) { return auth->build_authorizer(service_id); } else { ldout(cct, 0) << __func__ << " for " << ceph_entity_type_name(service_id) << ", but no auth is available now" << dendl; return nullptr; ...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
109,328,438,454,925,980,000,000,000,000,000,000,000
10
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static void rgb_prepare_row(VncState *vs, uint8_t *dst, int x, int y, int count) { if (VNC_SERVER_FB_BYTES == 4) { if (1) { rgb_prepare_row24(vs, dst, x, y, count); } else { rgb_prepare_row32(vs, dst, x, y, count); } } else { rg...
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
166,426,197,259,645,530,000,000,000,000,000,000,000
13
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
fix_bad_direct_key_sigs (kbnode_t keyblock, u32 *keyid) { gpg_error_t err; kbnode_t node; int count = 0; for (node = keyblock->next; node; node=node->next) { if (node->pkt->pkttype == PKT_USER_ID) break; if (node->pkt->pkttype == PKT_SIGNATURE && IS_KEY_SIG (node->pkt->pkt.sig...
0
[ "CWE-20" ]
gnupg
f0b33b6fb8e0586e9584a7a409dcc31263776a67
158,647,443,388,753,030,000,000,000,000,000,000,000
29
gpg: Import only packets which are allowed in a keyblock. * g10/import.c (valid_keyblock_packet): New. (read_block): Store only valid packets. -- A corrupted key, which for example included a mangled public key encrypted packet, used to corrupt the keyring. This change skips all packets which are not allowed in a ke...
inline void BroadcastMul(const float* input1_data, const Dims<4>& input1_dims, const float* input2_data, const Dims<4>& input2_dims, float* output_data, const Dims<4>& output_dims) { tflite::ArithmeticParams op_params; float float_activation_min; float float_activ...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
240,267,581,484,518,800,000,000,000,000,000,000,000
13
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
TEST(AsyncSSLSocketTest, UnencryptedTest) { EventBase base; auto clientCtx = std::make_shared<folly::SSLContext>(); auto serverCtx = std::make_shared<folly::SSLContext>(); NetworkSocket fds[2]; getfds(fds); getctx(clientCtx, serverCtx); auto client = AsyncSSLSocket::newSocket(clientCtx, &base, fds[...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
91,131,984,797,873,300,000,000,000,000,000,000,000
51
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
void CLASS setSonyBodyFeatures(unsigned id) { ushort idx; static const struct { ushort scf[11]; /* scf[0] camera id scf[1] camera format scf[2] camera mount: Minolta A, Sony E, fixed, scf[3] camera type: DSLR, NEX, SLT, ILCE, ILCA, DSC scf[4] lens mount scf[5] tag 0x2010 grou...
0
[ "CWE-703", "CWE-835" ]
LibRaw
e47384546b43d0fd536e933249047bc397a4d88b
167,469,636,617,158,960,000,000,000,000,000,000,000
191
Secunia Advisory SA83050: possible infinite loop in parse_minolta()
long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp) { struct file *eventfp, *filep = NULL; bool pollstart = false, pollstop = false; struct eventfd_ctx *ctx = NULL; u32 __user *idxp = argp; struct vhost_virtqueue *vq; struct vhost_vring_state s; struct vhost_vring_file f; struct vhost_vrin...
0
[ "CWE-399" ]
linux
7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5
289,784,275,872,476,640,000,000,000,000,000,000,000
203
vhost: actually track log eventfd file While reviewing vhost log code, I found out that log_file is never set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet). Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
void luaSetGlobalArray(lua_State *lua, char *var, robj **elev, int elec) { int j; lua_newtable(lua); for (j = 0; j < elec; j++) { lua_pushlstring(lua,(char*)elev[j]->ptr,sdslen(elev[j]->ptr)); lua_rawseti(lua,-2,j+1); } lua_setglobal(lua,var); }
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
131,583,892,426,084,020,000,000,000,000,000,000,000
10
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
calc_response (const guchar *key, const guchar *plaintext, guchar *results) { DES_KS ks; memcpy (results, plaintext, 8); memcpy (results + 8, plaintext, 8); memcpy (results + 16, plaintext, 8); setup_schedule (key, ks); des (ks, results); setup_schedule (key + 7, ks); des (ks, results + ...
0
[ "CWE-125" ]
libsoup
f8a54ac85eec2008c85393f331cdd251af8266ad
214,408,416,555,412,630,000,000,000,000,000,000,000
17
NTLM: Avoid a potential heap buffer overflow in v2 authentication Check the length of the decoded v2 challenge before attempting to parse it, to avoid reading past it. Fixes #173
long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) { struct inode *inode = file_inode(file); loff_t new_size = 0; unsigned int max_blocks; int ret = 0; int flags; ext4_lblk_t lblk; unsigned int blkbits = inode->i_blkbits; /* * Encrypted inodes can't handle collapse range or insert ...
1
[ "CWE-362" ]
linux
17048e8a083fec7ad841d88ef0812707fbc7e39f
248,762,583,025,960,600,000,000,000,000,000,000,000
92
ext4: move unlocked dio protection from ext4_alloc_file_blocks() Currently ext4_alloc_file_blocks() was handling protection against unlocked DIO. However we now need to sometimes call it under i_mmap_sem and sometimes not and DIO protection ranks above it (although strictly speaking this cannot currently create any de...
MagickPrivate double GenerateDifferentialNoise(RandomInfo *random_info, const Quantum pixel,const NoiseType noise_type,const double attenuate) { #define SigmaUniform (attenuate*0.015625) #define SigmaGaussian (attenuate*0.015625) #define SigmaImpulse (attenuate*0.1) #define SigmaLaplacian (attenuate*0.0390625) #de...
1
[ "CWE-369" ]
ImageMagick
fbd9a963db1ae5551c45dc8af57db0abd7695774
38,171,120,366,055,484,000,000,000,000,000,000,000
107
https://github.com/ImageMagick/ImageMagick/issues/3077
printablesStringValidate( Syntax *syntax, struct berval *val ) { ber_len_t i, len; if( BER_BVISEMPTY( val ) ) return LDAP_INVALID_SYNTAX; for(i=0,len=0; i < val->bv_len; i++) { int c = val->bv_val[i]; if( c == '$' ) { if( len == 0 ) { return LDAP_INVALID_SYNTAX; } len = 0; } else if ( SLAP_P...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
196,440,944,612,378,150,000,000,000,000,000,000,000
30
ITS#9383 remove assert in certificateListValidate
R_API RRBTree *r_crbtree_new(RRBFree freefn) { RRBTree *tree = R_NEW0 (RRBTree); if (tree) { tree->free = freefn; } return tree; }
0
[ "CWE-416" ]
radare2
b5cb90b28ec71fda3504da04e3cc94a362807f5e
100,307,224,719,567,730,000,000,000,000,000,000,000
7
Prefer memleak over usaf in io.bank's rbtree bug ##crash * That's a workaround, proper fix will come later * Reproducer: bins/fuzzed/iobank-crash * Reported by Akyne Choi via huntr.dev
static void vmxnet3_net_uninit(VMXNET3State *s) { g_free(s->mcast_list); vmxnet_tx_pkt_reset(s->tx_pkt); vmxnet_tx_pkt_uninit(s->tx_pkt); vmxnet_rx_pkt_uninit(s->rx_pkt); qemu_del_nic(s->nic); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
316,552,901,784,358,150,000,000,000,000,000,000,000
8
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static void usbredir_vm_state_change(void *priv, bool running, RunState state) { USBRedirDevice *dev = priv; if (state == RUN_STATE_RUNNING && dev->parser != NULL) { usbredirparser_do_write(dev->parser); /* Flush any pending writes */ } }
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
225,398,704,214,005,170,000,000,000,000,000,000,000
8
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
static void load_config(struct btd_adapter *adapter) { GKeyFile *key_file; char filename[PATH_MAX]; struct stat st; GError *gerr = NULL; key_file = g_key_file_new(); snprintf(filename, PATH_MAX, STORAGEDIR "/%s/settings", btd_adapter_get_storage_dir(adapter)); if (stat(filename, &st) < 0) { convert_con...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
76,143,272,859,286,120,000,000,000,000,000,000,000
57
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static avifBool avifFileTypeIsCompatible(avifFileType * ftyp) { avifBool avifCompatible = (memcmp(ftyp->majorBrand, "avif", 4) == 0 || memcmp(ftyp->majorBrand, "avis", 4) == 0); if (!avifCompatible) { for (int compatibleBrandIndex = 0; compatibleBrandIndex < ftyp->compatibleBrandsCount; ++compatibleBran...
0
[ "CWE-703", "CWE-787" ]
libavif
0a8e7244d494ae98e9756355dfbfb6697ded2ff9
104,751,247,564,580,200,000,000,000,000,000,000,000
14
Set max image size to 16384 * 16384 Fix https://crbug.com/oss-fuzz/24728 and https://crbug.com/oss-fuzz/24734.
static MagickBooleanType GetMagickModulePath(const char *filename, MagickModuleType module_type,char *path,ExceptionInfo *exception) { char *module_path; assert(filename != (const char *) NULL); (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename); assert(path != (char *) NULL); assert(exc...
0
[ "CWE-200", "CWE-362" ]
ImageMagick
01faddbe2711a4156180c4a92837e2f23683cc68
195,746,321,003,362,830,000,000,000,000,000,000,000
300
Use the correct rights.
ar6000_get_driver_cfg(struct net_device *dev, u16 cfgParam, void *result) { int ret = 0; switch(cfgParam) { case AR6000_DRIVER_CFG_GET_WLANNODECACHING: *((u32 *)result) = wlanNodeCaching; break; case AR6000_DRIVER_CFG...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
307,918,199,422,457,000,000,000,000,000,000,000,000
22
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
lock_mtab (void) { int i; struct timespec waittime; struct timeval maxtime; char linktargetfile[MOUNTLOCK_LINKTARGET_LTH]; if (!signals_have_been_setup) { int sig = 0; struct sigaction sa; sa.sa_handler = handler; sa.sa_flags = 0; sigfillset (&sa.sa_mask); while (sigismember (&sa.sa_mask, ++sig) != ...
0
[ "CWE-20" ]
cifs-utils
f6eae44a3d05b6515a59651e6bed8b6dde689aec
286,307,769,234,689,380,000,000,000,000,000,000,000
104
mtab: handle ENOSPC/EFBIG condition properly when altering mtab It's possible that when mount.cifs goes to append the mtab that there won't be enough space to do so, and the mntent won't be appended to the file in its entirety. Add a my_endmntent routine that will fflush and then fsync the FILE if that succeeds. If e...
void ClearCache(v8::Isolate* isolate) { isolate->IdleNotificationDeadline(0.5); blink::WebCache::Clear(); base::MemoryPressureListener::NotifyMemoryPressure( base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
320,041,550,635,730,570,000,000,000,000,000,000,000
6
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
DH *ssl_get_auto_dh(SSL *s) { int dh_secbits = 80; if (s->cert->dh_tmp_auto == 2) return DH_get_1024_160(); if (s->s3.tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aPSK)) { if (s->s3.tmp.new_cipher->strength_bits == 256) dh_secbits = 128; else dh_secbits =...
0
[ "CWE-476" ]
openssl
5235ef44b93306a14d0b6c695b13c64b16e1fdec
55,288,582,241,462,230,000,000,000,000,000,000,000
43
Fix SSL_check_chain() The function SSL_check_chain() can be used by applications to check that a cert and chain is compatible with the negotiated parameters. This could be useful (for example) from the certificate callback. Unfortunately this function was applying TLSv1.2 sig algs rules and did not work correctly if T...
static void r_coresym_cache_element_segment_fini(RCoreSymCacheElementSegment *seg) { if (seg) { free (seg->name); } }
0
[ "CWE-125", "CWE-787" ]
radare2
a35f89f86ed12161af09330e92e5a213014e46a1
146,528,031,178,088,260,000,000,000,000,000,000,000
5
Fix oobread in macho core symbolication ##crash * Reported by @cnitlrt via huntr.dev
static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) { int count, nleft, len; count = 0; while ((nleft = pixelCount - count) > 0) { len = stbi__get8(s); if (len == 128) { // No-op. } else if (len < 128) { // Copy next len+1 bytes literally. ...
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
250,793,289,273,817,430,000,000,000,000,000,000,000
37
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static inline void fsnotify_access(struct file *file) { const struct path *path = &file->f_path; struct inode *inode = path->dentry->d_inode; __u32 mask = FS_ACCESS; if (S_ISDIR(inode->i_mode)) mask |= FS_ISDIR; if (!(file->f_mode & FMODE_NONOTIFY)) { fsnotify_parent(path, NULL, mask); fsnotify(inode, mask...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
329,913,824,275,503,260,000,000,000,000,000,000,000
14
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
static inline void eventpoll_release(struct file *file) { /* * Fast check to avoid the get/release of the semaphore. Since * we're doing this outside the semaphore lock, it might return * false negatives, but we don't care. It'll help in 99.99% of cases * to avoid the semaphore lock. False positives simply ca...
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
323,369,668,746,961,860,000,000,000,000,000,000,000
21
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
bool Value::operator==(const Value &other) const { return Equals(*this, other); }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
195,249,196,853,980,170,000,000,000,000,000,000,000
3
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
suspend_hi_show(struct mddev *mddev, char *page) { return sprintf(page, "%llu\n", (unsigned long long)mddev->suspend_hi); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
315,751,046,509,951,500,000,000,000,000,000,000,000
4
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static bool timerfd_canceled(struct timerfd_ctx *ctx) { if (!ctx->might_cancel || ctx->moffs != KTIME_MAX) return false; ctx->moffs = ktime_mono_to_real(0); return true; }
0
[ "CWE-416" ]
linux
1e38da300e1e395a15048b0af1e5305bd91402f6
69,535,935,907,680,120,000,000,000,000,000,000,000
7
timerfd: Protect the might cancel mechanism proper The handling of the might_cancel queueing is not properly protected, so parallel operations on the file descriptor can race with each other and lead to list corruptions or use after free. Protect the context for these operations with a seperate lock. The wait queue ...
xps_beginpath(gx_device_vector *vdev, gx_path_type_t type) { char line[300]; gx_device_xps *xps = (gx_device_xps *)vdev; uint32_t c; const char *fmt; (void)gdev_vector_stream((gx_device_vector*)xps); /* skip non-drawing paths for now */ if (!drawing_path(type, xps->filltype)) { ...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
210,181,615,575,027,900,000,000,000,000,000,000,000
39
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static int jas_iccgetuint(jas_stream_t *in, int n, jas_ulonglong *val) { int i; int c; jas_ulonglong v; v = 0; for (i = n; i > 0; --i) { if ((c = jas_stream_getc(in)) == EOF) return -1; v = (v << 8) | c; } *val = v; return 0; }
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
176,384,424,711,369,260,000,000,000,000,000,000,000
14
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
void *ring_buffer_event_data(struct ring_buffer_event *event) { return rb_event_data(event); }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
210,562,806,405,508,150,000,000,000,000,000,000,000
4
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
static int lex_scan_number(lex_t *lex, int c, json_error_t *error) { const char *saved_text; char *end; double doubleval; lex->token = TOKEN_INVALID; if(c == '-') c = lex_get_save(lex, error); if(c == '0') { c = lex_get_save(lex, error); if(l_isdigit(c)) { ...
0
[ "CWE-20" ]
jansson
64ce0ad3731ebd77e02897b07920eadd0e2cc318
6,524,997,922,160,353,000,000,000,000,000,000,000
96
Fix for issue #282 The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so...
static inline unsigned int clock_divider_to_freq(unsigned int divider, unsigned int rollovers) { return DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, (divider + 1) * rollovers); }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
240,606,853,312,702,520,000,000,000,000,000,000,000
6
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
psutil_proc_open_files(PyObject *self, PyObject *args) { long pid; int i; int cnt; int regular; int fd; char *path; struct kinfo_file *freep = NULL; struct kinfo_file *kif; kinfo_proc kipp; PyObject *py_tuple = NULL; PyObject *py_path = NULL; PyObject *py_retlist = PyList...
1
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
147,626,897,996,933,080,000,000,000,000,000,000,000
70
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...