func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { int err; int skb_len; unsigned long flags; struct sk_buff_head *list = &sk->sk_receive_queue; struct caifsock *cf_sk = container_of(sk, struct caifsock, sk); if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= (unsigned int)sk->sk_rcvbuf ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
64,165,043,842,099,470,000,000,000,000,000,000,000
44
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx) { AVPacketSideData *tmp; AVCPBProperties *props; size_t size; props = av_cpb_properties_alloc(&size); if (!props) return NULL; tmp = av_realloc_array(avctx->coded_side_data, avctx->nb_coded_side_data + 1, sizeof(*tmp)); ...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
18,647,583,423,308,394,000,000,000,000,000,000,000
25
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
TEST_F(AllowMissingInAndListTest, BadJwt) { // Bad JWT should fail. EXPECT_CALL(mock_cb_, onComplete(Status::JwtVerificationFail)); auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, NonExistKidToken}}; context_ = Verifier::createContext(headers, parent_span_, &mock_cb_); verifier_->verify(context...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
189,742,069,718,990,300,000,000,000,000,000,000,000
8
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
void mem_nop (void *opaque, void *ptr){ }
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
262,592,781,592,874,350,000,000,000,000,000,000,000
3
fix #111
static void received_conflicting_request(REQUEST *request, const RADCLIENT *client) { radlog(L_ERR, "Received conflicting packet from " "client %s port %d - ID: %d due to unfinished request %u. Giving up on old request.", client->shortname, request->packet->src_port, request->packet->id,...
0
[ "CWE-399" ]
freeradius-server
ff94dd35673bba1476594299d31ce8293b8bd223
336,663,497,261,288,200,000,000,000,000,000,000,000
53
Do not delete "old" requests until they are free. If the request is in the queue for 30+ seconds, do NOT delete it. Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die", which waits for a child thread to pick it up, and acknowledge that it's done. Once it's marked done, we can finally clean it up. T...
autocmd_supported(char_u *name) { char_u *p; return (event_name2nr(name, &p) != NUM_EVENTS); }
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
168,432,293,518,501,370,000,000,000,000,000,000,000
6
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
ex_popup(exarg_T *eap) { # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) if (gui.in_use) gui_make_popup(eap->arg, eap->forceit); # ifdef FEAT_TERM_POPUP_MENU else # endif # endif # ifdef FEAT_TERM_POPUP_MENU pum_make_popup(eap->arg, eap->forceit); # endif }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
180,892,469,990,934,100,000,000,000,000,000,000,000
13
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
tor_tls_handshake(tor_tls_t *tls) { int r; tor_assert(tls); tor_assert(tls->ssl); tor_assert(tls->state == TOR_TLS_ST_HANDSHAKE); check_no_tls_errors(); if (tls->isServer) { r = SSL_accept(tls->ssl); } else { r = SSL_connect(tls->ssl); } /* We need to call this here and not earlier, since Open...
0
[ "CWE-264" ]
tor
638fdedcf16cf7d6f7c586d36f7ef335c1c9714f
99,842,456,592,635,580,000,000,000,000,000,000,000
68
Don't send a certificate chain on outgoing TLS connections from non-relays
CImg<T> get_closing(const CImg<t>& kernel, const unsigned int boundary_conditions=1, const bool is_real=false) const { const int sx = kernel.width(), sy = kernel.height(), sz = kernel.depth(); if (is_empty() || (sx<=1 && sy<=1 && sz<=1)) return *this; const int sx1 = (int)(...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
47,455,790,610,429,830,000,000,000,000,000,000,000
21
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int nci_core_rsp_packet(struct nci_dev *ndev, __u16 opcode, struct sk_buff *skb) { return nci_op_rsp_packet(ndev, opcode, skb, ndev->ops->core_ops, ndev->ops->n_core_ops); }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
175,332,217,068,514,330,000,000,000,000,000,000,000
6
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
asmlinkage long sys_mknodat(int dfd, const char __user *filename, int mode, unsigned dev) { int error = 0; char * tmp; struct dentry * dentry; struct nameidata nd; if (S_ISDIR(mode)) return -EPERM; tmp = getname(filename); if (IS_ERR(tmp)) return PTR_ERR(tmp); error = do_path_lookup(dfd, tmp, LOOKUP_P...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
60,226,493,380,353,860,000,000,000,000,000,000,000
53
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo) { int r; regex_t *new_reg; r = onig_new(&new_reg, pattern, pattern_end, option, enc, syntax, einfo); if (r) return r; if (ONIG_STATE(re...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
251,973,288,637,259,400,000,000,000,000,000,000,000
17
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static int rbd_dev_device_setup(struct rbd_device *rbd_dev) { int ret; /* Record our major and minor device numbers. */ if (!single_major) { ret = register_blkdev(0, rbd_dev->name); if (ret < 0) goto err_out_unlock; rbd_dev->major = ret; rbd_dev->minor = 0; } else { rbd_dev->major = rbd_major; rbd...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
37,824,980,996,482,115,000,000,000,000,000,000,000
44
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static void clear_file_array(wfClipboard* clipboard) { size_t i; if (!clipboard) return; /* clear file_names array */ if (clipboard->file_names) { for (i = 0; i < clipboard->nFiles; i++) { free(clipboard->file_names[i]); clipboard->file_names[i] = NULL; } free(clipboard->file_names); clipboard...
0
[ "CWE-20" ]
FreeRDP
0d79670a28c0ab049af08613621aa0c267f977e9
300,854,443,581,004,630,000,000,000,000,000,000,000
36
Fixed missing input checks for file contents request reported by Valentino Ricotta (Thalium)
g_vfs_backend_dav_init (GVfsBackendDav *backend) { g_vfs_backend_set_user_visible (G_VFS_BACKEND (backend), TRUE); }
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
62,677,835,795,503,320,000,000,000,000,000,000,000
4
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
etherproto_string(netdissect_options *ndo, u_short port) { register char *cp; register struct hnamemem *tp; register uint32_t i = port; char buf[sizeof("0000")]; for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt) if (tp->addr == i) return (tp->name); tp->addr = i; tp->nxt = newhnamemem(n...
0
[ "CWE-125", "CWE-787" ]
tcpdump
730fc35968c5433b9e2a829779057f4f9495dc51
16,559,376,879,543,010,000,000,000,000,000,000,000
26
CVE-2017-12894/In lookup_bytestring(), take the length of the byte string into account. Otherwise, if, in our search of the hash table, we come across a byte string that's shorter than the string we're looking for, we'll search past the end of the string in the hash table. This fixes a buffer over-read discovered by ...
current_element (GMarkupParseContext *context) { return context->tag_stack->data; }
0
[ "CWE-476" ]
glib
fccef3cc822af74699cca84cd202719ae61ca3b9
284,652,611,455,865,900,000,000,000,000,000,000,000
4
gmarkup: Fix crash in error handling path for closing elements If something which looks like a closing tag is left unfinished, but isn’t paired to an opening tag in the document, the error handling code would do a null pointer dereference. Avoid that, at the cost of introducing a new translatable error message. Inclu...
static void iscsi_nop_timed_event(void *opaque) { IscsiLun *iscsilun = opaque; qemu_mutex_lock(&iscsilun->mutex); if (iscsi_get_nops_in_flight(iscsilun->iscsi) >= MAX_NOP_FAILURES) { error_report("iSCSI: NOP timeout. Reconnecting..."); iscsilun->request_timed_out = true; } else if (iscs...
0
[ "CWE-125" ]
qemu
ff0507c239a246fd7215b31c5658fc6a3ee1e4c5
46,327,071,991,184,790,000,000,000,000,000,000,000
19
block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb There is an overflow, the source 'datain.data[2]' is 100 bytes, but the 'ss' is 252 bytes.This may cause a security issue because we can access a lot of unrelated memory data. The len for sbp copy data should take the minimum of mx_sb_len and sb_len_wr, no...
static UPNP_INLINE int search_extension( /*! [in] . */ const char *extension, /*! [out] . */ const char **con_type, /*! [out] . */ const char **con_subtype) { int top, mid, bot; int cmp; top = 0; bot = NUM_MEDIA_TYPES - 1; while (top <= bot) { mid = (top + bot) / 2; cmp = strcasecmp(extension, gMediaTy...
0
[ "CWE-284" ]
pupnp-code
be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd
18,974,022,495,885,660,000,000,000,000,000,000,000
33
Don't allow unhandled POSTs to write to the filesystem by default If there's no registered handler for a POST request, the default behaviour is to write it to the filesystem. Several million deployed devices appear to have this behaviour, making it possible to (at least) store arbitrary data on them. Add a configure o...
static void peak_usb_unlink_all_urbs(struct peak_usb_device *dev) { int i; /* free all Rx (submitted) urbs */ usb_kill_anchored_urbs(&dev->rx_submitted); /* free unsubmitted Tx urbs first */ for (i = 0; i < PCAN_USB_MAX_TX_URBS; i++) { struct urb *urb = dev->tx_contexts[i].urb; if (!urb || dev->tx_con...
0
[ "CWE-909" ]
linux
f7a1337f0d29b98733c8824e165fca3371d7d4fd
264,073,745,294,126,200,000,000,000,000,000,000,000
28
can: peak_usb: fix slab info leak Fix a small slab info leak due to a failure to clear the command buffer at allocation. The first 16 bytes of the command buffer are always sent to the device in pcan_usb_send_cmd() even though only the first two may have been initialised in case no argument payload is provided (e.g. ...
PHP_FUNCTION(system) { php_exec_ex(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); }
0
[ "CWE-703", "CWE-189" ]
php-src
2871c70efaaaa0f102557a17c727fd4d5204dd4b
186,239,027,435,069,530,000,000,000,000,000,000,000
4
Patch for Heap Buffer Overflow in EscapeShell Proposed patch for bug #71270
void *MACH0_(mach0_free)(struct MACH0_(obj_t) *mo) { if (!mo) { return NULL; } size_t i; if (mo->symbols) { for (i = 0; !mo->symbols[i].last; i++) { free (mo->symbols[i].name); } free (mo->symbols); } free (mo->segs); free (mo->sects); free (mo->symtab); free (mo->symstr); free (mo->indirectsyms);...
1
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
30,073,576,392,675,150,000,000,000,000,000,000,000
40
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
Returns TRUE if the mode outputs blocks of bytes */ PHP_FUNCTION(mcrypt_module_is_block_mode) { MCRYPT_GET_MODE_DIR_ARGS(modes_dir) if (mcrypt_module_is_block_mode(module, dir) == 1) { RETURN_TRUE; } else { RETURN_FALSE; }
1
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
110,027,340,702,908,620,000,000,000,000,000,000,000
10
Fix bug #72455: Heap Overflow due to integer overflows
static NO_INLINE JsVar *jspGetNamedFieldInParents(JsVar *object, const char* name, bool returnName) { // Now look in prototypes JsVar * child = jspeiFindChildFromStringInParents(object, name); /* Check for builtins via separate function * This way we save on RAM for built-ins because everything comes out of p...
0
[ "CWE-119", "CWE-125" ]
Espruino
c36d30529118aa049797db43f111ddad468aad29
193,928,201,638,872,770,000,000,000,000,000,000,000
48
Fix stack overflow if void void void... is repeated many times (fix #1434)
void wakeup_subsequent_commits(int wakeup_error_arg) { /* Do the check inline, so only the wakeup case takes the cost of a function call for every commmit. Note that the check is done without locking. It is the responsibility of the user of the wakeup facility to ensure that no waiters ...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
31,370,300,723,421,900,000,000,000,000,000,000,000
17
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
int db_action_valid(uint32_t action) { if (sys_chk_seccomp_action(action) == 1) return 0; return -EINVAL; }
0
[]
libseccomp
c5bf78de480b32b324e0f511c88ce533ed280b37
126,712,140,201,997,750,000,000,000,000,000,000,000
6
db: fix 64-bit argument comparisons Our approach to doing 64-bit comparisons using 32-bit operators was just plain wrong, leading to a number of potential problems with filters that used the LT, GT, LE, or GE operators. This patch fixes this problem and a few other related issues that came to light in the course of f...
int do_pipe_flags(int *fd, int flags) { struct file *files[2]; int error = __do_pipe_flags(fd, files, flags); if (!error) { fd_install(fd[0], files[0]); fd_install(fd[1], files[1]); } return error; }
0
[ "CWE-17" ]
linux
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
174,358,333,191,221,160,000,000,000,000,000,000,000
10
new helper: copy_page_from_iter() parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static void fuse_aio_complete_req(struct fuse_mount *fm, struct fuse_args *args, int err) { struct fuse_io_args *ia = container_of(args, typeof(*ia), ap.args); struct fuse_io_priv *io = ia->io; ssize_t pos = -1; fuse_release_user_pages(&ia->ap, io->should_dirty); if (err) { /* Nothing */ } else if (io->...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
100,064,648,311,382,040,000,000,000,000,000,000,000
28
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
_outAppendPath(StringInfo str, const AppendPath *node) { WRITE_NODE_TYPE("APPENDPATH"); _outPathInfo(str, (const Path *) node); WRITE_NODE_FIELD(subpaths); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
252,223,228,322,849,840,000,000,000,000,000,000,000
8
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static void lsr_read_attribute_name_ex(GF_LASeRCodec *lsr, GF_Node *n, Bool skippable) { u32 val = 1; if (skippable) { GF_LSR_READ_INT(lsr, val, 1, "hasAttributeName"); if (!val) return; } GF_LSR_READ_INT(lsr, val, 1, "choice"); if (val) { lsr_read_vluimsbf5(lsr, "item[i]"); lsr_read_vluimsbf5(lsr, "item[...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
160,640,057,164,796,120,000,000,000,000,000,000,000
22
fixed #2213
ex_ni(exarg_T *eap) { if (!eap->skip) eap->errmsg = _(e_sorry_command_is_not_available_in_this_version); }
0
[ "CWE-125" ]
vim
d3a117814d6acbf0dca3eff1a7626843b9b3734a
269,348,405,131,002,470,000,000,000,000,000,000,000
6
patch 8.2.4009: reading one byte beyond the end of the line Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
inline double uppercase(const double x) { return (double)((x<'a'||x>'z')?x:x - 'a' + 'A'); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
80,748,411,805,866,950,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
DEATH_TEST(LteOp, InvalidEooOperand, "Invariant failure _rhs") { BSONObj operand; LTEMatchExpression lte("", operand.firstElement()); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
132,062,153,087,611,060,000,000,000,000,000,000,000
4
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
ExecCheckXactReadOnly(PlannedStmt *plannedstmt) { ListCell *l; /* Fail if write permissions are requested on any non-temp table */ foreach(l, plannedstmt->rtable) { RangeTblEntry *rte = (RangeTblEntry *) lfirst(l); if (rte->rtekind != RTE_RELATION) continue; if ((rte->requiredPerms & (~ACL_SELECT)) ==...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
89,795,051,947,489,700,000,000,000,000,000,000,000
21
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
void hkeysCommand(client *c) { genericHgetallCommand(c,OBJ_HASH_KEY); }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
55,681,704,239,703,420,000,000,000,000,000,000,000
3
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static void acpi_table_drop_item(struct config_group *group, struct config_item *cfg) { struct acpi_table *table = container_of(cfg, struct acpi_table, cfg); ACPI_INFO(("Host-directed Dynamic ACPI Table Unload")); acpi_unload_table(table->index); }
0
[ "CWE-862" ]
linux
75b0cea7bf307f362057cc778efe89af4c615354
121,431,614,579,852,170,000,000,000,000,000,000,000
8
ACPI: configfs: Disallow loading ACPI tables when locked down Like other vectors already patched, this one here allows the root user to load ACPI tables, which enables arbitrary physical address writes, which in turn makes it possible to disable lockdown. Prevents this by checking the lockdown status before allowing ...
static int decode_opaque_fixed(struct xdr_stream *xdr, void *buf, size_t len) { ssize_t ret = xdr_stream_decode_opaque_fixed(xdr, buf, len); if (unlikely(ret < 0)) return -EIO; return 0; }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
19,807,079,248,785,338,000,000,000,000,000,000,000
7
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
u8 gf_bs_align(GF_BitStream *bs) { u8 res = 8 - bs->nbBits; if ( (bs->bsmode == GF_BITSTREAM_READ) || (bs->bsmode == GF_BITSTREAM_FILE_READ)) { if (res > 0) { gf_bs_read_int(bs, res); } return res; } if (bs->nbBits > 0) { gf_bs_write_int (bs, 0, res); return res; } return 0; }
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
112,508,342,584,195,670,000,000,000,000,000,000,000
15
fixed #2165
static int store_info(__G) /* return 0 if skipping, 1 if OK */ __GDEF { #ifdef USE_BZIP2 # define UNKN_BZ2 (G.crec.compression_method!=BZIPPED) #else # define UNKN_BZ2 TRUE /* bzip2 unknown */ #endif #ifdef USE_LZMA # define UNKN_LZMA (G.crec.compression_method!=LZMAED) #else # define UNKN_LZMA TRUE ...
0
[ "CWE-400" ]
unzip
47b3ceae397d21bf822bc2ac73052a4b1daf8e1c
27,099,508,475,081,447,000,000,000,000,000,000,000
167
Detect and reject a zip bomb using overlapped entries. This detects an invalid zip file that has at least one entry that overlaps with another entry or with the central directory to the end of the file. A Fifield zip bomb uses overlapped local entries to vastly increase the potential inflation ratio. Such an invalid z...
int BSONObj::woCompare(const BSONObj &r, const BSONObj &idxKey, bool considerFieldName) const { if ( isEmpty() ) return r.isEmpty() ? 0 : -1; if ( r.isEmpty() ) return 1; bool ordered = !idxKey.isEmpty(); BSONObjIterator i(*this); ...
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
203,046,928,191,858,100,000,000,000,000,000,000,000
42
SERVER-7769 - turn objcheck on by default and use new fast bson validate
static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) { int ret; if (unlikely(__this_cpu_read(xmit_recursion) > XMIT_RECURSION_LIMIT)) { net_crit_ratelimited("bpf: recursion limit reached on datapath, buggy bpf program?\n"); kfree_skb(skb); return -ENETDOWN; } skb->dev = dev; __this_...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
322,024,590,088,745,620,000,000,000,000,000,000,000
18
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start ) { int ret; size_t len = 0; // Write NULL // MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, 0) ); MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( p, start, MBEDTLS_ASN1_NULL ) ); return( (int) len ); }
0
[]
mbedtls
97b5209bc01ab8b3b519fdb46cefc04739433124
314,269,869,203,861,300,000,000,000,000,000,000,000
12
Fix potential double free in cert writing code In case an entry with the given OID already exists in the list passed to mbedtls_asn1_store_named_data() and there is not enough memory to allocate room for the new value, the existing entry will be freed but the preceding entry in the list will sill hold a pointer to it....
static void checkActiveVdbeCnt(sqlite3 *db){ Vdbe *p; int cnt = 0; int nWrite = 0; int nRead = 0; p = db->pVdbe; while( p ){ if( sqlite3_stmt_busy((sqlite3_stmt*)p) ){ cnt++; if( p->readOnly==0 ) nWrite++; if( p->bIsReader ) nRead++; } p = p->pNext; } assert( cnt==db->nVdbe...
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
123,325,776,858,035,500,000,000,000,000,000,000,000
18
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
QByteArray Helper::getPartitionTable(const QString &devicePath) { processExec(QStringLiteral("/sbin/sfdisk -d %1").arg(devicePath)); return lastProcessStandardOutput(); }
0
[ "CWE-59", "CWE-61" ]
deepin-clone
e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab
241,490,479,484,186,570,000,000,000,000,000,000,000
6
fix: Do not use the "/tmp" directory https://github.com/linuxdeepin/deepin-clone/issues/16 https://bugzilla.opensuse.org/show_bug.cgi?id=1130388
ICON_IMAGE load_icon_default(ICON_TYPE type) { WORD idi; ICON_IMAGE img; switch(type) { case ICON_ACTIVE: idi=IDI_STUNNEL_ACTIVE; break; case ICON_ERROR: idi=IDI_STUNNEL_ERROR; break; case ICON_IDLE: idi=IDI_STUNNEL_IDLE; break; default: ...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
332,036,305,931,702,800,000,000,000,000,000,000,000
21
stunnel-5.57
aiff_close (SF_PRIVATE *psf) { AIFF_PRIVATE *paiff = psf->container_data ; if (paiff != NULL && paiff->markstr != NULL) { free (paiff->markstr) ; paiff->markstr = NULL ; } ; if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR) { aiff_write_tailer (psf) ; aiff_write_header (psf, SF_TRUE) ; } ; ...
0
[ "CWE-119", "CWE-787" ]
libsndfile
f833c53cb596e9e1792949f762e0b33661822748
57,425,460,069,719,730,000,000,000,000,000,000,000
15
src/aiff.c: Fix a buffer read overflow Secunia Advisory SA76717. Found by: Laurent Delosieres, Secunia Research at Flexera Software
static ssize_t push_ucs2(void *dest, const char *src, size_t dest_len, int flags) { size_t len=0; size_t src_len = strlen(src); size_t size = 0; bool ret; if (flags & STR_UPPER) { char *tmpbuf = strupper_talloc(NULL, src); ssize_t retval; if (tmpbuf == NULL) { return -1; } retval = push_ucs2(dest, tm...
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
39,802,936,344,420,930,000,000,000,000,000,000,000
40
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { const xmlChar *ptr; xmlChar cur; xmlChar *name; xmlEntityPtr entity = NULL; if ((str == NULL) || (*str == NULL)) return(NULL); ptr = *str; cur = *ptr; if (cur != '%') return(NULL); ptr++; name = xmlP...
0
[]
libxml2
0e1a49c8907645d2e155f0d89d4d9895ac5112b5
195,011,568,371,825,700,000,000,000,000,000,000,000
87
Fix infinite loop in xmlStringLenDecodeEntities When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef return NULL which cause a infinite loop in xmlStringLenDecodeEntities Found with libFuzzer. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
GF_Err gf_isom_set_rvc_config(GF_ISOFile *movie, u32 track, u32 sampleDescriptionIndex, u16 rvc_predefined, char *mime, u8 *data, u32 size) { GF_MPEGVisualSampleEntryBox *entry; GF_Err e; GF_TrackBox *trak; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from_file(movie,...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
189,731,183,654,362,100,000,000,000,000,000,000,000
39
fixed #1706
bool CModules::OnChanActionMessage(CActionMessage& Message) { MODHALTCHK(OnChanActionMessage(Message)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
271,491,738,914,435,400,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
set_sub_anchor(regex_t* reg, OptAncInfo* anc) { reg->sub_anchor |= anc->left_anchor & ANCHOR_BEGIN_LINE; reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE; }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
17,311,980,826,470,595,000,000,000,000,000,000,000
5
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
//! Implicitely cast an image into a \c T* \const. operator const T*() const { return _data;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
152,989,931,458,347,710,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
int sysctl_numa_balancing(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { struct ctl_table t; int err; int state = static_branch_likely(&sched_numa_balancing); if (write && !capable(CAP_SYS_ADMIN)) return -EPERM; t = *table; t.data = &state; err = proc_dointvec_minm...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
18,022,924,335,296,220,000,000,000,000,000,000,000
19
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...
static void lsr_read_script_type(GF_LASeRCodec *lsr, GF_Node *n) { u32 flag; GF_LSR_READ_INT(lsr, flag, 1, "hasType"); if (flag) { GF_FieldInfo info; lsr->last_error = gf_node_get_attribute_by_tag(n, TAG_XLINK_ATT_type, GF_TRUE, 0, &info); GF_LSR_READ_INT(lsr, flag, 1, "choice"); if (flag) { GF_LSR_READ_I...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
206,203,484,853,486,360,000,000,000,000,000,000,000
25
fixed #2213
static void kvm_sched_in(struct preempt_notifier *pn, int cpu) { struct kvm_vcpu *vcpu = preempt_notifier_to_vcpu(pn); if (vcpu->preempted) vcpu->preempted = false; kvm_arch_sched_in(vcpu, cpu); kvm_arch_vcpu_load(vcpu, cpu); }
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
313,437,566,901,441,500,000,000,000,000,000,000,000
11
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
static int network_config_set_interface (const oconfig_item_t *ci, /* {{{ */ int *interface) { if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) { WARNING ("network plugin: The `Interface' config option needs exactly " "one string argument."); return (-1); } if...
0
[ "CWE-119", "CWE-787" ]
collectd
b589096f907052b3a4da2b9ccc9b0e2e888dfc18
200,211,502,639,899,240,000,000,000,000,000,000,000
18
network plugin: Fix heap overflow in parse_packet(). Emilien Gaspar has identified a heap overflow in parse_packet(), the function used by the network plugin to parse incoming network packets. This is a vulnerability in collectd, though the scope is not clear at this point. At the very least specially crafted network...
static void vrend_draw_bind_ssbo_shader(struct vrend_sub_context *sub_ctx, int shader_type) { uint32_t mask; struct vrend_ssbo *ssbo; struct vrend_resource *res; int i; if (!has_feature(feat_ssbo)) return; if (!sub_ctx->prog->ssbo_used_mask[shader_type])...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
213,551,553,154,760,500,000,000,000,000,000,000,000
27
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
static const SSL_METHOD *ssl2_get_server_method(int ver) { if (ver == SSL2_VERSION) return (SSLv2_server_method()); else return (NULL); }
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
3,350,828,396,290,116,400,000,000,000,000,000,000
7
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
grub_ext2_uuid (grub_device_t device, char **uuid) { struct grub_ext2_data *data; grub_disk_t disk = device->disk; grub_dl_ref (my_mod); data = grub_ext2_mount (disk); if (data) { *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x", grub_be_to_cpu16 (data->sblock.uuid[0]), ...
0
[ "CWE-119" ]
grub
ac8cac1dac50daaf1c390d701cca3b55e16ee768
289,121,079,706,935,740,000,000,000,000,000,000,000
29
* grub-core/fs/ext2.c: Remove variable length arrays.
static uint32_t avifCodecConfigurationBoxGetDepth(const avifCodecConfigurationBox * av1C) { if (av1C->twelveBit) { return 12; } else if (av1C->highBitdepth) { return 10; } return 8; }
0
[ "CWE-703", "CWE-787" ]
libavif
0a8e7244d494ae98e9756355dfbfb6697ded2ff9
309,059,903,069,102,160,000,000,000,000,000,000,000
9
Set max image size to 16384 * 16384 Fix https://crbug.com/oss-fuzz/24728 and https://crbug.com/oss-fuzz/24734.
ProcXkbGetMap(ClientPtr client) { DeviceIntPtr dev; xkbGetMapReply rep; XkbDescRec *xkb; int n, status; REQUEST(xkbGetMapReq); REQUEST_SIZE_MATCH(xkbGetMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, clie...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
282,263,690,664,224,800,000,000,000,000,000,000,000
134
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
void TNEFFree(TNEFStruct *TNEF) { Attachment *p, *store; FREEVARLENGTH(TNEF->from); FREEVARLENGTH(TNEF->subject); FREEVARLENGTH(TNEF->body); FREEVARLENGTH(TNEF->CodePage); FREEVARLENGTH(TNEF->OriginalMessageClass); FREEVARLENGTH(TNEF->Owner); FREEVARLENGTH(TNEF->SentFor); FREEVARLENGTH(TNEF->Delegate...
0
[ "CWE-399", "CWE-125" ]
ytnef
3cb0f914d6427073f262e1b2b5fd973e3043cdf7
143,164,908,279,744,390,000,000,000,000,000,000,000
22
BugFix - Potential OOB with Fields of Size 0 Thanks to @hannob for contributing a malformed TNEF stream with a Version field of size 0. Now such files will return an error indicating invalid data.
void CLASS cubic_spline (const int *x_, const int *y_, const int len) { float **A, *b, *c, *d, *x, *y; int i, j; A = (float **) calloc (((2*len + 4)*sizeof **A + sizeof *A), 2*len); if (!A) return; A[0] = (float *) (A + 2*len); for (i = 1; i < 2*len; i++) A[i] = A[0] + 2*len*i; y = len + (x = i + (d ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
142,633,790,411,277,860,000,000,000,000,000,000,000
54
fixed two more problems found by fuzzer
ipv4_get_nw_frag(const struct ip_header *nh) { uint8_t nw_frag = 0; if (OVS_UNLIKELY(IP_IS_FRAGMENT(nh->ip_frag_off))) { nw_frag = FLOW_NW_FRAG_ANY; if (nh->ip_frag_off & htons(IP_FRAG_OFF_MASK)) { nw_frag |= FLOW_NW_FRAG_LATER; } } return nw_frag; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
235,823,394,482,959,700,000,000,000,000,000,000,000
13
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void h2_update_poll(struct conn_stream *cs) { struct h2s *h2s = cs->ctx; if (!h2s) return; /* we may unblock a blocked read */ if (cs->flags & CS_FL_DATA_RD_ENA) { /* the stream indicates it's willing to read */ h2s->h2c->flags &= ~H2_CF_DEM_SFULL; if (h2s->h2c->dsi == h2s->id) { conn_xprt_want...
0
[ "CWE-119" ]
haproxy
3f0e1ec70173593f4c2b3681b26c04a4ed5fc588
298,428,058,059,562,070,000,000,000,000,000,000,000
44
BUG/CRITICAL: h2: fix incorrect frame length check The incoming H2 frame length was checked against the max_frame_size setting instead of being checked against the bufsize. The max_frame_size only applies to outgoing traffic and not to incoming one, so if a large enough frame size is advertised in the SETTINGS frame, ...
on_unregister_handler(TCMUService1HandlerManager1 *interface, GDBusMethodInvocation *invocation, gchar *subtype, gpointer user_data) { struct tcmur_handler *handler = find_handler_by_subtype(subtype); struct dbus_info *info = handler ? handler->opaque : NULL; if (!handler) { g_dbus_method_...
0
[ "CWE-476" ]
tcmu-runner
bb80e9c7a798f035768260ebdadffb6eb0786178
83,951,388,748,812,940,000,000,000,000,000,000,000
31
only allow dynamic UnregisterHandler for external handlers, thereby fixing DoS Trying to unregister an internal handler ended up in a SEGFAULT, because the tcmur_handler->opaque was NULL. Way to reproduce: dbus-send --system --print-reply --dest=org.kernel.TCMUService1 /org/kernel/TCMUService1/HandlerManager1 org.ker...
int xt_check_match(struct xt_mtchk_param *par, unsigned int size, u16 proto, bool inv_proto) { int ret; if (XT_ALIGN(par->match->matchsize) != size && par->match->matchsize != -1) { /* * ebt_among is exempt from centralized matchsize checking * because it uses a dynamic-size data set. */ pr_er...
0
[]
linux
175e476b8cdf2a4de7432583b49c871345e4f8a1
221,393,546,266,801,350,000,000,000,000,000,000,000
52
netfilter: x_tables: Use correct memory barriers. When a new table value was assigned, it was followed by a write memory barrier. This ensured that all writes before this point would complete before any writes after this point. However, to determine whether the rules are unused, the sequence counter is read. To ensure...
static inline void audit_proctitle_free(struct audit_context *context) { kfree(context->proctitle.value); context->proctitle.value = NULL; context->proctitle.len = 0; }
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
236,235,481,529,170,550,000,000,000,000,000,000,000
6
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static void init_explored_state(struct bpf_verifier_env *env, int idx) { env->insn_aux_data[idx].prune_point = true; }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
64,003,262,637,647,470,000,000,000,000,000,000,000
4
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
input_buffer& ClientHello::set(input_buffer& in) { return in >> *this; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
277,510,441,297,779,700,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
void set_crop_bottom(uint64_t crop_bottom) { crop_bottom_ = crop_bottom; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
314,082,685,892,627,970,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
GC_API GC_ATTR_MALLOC char * GC_CALL GC_strndup(const char *str, size_t size) { char *copy; size_t len = strlen(str); /* str is expected to be non-NULL */ if (len > size) len = size; copy = GC_malloc_atomic(len + 1); if (copy == NULL) { # ifndef MSWINCE errno = ENOMEM; # endif return NULL; ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
265,124,909,395,030,500,000,000,000,000,000,000,000
17
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static void pegasus_set_multicast(struct net_device *net) { pegasus_t *pegasus = netdev_priv(net); if (net->flags & IFF_PROMISC) { pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; netif_info(pegasus, link, net, "Promiscuous mode enabled\n"); } else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { peg...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
222,525,969,249,657,670,000,000,000,000,000,000,000
17
pegasus: 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") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
static int vhost_vdpa_open(struct inode *inode, struct file *filep) { struct vhost_vdpa *v; struct vhost_dev *dev; struct vhost_virtqueue **vqs; int nvqs, i, r, opened; v = container_of(inode->i_cdev, struct vhost_vdpa, cdev); opened = atomic_cmpxchg(&v->opened, 0, 1); if (opened) return -EBUSY; nvqs = v->...
0
[ "CWE-190" ]
linux
870aaff92e959e29d40f9cfdb5ed06ba2fc2dae0
27,955,646,572,542,975,000,000,000,000,000,000,000
55
vdpa: clean up get_config_size ret value handling The return type of get_config_size is size_t so it makes sense to change the type of the variable holding its result. That said, this already got taken care of (differently, and arguably not as well) by commit 3ed21c1451a1 ("vdpa: check that offsets are within bounds"...
String read(int64_t len) { StringBuffer sb(len); auto buf = sb.appendCursor(len); auto n = zip_fread(m_zipFile, buf, len); if (n > 0) { sb.resize(n); return sb.detach(); } return empty_string(); }
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
279,630,217,765,357,100,000,000,000,000,000,000,000
10
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
static int __init mcheck_debugfs_init(void) { struct dentry *dmce, *ffake_panic; dmce = mce_get_debugfs_dir(); if (!dmce) return -ENOMEM; ffake_panic = debugfs_create_file("fake_panic", 0444, dmce, NULL, &fake_panic_fops); if (!ffake_panic) return -ENOMEM; return 0; }
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
288,441,367,029,188,370,000,000,000,000,000,000,000
14
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
int iter_lookup_parent_glue_from_cache(struct module_env* env, struct delegpt* dp, struct regional* region, struct query_info* qinfo) { struct ub_packed_rrset_key* akey; struct delegpt_ns* ns; size_t num = delegpt_count_targets(dp); for(ns = dp->nslist; ns; ns = ns->next) { /* get cached parentside A */ ...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
229,954,073,889,453,740,000,000,000,000,000,000,000
35
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
static void __net_exit icmpv6_sk_exit(struct net *net) { int i; for_each_possible_cpu(i) { inet_ctl_sock_destroy(net->ipv6.icmp_sk[i]); } kfree(net->ipv6.icmp_sk); }
0
[ "CWE-20", "CWE-200" ]
linux
79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2
47,236,720,615,420,530,000,000,000,000,000,000,000
9
net: handle no dst on skb in icmp6_send Andrey reported the following while fuzzing the kernel with syzkaller: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 0 PID: 3859 Comm: a.out Not tainted...
isis_print_extd_ip_reach(netdissect_options *ndo, const uint8_t *tptr, const char *ident, uint16_t afi) { char ident_buffer[20]; uint8_t prefix[sizeof(struct in6_addr)]; /* shared copy buffer for IPv4 and IPv6 prefixes */ u_int metric, status_byte, bit_length, byte_length, sublen, p...
1
[ "CWE-125", "CWE-787" ]
tcpdump
979dcefd7b259e9e233f77fe1c5312793bfd948f
274,578,969,162,284,000,000,000,000,000,000,000,000
99
CVE-2017-12998/IS-IS: Check for 2 bytes if we're going to fetch 2 bytes. Probably a copy-and-pasteo. This fixes a buffer over-read discovered by Forcepoint's security researchers Otto Airamo & Antti Levomäki. Add a test using the capture file supplied by the reporter(s).
static int link_set_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) { _cleanup_link_unref_ Link *link = userdata; int r; log_link_debug(link, "Set link"); r = sd_netlink_message_get_errno(m); if (r < 0 && r != -EEXIST) { log_link_error_errno(lin...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
272,109,263,921,427,200,000,000,000,000,000,000,000
15
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
static int fits_nan_64 (unsigned char *v) {register unsigned long k; k = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; k &= 0x7fffffff; /* Dont care about the sign bit */ /* See NOST Definition of the Flexible Image Transport System (FITS), */ /* Appendix F, IEEE special formats. */ return ( ((k >= 0x7f7...
0
[ "CWE-476" ]
gimp
ace45631595e8781a1420842582d67160097163c
112,005,550,647,552,300,000,000,000,000,000,000,000
12
Bug 676804 - file handling DoS for fit file format Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on broken/malicious fits files.
static void usbredir_cleanup_device_queues(USBRedirDevice *dev) { int i; packet_id_queue_empty(&dev->cancelled); packet_id_queue_empty(&dev->already_in_flight); for (i = 0; i < MAX_ENDPOINTS; i++) { usbredir_free_bufpq(dev, I2EP(i)); } }
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
221,090,850,162,245,070,000,000,000,000,000,000,000
10
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 bool dump_fd_info(const char *dest_filename, char *source_filename, int source_base_ofs, uid_t uid, gid_t gid) { FILE *fp = fopen(dest_filename, "w"); if (!fp) return false; unsigned fd = 0; while (fd <= 99999) /* paranoia check */ { sprintf(source_filename + source_base_ofs,...
1
[ "CWE-59" ]
abrt
d6e2f6f128cef4c21cb80941ae674c9842681aa7
61,577,906,513,352,070,000,000,000,000,000,000,000
45
ccpp: open file for dump_fd_info with O_EXCL To avoid possible races. Related: #1211835 Signed-off-by: Jakub Filak <jfilak@redhat.com>
int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, int type) { int err; char *xattr_name; size_t size = 0; char *value = NULL; hfs_dbg(ACL_MOD, "[%s]: ino %lu\n", __func__, inode->i_ino); switch (type) { case ACL_TYPE_ACCESS: xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { err ...
1
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
232,009,027,515,793,380,000,000,000,000,000,000,000
53
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
static int http_auth(const char *creds, struct transaction_t *txn) { struct auth_challenge_t *chal = &txn->auth_chal; static int status = SASL_OK; int slen; const char *clientin = NULL, *realm = NULL, *user, **authzid; unsigned int clientinlen = 0; struct auth_scheme_t *scheme; static char b...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
206,474,142,010,252,440,000,000,000,000,000,000,000
229
HTTP: don't overrun buffer when parsing strings with sscanf()
void get_partition_set(const TABLE *table, uchar *buf, const uint index, const key_range *key_spec, part_id_range *part_spec) { partition_info *part_info= table->part_info; uint num_parts= part_info->get_tot_partitions(); uint i, part_id; uint sub_part= num_parts; uint32 part_part= num_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
11,648,549,450,209,740,000,000,000,000,000,000,000
166
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.
flatpak_proxy_finalize (GObject *object) { FlatpakProxy *proxy = FLATPAK_PROXY (object); if (g_socket_service_is_active (G_SOCKET_SERVICE (proxy))) unlink (proxy->socket_path); g_assert (proxy->clients == NULL); g_hash_table_destroy (proxy->policy); g_hash_table_destroy (proxy->wildcard_policy); g_ha...
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
96,330,900,509,348,540,000,000,000,000,000,000,000
18
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
vm_run_eval (ecma_compiled_code_t *bytecode_data_p, /**< byte-code data */ uint32_t parse_opts) /**< ecma_parse_opts_t option bits */ { ecma_value_t this_binding; ecma_object_t *lex_env_p; /* ECMA-262 v5, 10.4.2 */ if (parse_opts & ECMA_PARSE_DIRECT_EVAL) { this_binding = ecma_copy_value (JE...
0
[ "CWE-416" ]
jerryscript
3ad76f932c8d2e3b9ba2d95e64848698ec7d7290
203,001,349,473,081,800,000,000,000,000,000,000,000
89
Fix for-in collection cleanup on abrupt 'has' result (#4807) This patch fixes #4747 JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, const char *filename) { int rc = -1; int flags = 0; pid_t tid = -1; struct libmnt_parser pa = { .line = 0 }; assert(tb); assert(f); assert(filename); DBG(TAB, ul_debugobj(tb, "%s: start parsing [entries=%d, filter=%s]", filename, mnt_table_get_n...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
284,528,531,260,829,260,000,000,000,000,000,000,000
80
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
TEST_F(HttpConnectionManagerConfigTest, AlwaysSetRequestIdInResponseConfigured) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http always_set_request_id_in_response: true route_config: name: local_route http_filters: - name: envoy.filters.http.router )EOF"; HttpConnectionManagerConf...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
122,527,274,442,349,430,000,000,000,000,000,000,000
16
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
gst_rmdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { gboolean res = FALSE; GstRMDemux *rmdemux; rmdemux = GST_RMDEMUX (parent); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: GST_DEBUG_OBJECT (rmdemux, "Position query: no idea from demuxer!"); break; cas...
0
[]
gst-plugins-ugly
9726aaf78e6643a5955864f444852423de58de29
208,375,563,563,791,540,000,000,000,000,000,000,000
68
rmdemux: Make sure we have enough data available when parsing audio/video packets Otherwise there will be out-of-bounds reads and potential crashes. Thanks to Natalie Silvanovich for reporting. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37 Part-of: <https://gitlab.freedesktop.org/gstre...
Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size) { Error error; Vector<uint8_t> pixels; error = pixels.resize(p_pixel_size); if (error != OK) { return error; } uint8_t *pixels_w = pixels.ptrw(); size_t compres...
0
[ "CWE-20", "CWE-787" ]
godot
403e4fd08b0b212e96f53d926e6273e0745eaa5a
75,754,029,754,463,840,000,000,000,000,000,000,000
47
Fix a crash in the TGA loader with malformed input
bool Binary::has_rpath() const { return has_command<RPathCommand>(); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
216,075,041,678,868,960,000,000,000,000,000,000,000
3
Resolve #764
static struct page *shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info, pgoff_t index) { struct vm_area_struct pvma; struct page *page; /* Create a pseudo vma that just contains the policy */ pvma.vm_start = 0; /* Bias interleave by inode number to distribute better across nodes */ pvma.vm_pgoff = inde...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
46,170,995,347,013,900,000,000,000,000,000,000,000
20
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
static int FIPS_dsa_test(int bad) { DSA *dsa = NULL; unsigned char dgst[] = "etaonrishdlc"; int r = 0; DSA_SIG *sig = NULL; ERR_clear_error(); dsa = FIPS_dsa_new(); if (!dsa) goto end; if (!DSA_generate_parameters_ex(dsa, 1024,NULL,0,NULL,NULL,NULL)) goto end; if (!DSA_generat...
0
[]
openssl
200f249b8c3b6439e0200d01caadc24806f1a983
137,808,573,976,681,300,000,000,000,000,000,000,000
32
Remove Dual EC DRBG from FIPS module.
_WriteKey(TScreen *screen, const Char *in) { Char line[16]; unsigned count = 0; size_t length = strlen((const char *) in); if (screen->control_eight_bits) { line[count++] = ANSI_CSI; } else { line[count++] = ANSI_ESC; line[count++] = '['; } while (length--) line[count++] = *in++; li...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
86,562,933,983,889,920,000,000,000,000,000,000,000
17
snapshot of project "xterm", label xterm-365d
Debug(val, a, b, c, d, e, f, g) int val; char *a, *b, *c, *d, *e, *f, *g; { }
0
[ "CWE-787" ]
cracklib
33d7fa4585247cd2247a1ffa032ad245836c6edb
229,745,503,591,803,540,000,000,000,000,000,000,000
5
Fix a buffer overflow processing long words A buffer overflow processing long words has been discovered. This commit applies the patch from https://build.opensuse.org/package/view_file/Base:System/cracklib/0004-overflow-processing-long-words.patch by Howard Guo. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=8...
void CLASS parse_phase_one (int base) { unsigned entries, tag, len, data, save, i, j, c; float romm_cam[3][3]; char *cp; memset (&ph1, 0, sizeof ph1); fseek (ifp, base, SEEK_SET); order = get4() & 0xffff; if (get4() >> 8 != 0x526177) return; /* "Raw" */ fseek (ifp, get4()+base, SEEK_SET); entries = ...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
209,753,007,110,954,570,000,000,000,000,000,000,000
67
Avoid overflow in ljpeg_start().
void Compute(OpKernelContext* ctx) override { const Tensor& shape = ctx->input(0); OP_REQUIRES( ctx, TensorShapeUtils::IsVector(shape.shape()), errors::InvalidArgument("shape must be a vector of int32, got shape ", shape.shape().DebugString())); auto dims = ...
0
[ "CWE-369" ]
tensorflow
e86605c0a336c088b638da02135ea6f9f6753618
142,317,067,181,359,350,000,000,000,000,000,000,000
19
Fix FPE in inpace update ops. PiperOrigin-RevId: 388303197 Change-Id: Ib48309b6213ffe53eba81004b00e889d653e4b83
void Curl_ssl_sessionid_lock(struct Curl_easy *data) { if(SSLSESSION_SHARED(data)) Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_ACCESS_SINGLE); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
117,689,240,478,269,560,000,000,000,000,000,000,000
5
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890