func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) { int err; if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t))) return -EFAULT; if (from->si_code < 0) return __copy_to_user(to, from, sizeof(siginfo_t)) ? -EFAULT : 0; /* * If you change siginfo_t structure, please be sure * this code is ...
0
[ "CWE-399" ]
linux
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
33,592,250,921,054,866,000,000,000,000,000,000,000
76
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls This fixes a kernel memory contents leak via the tkill and tgkill syscalls for compat processes. This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field when handling signals delivered from tkill. The place of the infoleak: int ...
flatpak_context_share_from_string (const char *string, GError **error) { FlatpakContextShares shares = flatpak_context_bitmask_from_string (string, flatpak_context_shares); if (shares == 0) { g_autofree char *values = g_strjoinv (", ", (char **)flatpak_context_shares); g_set_error (error, G_OPTION_...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
168,280,933,336,509,360,000,000,000,000,000,000,000
13
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
static bool arcmsr_hbaA_get_config(struct AdapterControlBlock *acb) { struct MessageUnit_A __iomem *reg = acb->pmuA; char *acb_firm_model = acb->firm_model; char *acb_firm_version = acb->firm_version; char *acb_device_map = acb->device_map; char __iomem *iop_firm_model = (char __iomem *)(&reg->message_rwbuffer[15]...
0
[ "CWE-119", "CWE-787" ]
linux
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
176,987,607,026,047,440,000,000,000,000,000,000,000
51
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: <stable@vger.kernel.org> Reported-by: Marco Grassi <marco.gra@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Sig...
static int io_tee(struct io_kiocb *req, unsigned int issue_flags) { struct io_splice *sp = &req->splice; struct file *in = sp->file_in; struct file *out = sp->file_out; unsigned int flags = sp->flags & ~SPLICE_F_FD_IN_FIXED; long ret = 0; if (issue_flags & IO_URING_F_NONBLOCK) return -EAGAIN; if (sp->len) r...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
166,839,091,507,682,400,000,000,000,000,000,000,000
22
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
__nfqnl_enqueue_packet_gso(struct net *net, struct nfqnl_instance *queue, struct sk_buff *skb, struct nf_queue_entry *entry) { int ret = -ENOMEM; struct nf_queue_entry *entry_seg; nf_bridge_adjust_segmented_data(skb); if (skb->next == NULL) { /* last packet, no need to copy entry */ struct sk_buff *gso_sk...
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
214,273,924,490,971,500,000,000,000,000,000,000,000
28
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static int dio_bio_reap(struct dio *dio) { int ret = 0; if (dio->reap_counter++ >= 64) { while (dio->bio_list) { unsigned long flags; struct bio *bio; int ret2; spin_lock_irqsave(&dio->bio_lock, flags); bio = dio->bio_list; dio->bio_list = bio->bi_private; spin_unlock_irqrestore(&dio->bio_loc...
0
[]
linux-2.6
848c4dd5153c7a0de55470ce99a8e13a63b4703f
176,312,567,257,391,660,000,000,000,000,000,000,000
22
dio: zero struct dio with kzalloc instead of manually This patch uses kzalloc to zero all of struct dio rather than manually trying to track which fields we rely on being zero. It passed aio+dio stress testing and some bug regression testing on ext3. This patch was introduced by Linus in the conversation that lead u...
static bool torture_smb2_notify_invalid_reauth(struct torture_context *torture, struct smb2_tree *tree1, struct smb2_tree *tree2) { bool ret = true; NTSTATUS status; union smb_notify notify; union smb_open io; struct smb2_handle h1; struct smb2_request *req; struct cli_credentials *invali...
0
[ "CWE-266" ]
samba
f100bd2f2e4f047942002a992c99104227a17f81
259,529,105,221,899,350,000,000,000,000,000,000,000
76
s4: torture: Add smb2.notify.handle-permissions test. Add knownfail entry. CVE-2020-14318 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434 Signed-off-by: Jeremy Allison <jra@samba.org>
static void set_bringup_idt_handler(gate_desc *idt, int n, void *handler) { #ifdef CONFIG_AMD_MEM_ENCRYPT struct idt_data data; gate_desc desc; init_idt_data(&data, n, handler); idt_init_desc(&desc, &data); native_write_idt_entry(idt, n, &desc); #endif }
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
120,989,057,791,265,780,000,000,000,000,000,000,000
11
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
static int iov_fault_in_pages_write(struct iovec *iov, unsigned long len) { while (!iov->iov_len) iov++; while (len > 0) { unsigned long this_len; this_len = min_t(unsigned long, len, iov->iov_len); if (fault_in_pages_writeable(iov->iov_base, this_len)) break; len -= this_len; iov++; } return len...
1
[ "CWE-17" ]
linux
637b58c2887e5e57850865839cc75f59184b23d1
141,578,071,654,752,800,000,000,000,000,000,000,000
18
switch pipe_read() to copy_page_to_iter() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
xfs_alloc_longest_free_extent( struct xfs_perag *pag, xfs_extlen_t need, xfs_extlen_t reserved) { xfs_extlen_t delta = 0; /* * If the AGFL needs a recharge, we'll have to subtract that from the * longest extent. */ if (need > pag->pagf_flcount) delta = need - pag->pagf_flcount; /* * If we cannot m...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
278,296,867,643,602,100,000,000,000,000,000,000,000
33
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
int LibuvStreamWrap::ReadStart() { return uv_read_start(stream(), [](uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { static_cast<LibuvStreamWrap*>(handle->data)->OnUvAlloc(suggested_size, buf); }, [](uv_stream_t* stream, ssize_...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
95,693,094,960,971,390,000,000,000,000,000,000,000
9
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
void page_size_init(struct uc_struct *uc) { /* NOTE: we can always suppose that qemu_host_page_size >= TARGET_PAGE_SIZE */ if (uc->qemu_host_page_size == 0) { uc->qemu_host_page_size = uc->qemu_real_host_page_size; } if (uc->qemu_host_page_size < TARGET_PAGE_SIZE) { uc->qemu_host_...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
138,282,662,080,241,300,000,000,000,000,000,000,000
11
Fix crash when mapping a big memory and calling uc_close
SV* Perl__add_range_to_invlist(pTHX_ SV* invlist, UV start, UV end) { /* Add the range from 'start' to 'end' inclusive to the inversion list's * set. A pointer to the inversion list is returned. This may actually be * a new list, in which case the passed in one has been destroyed. The * passed-in ...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
237,857,782,529,956,140,000,000,000,000,000,000,000
258
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
refresh_tray_icon_menu_if_active (GsdXrandrManager *manager, guint32 timestamp) { GsdXrandrManagerPrivate *priv = manager->priv; if (priv->popup_menu) { gtk_menu_shell_cancel (GTK_MENU_SHELL (priv->popup_menu)); /* status_icon_popup_menu_selection_done_cb() will free everything */ ...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
309,951,815,113,415,700,000,000,000,000,000,000,000
9
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
stream_eos (CamelStream *stream) { CamelPOP3Stream *is = (CamelPOP3Stream *) stream; return is->mode != CAMEL_POP3_STREAM_DATA; }
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
289,366,725,587,402,430,000,000,000,000,000,000,000
6
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
alist_add_list( int count, char_u **files, int after, // where to add: 0 = before first one int will_edit) // will edit adding argument { int i; int old_argcount = ARGCOUNT; if (check_arglist_locked() != FAIL && GA_GROW_OK(&ALIST(curwin)->al_ga, count)) { if (after < 0) ...
0
[ "CWE-416", "CWE-125" ]
vim
6f98371532fcff911b462d51bc64f2ce8a6ae682
337,441,494,291,783,700,000,000,000,000,000,000,000
37
patch 8.2.3884: crash when clearing the argument list while using it Problem: Crash when clearing the argument list while using it. Solution: Lock the argument list for ":all".
JVM_LoadLibrary(const char *libName) { JNIEnv *env; JavaVM *vm = (JavaVM *) BFUjavaVM; char errMsg[512]; #ifdef WIN32 HINSTANCE dllHandle; UINT prevMode; Trc_SC_LoadLibrary_Entry(libName); prevMode = SetErrorMode( SEM_NOOPENFILEERRORBOX|SEM_FAILCRITICALERRORS ); /* LoadLibrary will try appending .DLL if nec...
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
10,645,966,440,894,650,000,000,000,000,000,000,000
61
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
void PreScanOutputDev::drawImage(GfxState *state, Object * /*ref*/, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool /*interpolate*/, int * /*maskColors*/, GBool inlineImg) { GfxColorSpace *colorSpace; int i, j; colorSpace = colorMap->getColorSpace(); if (colorSpace->getMode...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
250,073,430,746,375,050,000,000,000,000,000,000,000
30
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static bool bsg_complete(struct bsg_device *bd) { bool ret = false; bool spin; do { spin_lock_irq(&bd->lock); BUG_ON(bd->done_cmds > bd->queued_cmds); /* * All commands consumed. */ if (bd->done_cmds == bd->queued_cmds) ret = true; spin = !test_bit(BSG_F_BLOCK, &bd->flags); spin_unlock_irq(...
0
[ "CWE-416", "CWE-787" ]
linux
128394eff343fc6d2f32172f03e24829539c5835
50,604,557,642,550,850,000,000,000,000,000,000,000
23
sg_write()/bsg_write() is not fit to be called under KERNEL_DS Both damn things interpret userland pointers embedded into the payload; worse, they are actually traversing those. Leaving aside the bad API design, this is very much _not_ safe to call with KERNEL_DS. Bail out early if that happens. Cc: stable@vger.kern...
void Connection::TurnOffTLS1_1() { TLSv1_1_ = false; version_.minor_ = 1; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
262,668,690,796,600,450,000,000,000,000,000,000,000
5
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { static const char module[] = "LogLuvEncode32"; LogLuvState* sp = EncoderState(tif); int shft; tmsize_t i; tmsize_t j; tmsize_t npixels; uint8* op; uint32* tp; uint32 b; tmsize_t occ; int rc=0, mask; tmsize_t beg; assert(s == 0); assert(sp != N...
0
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
300,362,016,885,930,170,000,000,000,000,000,000,000
94
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
static int csnmp_oid_compare(oid_t const *left, oid_t const *right) { return ( snmp_oid_compare(left->oid, left->oid_len, right->oid, right->oid_len)); }
0
[ "CWE-415" ]
collectd
d16c24542b2f96a194d43a73c2e5778822b9cb47
301,149,123,974,415,400,000,000,000,000,000,000,000
4
snmp plugin: Fix double free of request PDU snmp_sess_synch_response() always frees request PDU, in both case of request error and success. If error condition occurs inside of `while (status == 0)` loop, double free of `req` happens. Issue: #2291 Signed-off-by: Florian Forster <octo@collectd.org>
LoRaMacStatus_t LoRaMacMcChannelSetup( McChannelParams_t *channel ) { if( ( MacCtx.MacState & LORAMAC_TX_RUNNING ) == LORAMAC_TX_RUNNING ) { return LORAMAC_STATUS_BUSY; } if( channel->GroupID >= LORAMAC_MAX_MC_CTX ) { return LORAMAC_STATUS_MC_GROUP_UNDEFINED; } ...
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
113,410,240,648,300,600,000,000,000,000,000,000,000
54
Added received buffer size checks.
int RGWDeleteBucketPolicy::verify_permission() { if (!verify_bucket_permission(s, rgw::IAM::s3DeleteBucketPolicy)) { return -EACCES; } return 0; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
224,374,253,065,843,460,000,000,000,000,000,000,000
8
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static void Execute(const FunctionCallbackInfo<Value>& args) { Parser* parser; ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder()); CHECK(parser->current_buffer_.IsEmpty()); CHECK_EQ(parser->current_buffer_len_, 0); CHECK_NULL(parser->current_buffer_data_); ArrayBufferViewContents<char> buffer(ar...
0
[ "CWE-400" ]
node
753f3b247ae2d24fee0b3f48b9ec3a5c308f0650
21,024,755,713,288,432,000,000,000,000,000,000,000
19
http: add requestTimeout This commits introduces a new http.Server option called requestTimeout with a default value in milliseconds of 0. If requestTimeout is set to a positive value, the server will start a new timer set to expire in requestTimeout milliseconds when a new connection is established. The timer is als...
void jas_matrix_asl(jas_matrix_t *matrix, int n) { jas_matind_t i; jas_matind_t j; jas_seqent_t *rowstart; jas_matind_t rowstep; jas_seqent_t *data; if (jas_matrix_numrows(matrix) > 0 && jas_matrix_numcols(matrix) > 0) { assert(matrix->rows_); rowstep = jas_matrix_rowstep(matrix); for (i = matrix->numrows_...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
79,620,422,632,755,910,000,000,000,000,000,000,000
21
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 ...
static int shmem_map_and_free_swp(struct page *subdir, int offset, int limit, struct page ***dir, spinlock_t *punch_lock) { swp_entry_t *ptr; int freed = 0; ptr = shmem_swp_map(subdir); for (; offset < limit; offset += LATENCY_LIMIT) { int size = limit - offset; if (size > LATENCY_LIMIT) size = LATENCY_LI...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
39,490,064,293,757,866,000,000,000,000,000,000,000
26
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
bool ProcessMessages(CNode* pfrom) { CDataStream& vRecv = pfrom->vRecv; if (vRecv.empty()) return true; //if (fDebug) // printf("ProcessMessages(%u bytes)\n", vRecv.size()); // // Message format // (4) message start // (12) command // (4) size // (4) checksum ...
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
127,138,474,462,595,170,000,000,000,000,000,000,000
114
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y) { return gdImageBoundsSafeMacro (im, x, y); }
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
85,054,502,090,682,630,000,000,000,000,000,000,000
4
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
bool is_int_typed_array(JSObject *obj) { return JS_IsInt8Array(obj) || JS_IsUint8Array(obj) || JS_IsInt16Array(obj) || JS_IsUint16Array(obj) || JS_IsInt32Array(obj) || JS_IsUint32Array(obj) || JS_IsUint8ClampedArray(obj) || JS_IsBigInt64Array(obj) || JS_IsBigUint64Array(obj); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
241,682,269,797,259,170,000,000,000,000,000,000,000
5
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f, struct usb_ep *_ep) { return config_ep_by_speed_and_alt(g, f, _ep, 0); }
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
226,838,183,963,407,940,000,000,000,000,000,000,000
6
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 inline bool fw_sysfs_loading(struct fw_priv *fw_priv) { return __fw_state_check(fw_priv, FW_STATUS_LOADING); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
217,906,696,094,380,100,000,000,000,000,000,000,000
4
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
int ssl3_send_client_key_exchange(SSL *s) { unsigned char *p,*d; int n; unsigned long l; #ifndef OPENSSL_NO_RSA unsigned char *q; EVP_PKEY *pkey=NULL; #endif #ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; #endif /* OPENSSL_NO_KRB5 */ #ifndef OPENSSL_NO_ECDH EC_KEY *clnt_ecdh = NULL; const EC_POINT *srvr_ecpoint = ...
1
[ "CWE-476" ]
openssl
141a5482fdd1944804cc342c1c443362eed8501b
77,229,545,539,009,010,000,000,000,000,000,000,000
502
Fix CVE-2014-3470 Check session_cert is not NULL before dereferencing it.
lp8000_print_page(gx_device_printer *pdev, gp_file *prn_stream) { int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev); int in_size = line_size; unsigned int report_size; byte *buf1 = (byte *)gs_malloc(pdev->memory, in_size, 1, "lp8000_print_page(buf1)"); /* Worst c...
0
[ "CWE-787" ]
ghostpdl
4f6bc662909ab79e8fbe9822afb36e8a0eafc2b7
198,380,967,640,048,660,000,000,000,000,000,000,000
224
Bug 701844: fixed output buffer size worst case in lp8000_print_page(). Fixes: ./sanbin/gs -dBATCH -dNOPAUSE -dSAFER -dFIXEDMEDIA -sPAPERSIZE=legal -sOutputFile=tmp -sDEVICE=lp8000 ../bug-701844.pdf
static void test_hex_strings() { assert_true_rule_blob( "rule test { \ strings: $a = { 64 01 00 00 60 01 } \ condition: $a }", PE32_FILE); assert_true_rule_blob( "rule test { \ strings: $a = { 64 0? 00 00 ?0 01 } \ condition: $a }", PE32_FILE); assert_true...
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
197,580,318,243,164,300,000,000,000,000,000,000,000
186
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
TEST_F(HttpConnectionManagerConfigTest, UserDefinedSettingsRejectInconsistentCustomParameters) { const std::string yaml_string = R"EOF( codec_type: http2 stat_prefix: my_stat_prefix route_config: virtual_hosts: - name: default domains: - "*" routes: - match: prefix: "/" route: ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
262,596,700,411,011,670,000,000,000,000,000,000,000
29
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
ut64 get_code_object_addr(RBuffer *buffer, ut32 magic) { magic_int = magic; pyc_object *co = get_code_object (buffer); ut64 result = 0; if (!co) { return 0; } pyc_code_object *cobj = co->data; result = cobj->start_offset; free_object (co); return result; }
0
[ "CWE-415" ]
radare2
049de62730f4954ef9a642f2eeebbca30a8eccdc
196,118,592,428,619,320,000,000,000,000,000,000,000
14
Fix #18679 - UAF when parsing corrupted pyc files ##bin
bool finalize() { return copy_up_to(src_len); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
186,729,004,682,616,330,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
PRV_StateMachine(PRIVATE_NETWORKKEY ** network, PRIVATE_ASSOCIATIONKEY ** association, int event, int state, void *params) { volatile FSM_ENTRY * entry; /* check if the given event is valid, if not return an error */ if (event < 0 || event >= DUL_NUMBER_OF_EVENTS) ...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
279,621,652,223,101,170,000,000,000,000,000,000,000
45
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
static int ip_vs_genl_dump_services(struct sk_buff *skb, struct netlink_callback *cb) { int idx = 0, i; int start = cb->args[0]; struct ip_vs_service *svc; mutex_lock(&__ip_vs_mutex); for (i = 0; i < IP_VS_SVC_TAB_SIZE; i++) { list_for_each_entry(svc, &ip_vs_svc_table[i], s_list) { if (++idx <= start...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
218,039,498,050,717,580,000,000,000,000,000,000,000
36
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
R_API RList *r_bin_java_find_cp_const_by_val_float(RBinJavaObj *bin_obj, const ut8 *bytes, ut32 len) { RList *res = r_list_newf (free); ut32 *v = NULL; RListIter *iter; RBinJavaCPTypeObj *cp_obj; eprintf ("Looking for %f\n", R_BIN_JAVA_FLOAT (bytes, 0)); r_list_foreach (bin_obj->cp_list, iter, cp_obj) { if (cp_...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
184,185,181,304,379,540,000,000,000,000,000,000,000
21
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static Variant HHVM_METHOD(ZipArchive, getProperty, int64_t property) { auto zipDir = getResource<ZipDirectory>(this_, "zipDir"); if (zipDir == nullptr) { switch (property) { case 0: case 1: case 2: return 0; case 3: case 4: return empty_string_variant(); def...
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
104,953,650,698,915,630,000,000,000,000,000,000,000
49
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...
void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k ) { /* loop */ OPJ_UINT32 i; opj_cp_t *l_cp = NULL; opj_tcp_t *l_tcp = NULL; opj_tccp_t *l_ref_tccp = NULL, *l_copied_tccp = NULL; OPJ_UINT32 l_prc_size; /* preconditions */ assert(p_j2k != 00)...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
249,135,812,573,999,260,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)
int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot, unsigned long npages) { return kvmppc_core_create_memslot(kvm, slot, npages); }
0
[ "CWE-476" ]
linux
ac64115a66c18c01745bbd3c47a36b124e5fd8c0
319,820,903,329,086,000,000,000,000,000,000,000,000
5
KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM The following program causes a kernel oops: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kvm.h> main() { int fd = open("/dev/kvm", O_RDWR); ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); } This happe...
void sha256(unsigned char *digest, int len, unsigned char *hash){ gcry_md_hash_buffer(GCRY_MD_SHA256, hash, digest, len); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
333,630,273,758,077,500,000,000,000,000,000,000,000
3
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
static int dccp_print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple) { return seq_printf(s, "sport=%hu dport=%hu ", ntohs(tuple->src.u.dccp.port), ntohs(tuple->dst.u.dccp.port)); }
0
[]
linux
2bc780499aa33311ec0f3e42624dfaa7be0ade5e
84,421,460,585,836,650,000,000,000,000,000,000,000
7
[NETFILTER]: nf_conntrack: add DCCP protocol support Add DCCP conntrack helper. Thanks to Gerrit Renker <gerrit@erg.abdn.ac.uk> for review and testing. Signed-off-by: Patrick McHardy <kaber@trash.net>
_dbus_auth_get_identity (DBusAuth *auth) { if (auth->state == &common_state_authenticated) { return auth->authorized_identity; } else { /* FIXME instead of this, keep an empty credential around that * doesn't require allocation or something */ /* return empt...
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
68,949,487,367,619,020,000,000,000,000,000,000,000
16
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len) { const char *p = (const char*)data; const char *named; guint32 i, j, num_named; MonoObject *attr; void *params_buf [32]; void **params; MonoMethodSignature *sig; mono_class_init (method->klass); if (len == 0) { attr...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
120,564,176,429,592,560,000,000,000,000,000,000,000
93
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
LibRaw_bigfile_datastream::LibRaw_bigfile_datastream(const wchar_t *fname) : filename(),wfilename(fname) { if(wfilename.size()>0) { struct _stati64 st; if(!_wstati64(wfilename.c_str(),&st)) _fsize = st.st_size; #ifndef WIN32SECURECALLS f = _wfopen(wfilename.c_str(),L"rb"); #else i...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
137,057,302,318,609,610,000,000,000,000,000,000,000
21
cumulated data checks patch
gdm_manager_handle_register_display (GdmDBusManager *manager, GDBusMethodInvocation *invocation, GVariant *details) { GdmManager *self = GDM_MANAGER (manager); const char *sender; GDBusConnect...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
61,966,492,181,768,620,000,000,000,000,000,000,000
69
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
void Filter::chargeUpstreamAbort(Http::Code code, bool dropped, UpstreamRequest& upstream_request) { if (downstream_response_started_) { if (upstream_request.grpcRqSuccessDeferred()) { upstream_request.upstreamHost()->stats().rq_error_.inc(); config_.stats_.rq_reset_after_downstream_response_started_....
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
119,401,832,184,319,250,000,000,000,000,000,000,000
19
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static PyObject *Restricted_getattr(RestrictedObject *self, char *name) { PyErr_Format(PyExc_IOError, "%s access restricted by mod_wsgi", self->s); return NULL; }
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
301,924,075,757,966,540,000,000,000,000,000,000,000
6
Local privilege escalation when using daemon mode. (CVE-2014-0240)
void setProtocolVersion(msg_t *pM, int iNewVersion) { assert(pM != NULL); if(iNewVersion != 0 && iNewVersion != 1) { dbgprintf("Tried to set unsupported protocol version %d - changed to 0.\n", iNewVersion); iNewVersion = 0; } pM->iProtocolVersion = iNewVersion; }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
260,886,587,471,551,340,000,000,000,000,000,000,000
9
backporting abort condition fix from 5.7.7
add_account_cb (GoaManager *manager, GAsyncResult *res, gpointer user_data) { AddAccountData *data = user_data; goa_manager_call_add_account_finish (manager, &data->account_object_path, res, &data->e...
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
327,616,795,203,942,260,000,000,000,000,000,000,000
9
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
interact_request_callback (SmsConn conn, SmPointer manager_data, int dialog_type) { GsmXSMPClient *client = manager_data; #if 0 gboolean res; GError *error; #endif g_debug ("GsmXSMPClient: Client '%s' received In...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
198,901,600,628,835,520,000,000,000,000,000,000,000
33
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
inline bool HasGradientTape() { return !GetTapeSet()->empty(); }
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
6,336,022,560,585,484,000,000,000,000,000,000,000
1
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
void kvm_lapic_exit(void) { static_key_deferred_flush(&apic_hw_disabled); WARN_ON(static_branch_unlikely(&apic_hw_disabled.key)); static_key_deferred_flush(&apic_sw_disabled); WARN_ON(static_branch_unlikely(&apic_sw_disabled.key)); }
0
[ "CWE-476" ]
linux
00b5f37189d24ac3ed46cb7f11742094778c46ce
144,494,579,099,788,740,000,000,000,000,000,000,000
7
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON() instead of crashing the host. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <...
do_helptags(char_u *dirname, int add_help_tags) { #ifdef FEAT_MULTI_LANG int len; int i, j; garray_T ga; char_u lang[2]; char_u ext[5]; char_u fname[8]; int filecount; char_u **files; /* Get a list of all files in the help directory and in subdirectories. */ STRCPY(NameBuff, ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
267,960,861,249,238,900,000,000,000,000,000,000,000
97
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.
_XimSetEncodingByDetail( Xim im, char **buf, int *len) { *len = 0; *buf = NULL; return True; }
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
272,781,171,163,162,600,000,000,000,000,000,000,000
9
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
wired_device_state_changed (NMDevice *device, NMDeviceState new_state, NMDeviceState old_state, NMDeviceStateReason reason, NMApplet *applet) { if (new_state == NM_DEVICE_STATE_ACTIVATED) { NMConnection *c...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
202,920,776,956,157,870,000,000,000,000,000,000,000
28
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
static int check_map_prog_compatibility(struct bpf_verifier_env *env, struct bpf_map *map, struct bpf_prog *prog) { enum bpf_prog_type prog_type = resolve_prog_type(prog); /* * Validate that trace type programs use preallocated hash maps. * * For programs attached to PERF events this is mandatory as ...
0
[ "CWE-367" ]
bpf
353050be4c19e102178ccc05988101887c25ae53
28,480,574,232,451,180,000,000,000,000,000,000,000
97
bpf: Fix toctou on read-only map's constant scalar tracking Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is checking whether maps are read-only both from BPF program side and user space side, and then, given their content is constant, reading out their data via map->ops->map_direct_value_ad...
directory_permits_begindir_requests(or_options_t *options) { return options->BridgeRelay != 0 || options->DirPort != 0; }
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
330,025,695,776,202,240,000,000,000,000,000,000,000
4
Don't give the Guard flag to relays without the CVE-2011-2768 fix
struct cl_engine *cl_engine_new(void) { struct cl_engine *new; cli_intel_t *intel; new = (struct cl_engine *) cli_calloc(1, sizeof(struct cl_engine)); if(!new) { cli_errmsg("cl_engine_new: Can't allocate memory for cl_engine\n"); return NULL; } /* Setup default limits */ new->maxscansize...
0
[]
clamav-devel
167c0079292814ec5523d0b97a9e1b002bf8819b
52,246,369,284,611,010,000,000,000,000,000,000,000
159
fix 0.99.3 false negative of virus Pdf.Exploit.CVE_2016_1046-1.
generic_timeout_obj_to_nlattr(struct sk_buff *skb, const void *data) { const unsigned int *timeout = data; if (nla_put_be32(skb, CTA_TIMEOUT_GENERIC_TIMEOUT, htonl(*timeout / HZ))) goto nla_put_failure; return 0; nla_put_failure: return -ENOSPC; }
0
[ "CWE-20", "CWE-254", "CWE-787" ]
linux
db29a9508a9246e77087c5531e45b2c88ec6988b
217,290,419,890,992,370,000,000,000,000,000,000,000
12
netfilter: conntrack: disable generic tracking for known protocols Given following iptables ruleset: -P FORWARD DROP -A FORWARD -m sctp --dport 9 -j ACCEPT -A FORWARD -p tcp --dport 80 -j ACCEPT -A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT One would assume that this allows SCTP on port 9 and...
static bool ParseSkin(Skin *skin, std::string *err, const json &o, bool store_original_json_for_extras_and_extensions) { ParseStringProperty(&skin->name, err, o, "name", false, "Skin"); std::vector<int> joints; if (!ParseIntegerArrayProperty(&joints, err, o, "joints", false, "Skin")) { ...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
139,913,013,980,686,120,000,000,000,000,000,000,000
38
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
p11_rpc_buffer_add_uint64 (p11_buffer *buffer, uint64_t value) { p11_rpc_buffer_add_uint32 (buffer, ((value >> 32) & 0xffffffff)); p11_rpc_buffer_add_uint32 (buffer, (value & 0xffffffff)); }
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
24,729,708,271,938,470,000,000,000,000,000,000,000
6
Check attribute length against buffer size If an attribute's length does not match the length of the byte array inside it, one length was used for allocation, and the other was used for memcpy. This additional check will instead return an error on malformed messages.
ins_right(void) { int end_change = dont_sync_undo == FALSE; // end undoable change #ifdef FEAT_FOLDING if ((fdo_flags & FDO_HOR) && KeyTyped) foldOpenCursor(); #endif undisplay_dollar(); if (gchar_cursor() != NUL || virtual_active()) { start_arrow_with_change(&curwin->w_cursor, end_change); if (...
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
267,661,908,758,738,830,000,000,000,000,000,000,000
45
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data, struct sk_buff **out_skb, int *out_bnum) { struct hnae_ring *ring = ring_data->ring; struct net_device *ndev = ring_data->napi.dev; struct hns_nic_priv *priv = netdev_priv(ndev); struct sk_buff *skb; struct hnae_desc *desc; struct hnae_...
0
[ "CWE-416" ]
linux
27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2
162,172,034,129,253,750,000,000,000,000,000,000,000
125
net: hns: Fix a skb used after free bug skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK, which cause hns_nic_net_xmit to use a freed skb. BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940... [17659.112635] alloc_debug_processing+0x18c/0x1a0 [17659.117208] __slab_alloc+0x52c/0x...
cmp_buffer_with_ref(THD *thd, TABLE *table, TABLE_REF *tab_ref) { bool no_prev_key; if (!tab_ref->disable_cache) { if (!(no_prev_key= tab_ref->key_err)) { /* Previous access found a row. Copy its key */ memcpy(tab_ref->key_buff2, tab_ref->key_buff, tab_ref->key_length); } } else n...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
205,697,430,413,885,650,000,000,000,000,000,000,000
19
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
cond_continue(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr ep = esp; int code; /* The top element of the e-stack is the remaining tail of */ /* the cond body. The top element of the o-stack should be */ /* the (boolean) result of the test that is the first element */ /* of the tail. */ ...
0
[ "CWE-200" ]
ghostpdl
34cc326eb2c5695833361887fe0b32e8d987741c
43,351,125,289,064,330,000,000,000,000,000,000,000
35
Bug 699927: don't include operator arrays in execstack output When we transfer the contents of the execution stack into the array, take the extra step of replacing any operator arrays on the stack with the operator that reference them. This prevents the contents of Postscript defined, internal only operators (those c...
GF_Err proj_type_box_size(GF_Box *s) { GF_ProjectionTypeBox *ptr = (GF_ProjectionTypeBox *)s; if (ptr->type==GF_ISOM_BOX_TYPE_CBMP) s->size += 8; else if (ptr->type==GF_ISOM_BOX_TYPE_EQUI) s->size += 16; else s->size += 8; return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
60,434,829,709,632,180,000,000,000,000,000,000,000
12
fixed #2255
ZEND_VM_COLD_HANDLER(103, ZEND_EXT_FCALL_END, ANY, ANY) { USE_OPLINE if (!EG(no_extensions)) { SAVE_OPLINE(); zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, execute_data); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } ZEND_VM_NEXT_OPCODE(); }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
68,739,040,177,434,940,000,000,000,000,000,000,000
11
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.
static void cleanup_stale_expunged(struct mailbox *mailbox) { const char *fname; int expunge_fd = -1; const char *expunge_base = NULL; size_t expunge_len = 0; /* mapped size */ unsigned long expunge_num; unsigned long emapnum; uint32_t erecno; uint32_t eversion; bit32 eoffset, expu...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
204,901,978,688,322,900,000,000,000,000,000,000,000
65
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
s32 gf_hevc_read_vps_ex(u8 *data, u32 *size, HEVCState *hevc, Bool remove_extensions) { GF_BitStream *bs; char *data_without_emulation_bytes = NULL; u32 data_without_emulation_bytes_size = 0; s32 vps_id = -1; /*still contains emulation bytes*/ data_without_emulation_bytes_size = remove_extensions ? gf_media_nalu...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
185,801,467,193,961,530,000,000,000,000,000,000,000
67
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
*/ static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts) { st_entry ent; wddx_stack *stack = (wddx_stack *)user_data; if (!strcmp(name, EL_PACKET)) { int i; if (atts) for (i=0; atts[i]; i++) { if (!strcmp(atts[i], EL_VERSION)) { /* nothing for now */ } } ...
1
[ "CWE-119", "CWE-787" ]
php-src
c4cca4c20e75359c9a13a1f9a36cb7b4e9601d29
158,508,226,729,187,700,000,000,000,000,000,000,000
175
Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c
static void free_loaded_vmcs(struct loaded_vmcs *loaded_vmcs) { if (!loaded_vmcs->vmcs) return; loaded_vmcs_clear(loaded_vmcs); free_vmcs(loaded_vmcs->vmcs); loaded_vmcs->vmcs = NULL; }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
112,446,535,556,692,380,000,000,000,000,000,000,000
8
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
kdc_process_s4u2self_req(kdc_realm_t *kdc_active_realm, krb5_kdc_req *request, krb5_const_principal client_princ, const krb5_db_entry *server, krb5_keyblock *tgs_subkey, krb5_keyblock *tgs_sessio...
0
[ "CWE-476" ]
krb5
93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7
166,181,295,797,475,520,000,000,000,000,000,000,000
139
Fix S4U2Self KDC crash when anon is restricted In validate_as_request(), when enforcing restrict_anonymous_to_tgt, use client.princ instead of request->client; the latter is NULL when validating S4U2Self requests. CVE-2016-3120: In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc to dereference a ...
GC_API GC_ATTR_MALLOC char * GC_CALL GC_debug_strdup(const char *str, GC_EXTRA_PARAMS) { char *copy; size_t lb; if (str == NULL) { if (GC_find_leak) GC_err_printf("strdup(NULL) behavior is undefined\n"); return NULL; } lb = strlen(str) + 1; ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
3,180,745,143,264,343,000,000,000,000,000,000,000
22
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...
_equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b) { COMPARE_SCALAR_FIELD(rtindex); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
144,054,660,850,603,520,000,000,000,000,000,000,000
6
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 pyc_object *copy_object(pyc_object *object) { pyc_object *copy = R_NEW0 (pyc_object); if (!copy || !object) { free (copy); return NULL; } copy->type = object->type; if ((int)object->type == 0) { // do nothing } else switch (object->type) { case TYPE_NULL: break; case TYPE_TUPLE: case TYPE_SMAL...
0
[ "CWE-415" ]
radare2
049de62730f4954ef9a642f2eeebbca30a8eccdc
149,734,201,670,572,130,000,000,000,000,000,000,000
78
Fix #18679 - UAF when parsing corrupted pyc files ##bin
lha_calcsum(unsigned char sum, const void *pp, int offset, size_t size) { unsigned char const *p = (unsigned char const *)pp; p += offset; for (;size > 0; --size) sum += *p++; return (sum); }
0
[ "CWE-125" ]
libarchive
98dcbbf0bf4854bf987557e55e55fff7abbf3ea9
209,876,818,135,098,680,000,000,000,000,000,000,000
9
Fail with negative lha->compsize in lha_read_file_header_1() Fixes a heap buffer overflow reported in Secunia SA74169
void NumberFormatTest::TestFastFormatInt32() { IcuTestErrorCode status(*this, "TestFastFormatInt32"); // The two simplest formatters, old API and new API. // Old API should use the fastpath for ints. LocalizedNumberFormatter lnf = NumberFormatter::withLocale("en"); LocalPointer<NumberFormat> df(Num...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
293,931,270,490,292,600,000,000,000,000,000,000,000
45
ICU-20246 Fixing another integer overflow in number parsing.
static CImg<T> get_load_gzip_external(const char *const filename) { return CImg<T>().load_gzip_external(filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
239,143,135,485,056,040,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.
private int mget(struct magic_set *ms, const unsigned char *s, struct magic *m, size_t nbytes, size_t o, unsigned int cont_level, int mode, int text, int flip, int recursion_level, int *printed_something, int *need_separator, int *returnval) { uint32_t soffset, offset = ms->offset; uint32_t count = m->st...
1
[ "CWE-119" ]
file
447558595a3650db2886cd2f416ad0beba965801
143,710,931,706,813,040,000,000,000,000,000,000,000
645
PR/313: Aaron Reffett: Check properly for exceeding the offset.
vips_foreign_load_gif_load( VipsForeignLoad *load ) { VipsForeignLoadGifClass *class = (VipsForeignLoadGifClass *) VIPS_OBJECT_GET_CLASS( load ); VipsForeignLoadGif *gif = (VipsForeignLoadGif *) load; VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( load ), 4 ); /* Rewind. */ if( class...
0
[ "CWE-416" ]
libvips
ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d
151,833,891,685,365,350,000,000,000,000,000,000,000
54
fetch map after DGifGetImageDesc() Earlier refactoring broke GIF map fetch.
_gnutls_finished(gnutls_session_t session, int type, void *ret, int sending) { const int siz = TLS_MSG_LEN; uint8_t concat[MAX_HASH_SIZE + 16 /*MD5 */ ]; size_t hash_len; const char *mesg; int rc, len; if (sending) len = session->internals.handshake_hash_buffer.length; else len = session->internals.hands...
0
[ "CWE-310" ]
gnutls
db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa
210,012,675,744,302,170,000,000,000,000,000,000,000
58
handshake: check for TLS_FALLBACK_SCSV If TLS_FALLBACK_SCSV was sent by the client during the handshake, and the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX, send the "Inappropriate fallback" fatal alert and abort the handshake. This mechanism was defined in RFC7507.
TEST(ExprMatchTest, ExpressionOptimizeRewritesVariableDereferenceAsConstant) { const boost::intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); auto varId = expCtx->variablesParseState.defineVariable("var"); expCtx->variables.setConstantValue(varId, Value(4)); BSONObj expres...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
266,906,984,747,192,280,000,000,000,000,000,000,000
25
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static inline int get_rounds(int pLen, int padLen, int t) { int roundL1 = 1; // round ups int roundL2 = 1; int L1 = COMPRESS_CONSTANT + pLen - t; int L2 = COMPRESS_CONSTANT + pLen - padLen - 1 - t; L1 -= COMPRESS_UPPER; L2 -= COMPRESS_UPPER; if ( (L1 % COMPRESS_LOWER) == 0) ro...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
53,018,097,273,939,970,000,000,000,000,000,000,000
24
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
GF_Err def_parent_box_read(GF_Box *s, GF_BitStream *bs) { return gf_isom_box_array_read(s, bs); }
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
283,220,027,623,400,050,000,000,000,000,000,000,000
4
fixed #1757
static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn) { const struct btf_type *t, *func, *func_proto, *ptr_type; struct bpf_reg_state *regs = cur_regs(env); const char *func_name, *ptr_type_name; u32 i, nargs, func_id, ptr_type_id; const struct btf_param *args; int err; func_id = insn...
0
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
30,035,234,507,213,767,000,000,000,000,000,000,000
67
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
int compare_files2(File fd1, const char* filename2) { int error= RESULT_OK; File fd2; size_t fd1_length, fd2_length; DYNAMIC_STRING fd1_result, fd2_result; if ((fd2= my_open(filename2, O_RDONLY, MYF(0))) < 0) { my_close(fd1, MYF(0)); die("Failed to open second file: '%s'", filename2); } fd1_le...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
248,329,483,707,436,240,000,000,000,000,000,000,000
66
mysqltest: don't eat new lines in --exec pass them through as is
void bnx2x_igu_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 segment, u16 index, u8 op, u8 update) { u32 igu_addr = bp->igu_base_addr; igu_addr += (IGU_CMD_INT_ACK_BASE + igu_sb_id)*8; bnx2x_igu_ack_sb_gen(bp, igu_sb_id, segment, index, op, update, igu_addr); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
161,144,810,877,181,190,000,000,000,000,000,000,000
8
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
go_deeper(trystate_T *stack, int depth, int score_add) { stack[depth + 1] = stack[depth]; stack[depth + 1].ts_state = STATE_START; stack[depth + 1].ts_score = stack[depth].ts_score + score_add; stack[depth + 1].ts_curi = 1; // start just after length byte stack[depth + 1].ts_flags = 0; }
0
[ "CWE-457" ]
vim
15d9890eee53afc61eb0a03b878a19cb5672f732
208,999,483,293,084,300,000,000,000,000,000,000,000
8
patch 8.2.3582: reading uninitialized memory when giving spell suggestions Problem: Reading uninitialized memory when giving spell suggestions. Solution: Check that preword is not empty.
static const URI_CHAR * URI_FUNC(ParsePort)(URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast) { if (first >= afterLast) { return afterLast; } switch (*first) { case URI_SET_DIGIT: return URI_FUNC(ParsePort)(state, first + 1, afterLast); default: return first; } }
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
315,589,315,885,720,900,000,000,000,000,000,000,000
13
Fix uriParse*Ex* out-of-bounds read
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *image2=NULL, *rotated_image; register Quantum *q; unsigned int status; MATHeader MATLAB_HDR; size_t size; size_t CellType; QuantumInfo *quantum_info; ImageInfo *clone_info; int i; ssize_t ldblk; u...
0
[ "CWE-772" ]
ImageMagick
ece953bbe14e8514afc23e05e4030eea872e29da
47,769,872,027,319,040,000,000,000,000,000,000,000
572
https://github.com/ImageMagick/ImageMagick/issues/878
dwarf_formdata16(Dwarf_Attribute attr, Dwarf_Form_Data16 * returned_val, Dwarf_Error* error) { Dwarf_Half attrform = 0; Dwarf_CU_Context cu_context = 0; Dwarf_Debug dbg = 0; int res = 0; Dwarf_Small *section_end = 0; Dwarf_Unsigned section_length = 0; Dwarf_Small *section_start...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
138,686,996,235,435,500,000,000,000,000,000,000,000
41
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
void MemIo::Impl::reserve(long wcount) { long need = wcount + idx_; if (!isMalloced_) { // Minimum size for 1st block is 32kB long size = EXV_MAX(32768 * (1 + need / 32768), size_); byte* data = (byte*)std::malloc(size); std::memcpy(data, data_, ...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
191,419,064,428,984,100,000,000,000,000,000,000,000
25
Fix https://github.com/Exiv2/exiv2/issues/55
term_cursor_color(char_u *color) { if (*T_CSC != NUL) { out_str(T_CSC); // set cursor color start out_str_nf(color); out_str(T_CEC); // set cursor color end out_flush(); } }
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
95,469,830,337,756,200,000,000,000,000,000,000,000
10
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
ModuleExport size_t RegisterYUVImage(void) { MagickInfo *entry; entry=SetMagickInfo("YUV"); entry->decoder=(DecodeImageHandler *) ReadYUVImage; entry->encoder=(EncodeImageHandler *) WriteYUVImage; entry->adjoin=MagickFalse; entry->raw=MagickTrue; entry->description=ConstantString("CCIR 601 4:1:1 or 4...
0
[ "CWE-401" ]
ImageMagick6
210474b2fac6a661bfa7ed563213920e93e76395
160,689,666,285,332,840,000,000,000,000,000,000,000
15
Fix ultra rare but potential memory-leak
compileSwapDots (FileInfo * nested, CharsString * source, CharsString * dest) { int k = 0; int kk = 0; CharsString dotsSource; CharsString dotsDest; dest->length = 0; dotsSource.length = 0; while (k <= source->length) { if (source->chars[k] != ',' && k != source->length) dotsSource.chars[dotsSo...
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
270,706,905,092,018,840,000,000,000,000,000,000,000
25
Merge branch 'table_resolver'