func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
g_file_query_writable_namespaces (GFile *file, GCancellable *cancellable, GError **error) { GFileIface *iface; GError *my_error; GFileAttributeInfoList *list; g_return_val_if_fail (G_IS_FILE (file), NULL); if (g_cancellable_s...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
292,874,295,223,942,850,000,000,000,000,000,000,000
39
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
void thread_info_cache_init(void) { thread_info_cache = kmem_cache_create("thread_info", THREAD_SIZE, THREAD_SIZE, 0, NULL); BUG_ON(thread_info_cache == NULL); }
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
190,163,454,545,144,400,000,000,000,000,000,000,000
6
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
static ssize_t fuse_perform_write(struct kiocb *iocb, struct address_space *mapping, struct iov_iter *ii, loff_t pos) { struct inode *inode = mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); int err = 0; ssize_t res = 0; if (inode->i_size < po...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
85,605,990,413,088,780,000,000,000,000,000,000,000
54
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,...
_dbus_append_address_from_socket (DBusSocket fd, DBusString *address, DBusError *error) { union { struct sockaddr sa; struct sockaddr_storage storage; struct sockaddr_un un; struct sockaddr_in ipv4; struct sockaddr_in6...
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
56,763,377,743,654,060,000,000,000,000,000,000,000
95
sysdeps-unix: On MSG_CTRUNC, close the fds we did receive MSG_CTRUNC indicates that we have received fewer fds that we should have done because the buffer was too small, but we were treating it as though it indicated that we received *no* fds. If we received any, we still have to make sure we close them, otherwise the...
WM_SYMBOL int WildMidi_ConvertBufferToMidi (uint8_t *in, uint32_t insize, uint8_t **out, uint32_t *outsize) { if (!in || !out || !outsize) { _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL params)", 0); return (-1); } if (!memc...
0
[ "CWE-200", "CWE-119" ]
wildmidi
814f31d8eceda8401eb812fc2e94ed143fdad0ab
262,589,460,694,277,100,000,000,000,000,000,000,000
30
wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input Fixes bug #178.
off_t PackLinuxElf64::pack3(OutputFile *fo, Filter &ft) { off_t flen = super::pack3(fo, ft); // loader follows compressed PT_LOADs // NOTE: PackLinuxElf::pack3 adjusted xct_off for the extra page unsigned v_hole = sz_pack2 + lsize; set_te64(&elfout.phdr[0].p_filesz, v_hole); set_te64(&elfout.phdr...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
198,928,226,399,710,130,000,000,000,000,000,000,000
128
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
int FS_FTell( fileHandle_t f ) { int pos; if (fsh[f].zipFile == qtrue) { pos = unztell(fsh[f].handleFiles.file.z); } else { pos = ftell(fsh[f].handleFiles.file.o); } return pos; }
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
95,140,097,656,449,100,000,000,000,000,000,000,000
9
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
void jbd2_journal_free_transaction(transaction_t *transaction) { if (unlikely(ZERO_OR_NULL_PTR(transaction))) return; kmem_cache_free(transaction_cache, transaction); }
0
[ "CWE-787" ]
linux
e09463f220ca9a1a1ecfda84fcda658f99a1f12a
44,148,960,304,506,610,000,000,000,000,000,000,000
6
jbd2: don't mark block as modified if the handle is out of credits Do not set the b_modified flag in block's journal head should not until after we're sure that jbd2_journal_dirty_metadat() will not abort with an error due to there not being enough space reserved in the jbd2 handle. Otherwise, future attempts to modi...
bool parse_method(struct pool *pool, char *s) { json_t *val = NULL, *method, *err_val, *params; json_error_t err; bool ret = false; char *buf; if (!s) goto out; val = JSON_LOADS(s, &err); if (!val) { applog(LOG_INFO, "JSON decode failed(%d): %s", err.line, err.text); goto out; } method = json_object_g...
0
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
15,673,116,325,988,452,000,000,000,000,000,000,000
71
Do some random sanity checking for stratum message parsing
void Item_subselect::init(st_select_lex *select_lex, select_result_interceptor *result) { /* Please see Item_singlerow_subselect::invalidate_and_restore_select_lex(), which depends on alterations to the parse tree implemented here. */ DBUG_ENTER("Item_subselect::init"); DBUG_PRINT("enter", ("selec...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
31,085,681,342,914,663,000,000,000,000,000,000,000
58
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
static int l2tp_nl_cmd_tunnel_dump(struct sk_buff *skb, struct netlink_callback *cb) { int ti = cb->args[0]; struct l2tp_tunnel *tunnel; struct net *net = sock_net(skb->sk); for (;;) { tunnel = l2tp_tunnel_find_nth(net, ti); if (tunnel == NULL) goto out; if (l2tp_nl_tunnel_send(skb, NETLINK_CB(cb->skb).p...
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
205,340,957,047,563,000,000,000,000,000,000,000,000
24
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
static uint64_t e1000_io_read(void *opaque, hwaddr addr, unsigned size) { E1000State *s = opaque; (void)s; return 0; }
0
[ "CWE-120" ]
qemu
b0d9ffcd0251161c7c92f94804dcf599dfa3edeb
148,708,355,767,895,550,000,000,000,000,000,000,000
8
e1000: Discard packets that are too long if !SBP and !LPE The e1000_receive function for the e1000 needs to discard packets longer than 1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes this behavior and allocates memory based on this assumption. Signed-off-by: Michael Contreras <michael@inet...
get_comp_wordbreaks (var) SHELL_VAR *var; { /* If we don't have anything yet, assign a default value. */ if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0) enable_hostname_completion (perform_hostname_completion); FREE (value_cell (var)); var_setvalue (var, savestring (rl_c...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
320,023,438,638,409,320,000,000,000,000,000,000,000
12
commit bash-20120224 snapshot
static void *vhost_net_buf_get_ptr(struct vhost_net_buf *rxq) { if (rxq->tail != rxq->head) return rxq->queue[rxq->head]; else return NULL; }
0
[ "CWE-787" ]
linux
e2b3b35eb9896f26c98b9a2c047d9111638059a2
167,977,848,073,515,780,000,000,000,000,000,000,000
7
vhost_net: batch used ring update in rx This patch tries to batched used ring update during RX. This is pretty fit for the case when guest is much faster (e.g dpdk based backend). In this case, used ring is almost empty: - we may get serious cache line misses/contending on both used ring and used idx. - at most 1 p...
term_color(char_u *s, int n) { char buf[20]; int i = *s == CSI ? 1 : 2; // index in s[] just after <Esc>[ or CSI // Special handling of 16 colors, because termcap can't handle it // Also accept "\e[3%dm" for TERMINFO, it is sometimes used // Also accept CSI instead of <Esc>[ if (n >= 8 && t_...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
77,399,909,745,764,400,000,000,000,000,000,000,000
39
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.
static bool checkreturn pb_dec_bool(pb_istream_t *stream, const pb_field_iter_t *field) { return pb_decode_bool(stream, (bool*)field->pData); }
0
[ "CWE-763" ]
nanopb
e2f0ccf939d9f82931d085acb6df8e9a182a4261
252,025,451,836,315,240,000,000,000,000,000,000,000
4
Fix invalid free() with oneof (#647) Nanopb would call free() or realloc() on an invalid (attacker controlled) pointer value when all the following conditions are true: - PB_ENABLE_MALLOC is defined at the compile time - Message definition contains an oneof field, and the oneof contains at least one pointer type fi...
static inline u64 ioat_chansts_to_addr(u64 status) { return status & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR; }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
75,125,182,949,832,350,000,000,000,000,000,000,000
4
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static void tcp_service_net_dma(struct sock *sk, bool wait) { dma_cookie_t done, used; dma_cookie_t last_issued; struct tcp_sock *tp = tcp_sk(sk); if (!tp->ucopy.dma_chan) return; last_issued = tp->ucopy.dma_cookie; dma_async_issue_pending(tp->ucopy.dma_chan); do { if (dma_async_is_tx_complete(tp->ucopy.d...
1
[]
linux
7bced397510ab569d31de4c70b39e13355046387
296,827,169,809,875,420,000,000,000,000,000,000,000
30
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
isdn_poll(struct file *file, poll_table * wait) { unsigned int mask = 0; unsigned int minor = iminor(file->f_path.dentry->d_inode); int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); lock_kernel(); if (minor == ISDN_MINOR_STATUS) { poll_wait(file, &(dev->info_waitq), wait); /* mask = POLLOUT | POLLWRNORM; ...
0
[ "CWE-119" ]
linux-2.6
eafe1aa37e6ec2d56f14732b5240c4dd09f0613a
79,378,887,032,814,800,000,000,000,000,000,000,000
39
I4L: fix isdn_ioctl memory overrun vulnerability Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB <adlab@venustech.com.cn> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: ADLAB <adlab@venustech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
dirserv_thinks_router_is_unreliable(time_t now, routerinfo_t *router, int need_uptime, int need_capacity) { if (need_uptime) { if (!enough_mtbf_info) { /* XXX023 Once most authorities are on v3, we should change the rule from * "...
0
[ "CWE-264" ]
tor
00fffbc1a15e2696a89c721d0c94dc333ff419ef
43,993,832,882,385,760,000,000,000,000,000,000,000
31
Don't give the Guard flag to relays without the CVE-2011-2768 fix
getInt(struct SWF_ACTIONPUSHPARAM *act) { switch( act->Type ) { case PUSH_FLOAT: /* FLOAT -- also used for PROPERTY storing */ return ((int)act->p.Float); case PUSH_NULL: /* NULL */ return 0; case PUSH_REGISTER: /* REGISTER */ return getInt(regs[act->p.RegisterNumber]); case PUSH_DOUBLE: /* DOUBLE */ ret...
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
116,714,092,945,397,200,000,000,000,000,000,000,000
19
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
jpc_ms_t *jpc_ms_create(int type) { jpc_ms_t *ms; jpc_mstabent_t *mstabent; if (!(ms = jas_malloc(sizeof(jpc_ms_t)))) { return 0; } ms->id = type; ms->len = 0; mstabent = jpc_mstab_lookup(ms->id); ms->ops = &mstabent->ops; memset(&ms->parms, 0, sizeof(jpc_msparms_t)); return ms; }
0
[]
jasper
4031ca321d8cb5798c316ab39c7a5dc88a61fdd7
283,294,162,198,449,250,000,000,000,000,000,000,000
15
Incorporated changes from patch jasper-1.900.3-libjasper-stepsizes-overflow.patch
static PHP_MINIT_FUNCTION(session) /* {{{ */ { zend_class_entry ce; zend_register_auto_global(zend_string_init("_SESSION", sizeof("_SESSION") - 1, 1), 0, NULL); my_module_number = module_number; PS(module_number) = module_number; PS(session_status) = php_session_none; REGISTER_INI_ENTRIES(); #ifdef HAVE_LIBMM...
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
74,961,853,342,917,010,000,000,000,000,000,000,000
43
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
struct r_bin_dyldcache_lib_t *r_bin_dyldcache_extract(struct r_bin_dyldcache_obj_t* bin, int idx, int *nlib) { ut64 liboff, linkedit_offset; ut64 dyld_vmbase; ut32 addend = 0; struct r_bin_dyldcache_lib_t *ret = NULL; struct dyld_cache_image_info* image_infos = NULL; struct mach_header *mh; ut8 *data, *cmdptr; ...
1
[ "CWE-125" ]
radare2
30f4c7b52a4e2dc0d0b1bae487d90f5437c69d19
49,593,362,434,089,290,000,000,000,000,000,000,000
154
Fix #12374 - oobread crash in truncated dyldcache ##bin (#12381)
static void test_thumb(void) { uc_engine *uc; uc_err err; uc_hook trace1, trace2; int sp = 0x1234; // R0 register printf("Emulate THUMB code\n"); // Initialize emulator in ARM mode err = uc_open(UC_ARCH_ARM, UC_MODE_THUMB, &uc); if (err) { printf("Failed on uc_open() with ...
0
[ "CWE-295", "CWE-787" ]
unicorn
bf1713d9e011b55ca1f502a6779fc4722b4bb077
322,132,820,526,938,200,000,000,000,000,000,000,000
49
Add arm ite blocks samples from #853 (#1381)
gin::ObjectTemplateBuilder GetObjectTemplateBuilder( v8::Isolate* isolate) override { return gin::Wrappable<WebFrameRenderer>::GetObjectTemplateBuilder(isolate) .SetMethod("getWebFrameId", &WebFrameRenderer::GetWebFrameId) .SetMethod("setName", &WebFrameRenderer::SetName) .SetMethod(...
0
[]
electron
6d9f3a494596d6b3e30938af9deb2c79f1c7f797
225,211,822,259,389,900,000,000,000,000,000,000,000
43
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191) fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367) * Make ElectronBrowser mojo interface frame associated. (#32815) Co-authored-by: Marek Haranczyk <marek@openfin.co> * fix: e...
SliceDeque& operator=(SliceDeque&& rhs) noexcept { // This custom assignment move operator is needed so that ring_ will be updated properly. std::move(rhs.inline_ring_, rhs.inline_ring_ + InlineRingCapacity, inline_ring_); external_ring_ = std::move(rhs.external_ring_); ring_ = (external_ring_ != null...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
105,766,656,806,864,900,000,000,000,000,000,000,000
10
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
static void nfs4_open_prepare(struct rpc_task *task, void *calldata) { struct nfs4_opendata *data = calldata; struct nfs4_state_owner *sp = data->owner; if (nfs_wait_on_sequence(data->o_arg.seqid, task) != 0) return; /* * Check if we still need to send an OPEN call, or if we can use * a delegation instead. ...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
209,034,926,968,025,670,000,000,000,000,000,000,000
43
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *yyscanner, YR_COMPILER* compiler) { FILE *yyo = yyoutput; YYUSE (yyo); YYUSE (yyscanner); YYUSE (compiler); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[...
0
[ "CWE-125" ]
yara
ab906da53ff2a68c6fd6d1fa73f2b7c7bf0bc636
211,930,971,274,289,170,000,000,000,000,000,000,000
14
Fix issue #597
ff_layout_set_layoutdriver(struct nfs_server *server, const struct nfs_fh *dummy) { #if IS_ENABLED(CONFIG_NFS_V4_2) server->caps |= NFS_CAP_LAYOUTSTATS; #endif return 0; }
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
304,494,594,265,834,560,000,000,000,000,000,000,000
8
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
static void bfq_add_request(struct request *rq) { struct bfq_queue *bfqq = RQ_BFQQ(rq); struct bfq_data *bfqd = bfqq->bfqd; struct request *next_rq, *prev; unsigned int old_wr_coeff = bfqq->wr_coeff; bool interactive = false; bfq_log_bfqq(bfqd, bfqq, "add_request %d", rq_is_sync(rq)); bfqq->queued[rq_is_sync(r...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
162,153,084,901,737,500,000,000,000,000,000,000,000
250
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
void snd_usb_set_interface_quirk(struct usb_device *dev) { struct snd_usb_audio *chip = dev_get_drvdata(&dev->dev); if (!chip) return; /* * "Playback Design" products need a 50ms delay after setting the * USB interface. */ switch (USB_ID_VENDOR(chip->usb_id)) { case 0x23ba: /* Playback Design */ case 0x0...
0
[]
sound
0f886ca12765d20124bd06291c82951fd49a33be
144,414,968,703,941,240,000,000,000,000,000,000,000
17
ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the acces...
[[noreturn]] void TProtocolException::throwInvalidSkipType(TType type) { throw TProtocolException( TProtocolException::INVALID_DATA, folly::sformat( "Encountered invalid field/element type ({}) during skipping", static_cast<uint8_t>(type))); }
0
[ "CWE-20", "CWE-703", "CWE-755" ]
fbthrift
c5d6e07588cd03061bc54d451a7fa6e84883d62b
225,208,629,128,876,340,000,000,000,000,000,000,000
7
Throw on bad types during skipping data Summary: The current code silently returns on bad types. In case when we have an invalid data, we may get a container of a large size with a bad type, this would lead to us running long loop doing nothing (though we already can say that the data is invalid). The new code would ...
static int tw5864_querystd(struct file *file, void *priv, v4l2_std_id *std) { struct tw5864_input *input = video_drvdata(file); enum tw5864_vid_std tw_std; int ret; ret = tw5864_input_std_get(input, &tw_std); if (ret) return ret; *std = tw5864_get_v4l2_std(tw_std); return 0; }
0
[ "CWE-476" ]
linux
2e7682ebfc750177a4944eeb56e97a3f05734528
97,863,910,306,759,270,000,000,000,000,000,000,000
13
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame 'vb' null check should be done before dereferencing it in tw5864_handle_frame, otherwise a NULL pointer dereference may occur. Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-of...
size_t IOBuf::countChainElements() const { size_t numElements = 1; for (IOBuf* current = next_; current != this; current = current->next_) { ++numElements; } return numElements; }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
192,717,025,219,262,200,000,000,000,000,000,000,000
7
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable *g) { ASFContext *asf = s->priv_data; AVIOContext *pb = s->pb; uint64_t size; uint32_t err_data_len, ts_data_len; // type specific data length uint16_t flags; ff_asf_guid stream_type; enum AVMediaType type; in...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2b46ebdbff1d8dec7a3d8ea280a612b91a582869
332,266,139,501,786,420,000,000,000,000,000,000,000
103
avformat/asfdec_o: Check size_bmp more fully Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ext4_force_split_extent_at(handle_t *handle, struct inode *inode, struct ext4_ext_path **ppath, ext4_lblk_t lblk, int nofail) { struct ext4_ext_path *path = *ppath; int unwritten = ext4_ext_is_unwritten(path[path->p_depth].p_ext); int flags = EXT4_EX_NOCACHE | EXT4_GET_BLOCKS_PRE_IO; if (nofail) flag...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
36,407,295,570,277,986,000,000,000,000,000,000,000
15
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
void linsertCommand(client *c) { int where; robj *subject; listTypeIterator *iter; listTypeEntry entry; int inserted = 0; if (strcasecmp(c->argv[2]->ptr,"after") == 0) { where = LIST_TAIL; } else if (strcasecmp(c->argv[2]->ptr,"before") == 0) { where = LIST_HEAD; } else ...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
260,774,712,349,906,600,000,000,000,000,000,000,000
48
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 struct rds_connection *__rds_conn_create(struct net *net, __be32 laddr, __be32 faddr, struct rds_transport *trans, gfp_t gfp, int is_outgoing) { struct rds_connection *conn, *parent = NULL; struct hlist_head *head = rds_conn_bucket(laddr, faddr); struct rds_transport *loop_trans; ...
1
[ "CWE-362" ]
linux
8c7188b23474cca017b3ef354c4a58456f68303a
75,434,576,802,603,740,000,000,000,000,000,000,000
138
RDS: fix race condition when sending a message on unbound socket Sasha's found a NULL pointer dereference in the RDS connection code when sending a message to an apparently unbound socket. The problem is caused by the code checking if the socket is bound in rds_sendmsg(), which checks the rs_bound_addr field without ...
static void snode(int d, js_Ast *node) { void (*afun)(int,js_Ast*) = snode; void (*bfun)(int,js_Ast*) = snode; void (*cfun)(int,js_Ast*) = snode; void (*dfun)(int,js_Ast*) = snode; if (!node) { return; } if (node->type == AST_LIST) { slist(d, node); return; } pc('('); ps(astname[node->type]); pc(':'...
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
242,018,780,291,939,860,000,000,000,000,000,000,000
41
Issue #161: Cope with empty programs in mujs-pp.
longlong Item_is_not_null_test::val_int() { DBUG_ASSERT(fixed == 1); DBUG_ENTER("Item_is_not_null_test::val_int"); if (const_item() && !args[0]->maybe_null) DBUG_RETURN(1); if (args[0]->is_null()) { DBUG_PRINT("info", ("null")); owner->was_null|= 1; DBUG_RETURN(0); } else DBUG_RETURN(1...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
277,844,052,674,868,340,000,000,000,000,000,000,000
15
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static bool cmd_device_reset(IDEState *s, uint8_t cmd) { ide_set_signature(s); s->status = 0x00; /* NOTE: READY is _not_ set */ s->error = 0x01; return false; }
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
239,538,025,025,101,850,000,000,000,000,000,000,000
8
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...
DumpFrags(DefragTracker *tracker) { Frag *frag; printf("Dumping frags for packet: ID=%d\n", tracker->id); TAILQ_FOREACH(frag, &tracker->frags, next) { printf("-> Frag: frag_offset=%d, frag_len=%d, data_len=%d, ltrim=%d, skip=%d\n", frag->offset, frag->len, frag->data_len, frag->ltrim, frag->skip); ...
0
[ "CWE-358" ]
suricata
4a04f814b15762eb446a5ead4d69d021512df6f8
240,175,701,633,691,020,000,000,000,000,000,000,000
10
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
static void handle_p_frame_png(PNGDecContext *s, AVFrame *p) { int i, j; uint8_t *pd = p->data[0]; uint8_t *pd_last = s->last_picture.f->data[0]; int ls = FFMIN(av_image_get_linesize(p->format, s->width, 0), s->width * s->bpp); ff_thread_await_progress(&s->last_picture, INT_MAX, 0); for (j...
0
[ "CWE-787" ]
FFmpeg
e371f031b942d73e02c090170975561fabd5c264
93,766,047,120,334,600,000,000,000,000,000,000,000
15
avcodec/pngdec: Fix off by 1 size in decode_zbuf() Fixes out of array access Fixes: 444/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_PNG_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
njs_string_decode_utf8(njs_vm_t *vm, njs_value_t *value, const njs_str_t *src) { size_t length; njs_str_t dst; length = njs_decode_utf8_length(src, &dst.length); dst.start = njs_string_alloc(vm, value, dst.length, length); if (njs_fast_path(dst.start != NULL)) { njs_decode_utf8(&dst, ...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
186,159,009,226,863,170,000,000,000,000,000,000,000
15
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { switch (req->opcode) { case IORING_OP_NOP: return 0; case IORING_OP_READV: case IORING_OP_READ_FIXED: case IORING_OP_READ: case IORING_OP_WRITEV: case IORING_OP_WRITE_FIXED: case IORING_OP_WRITE: return io_prep_rw(req, sqe); ca...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
186,619,005,925,946,160,000,000,000,000,000,000,000
84
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
BoundsCheckBbData(BoundsCheckKey* key, int32_t lower_offset, int32_t upper_offset, HBasicBlock* bb, HBoundsCheck* lower_check, HBoundsCheck* upper_check, BoundsCheckBbData* next_in_bb, ...
1
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
173,662,000,684,046,660,000,000,000,000,000,000,000
20
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static inline void remove_partial(struct kmem_cache_node *n, struct page *page) { lockdep_assert_held(&n->list_lock); list_del(&page->slab_list); n->nr_partial--; }
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
240,723,058,014,893,840,000,000,000,000,000,000,000
7
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
static void cmd_dcc_chat(const char *data, IRC_SERVER_REC *server) { void *free_arg; CHAT_DCC_REC *dcc; IPADDR own_ip; GIOChannel *handle; GHashTable *optlist; int p_id; char *nick, host[MAX_IP_LEN]; int port; g_return_if_fail(data != NULL); if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS, ...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
286,866,677,505,216,900,000,000,000,000,000,000,000
97
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
LUALIB_API int luaL_error(lua_State *L, const char *fmt, ...) { const char *msg; va_list argp; va_start(argp, fmt); msg = lj_str_pushvf(L, fmt, argp); va_end(argp); lj_err_callermsg(L, msg); return 0; /* unreachable */ }
0
[ "CWE-125" ]
LuaJIT
53f82e6e2e858a0a62fd1a2ff47e9866693382e6
157,449,014,614,839,980,000,000,000,000,000,000,000
10
Fix frame traversal for __gc handler frames. Reported by Changochen.
static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only) { php_stream_statbuf ssbuf; php_stream_context *context = NULL; php_stream_wrapper *wrapper = NULL; char *resolved_path, *path_to_open = NULL; void *ret_val = NULL; int isescaped=0; xmlURI *uri; TSRMLS_...
0
[ "CWE-611" ]
php-src
de31324c221c1791b26350ba106cc26bad23ace9
169,424,927,351,669,140,000,000,000,000,000,000,000
53
Fix bug #64938: libxml_disable_entity_loader setting is shared between threads The availability of entity loading is stored in a module global which previously was only initialized in the GINIT constructor. This had the effect that disabling the entity loader in one request caused subsequent requests hitting the same ...
ParseSwitch(act, var) struct action *act; int *var; { if (*act->args == 0) { *var ^= 1; return 0; } return ParseOnOff(act, var); }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
277,562,086,673,181,360,000,000,000,000,000,000,000
11
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static struct sock *sco_get_sock_listen(bdaddr_t *src) { struct sock *sk = NULL, *sk1 = NULL; struct hlist_node *node; read_lock(&sco_sk_list.lock); sk_for_each(sk, node, &sco_sk_list.head) { if (sk->sk_state != BT_LISTEN) continue; /* Exact match. */ if (!bacmp(&bt_sk(sk)->src, src)) break; /* Cl...
0
[ "CWE-200" ]
linux
c4c896e1471aec3b004a693c689f60be3b17ac86
208,378,649,601,690,500,000,000,000,000,000,000,000
24
Bluetooth: sco: fix information leak to userspace struct sco_conninfo has one padding byte in the end. Local variable cinfo of type sco_conninfo is copied to userspace with this uninizialized one byte, leading to old stack contents leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. ...
max3421_recv_data_available(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb = max3421_hcd->curr_urb; size_t remaining, transfer_size; u8 rcvbc; rcvbc = spi_rd8(hcd, MAX3421_REG_RCVBC); if (rcvbc > MAX3421_FIFO_SIZE) rcvbc = MAX3421_FIFO_SIZE; if (urb->actual_leng...
0
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
242,373,148,606,782,100,000,000,000,000,000,000,000
29
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
DEFUN (no_neighbor_description, no_neighbor_description_cmd, NO_NEIGHBOR_CMD2 "description", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Neighbor specific description\n") { struct peer *peer; peer = peer_and_group_lookup_vty (vty, argv[0]); if (! peer) return CMD_WARNING...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
226,044,592,902,342,200,000,000,000,000,000,000,000
18
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
int32 MkvWriter::Write(const void* buffer, uint32 length) { if (!file_) return -1; if (length == 0) return 0; if (buffer == NULL) return -1; const size_t bytes_written = fwrite(buffer, 1, length, file_); return (bytes_written == length) ? 0 : -1; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
327,963,997,662,605,600,000,000,000,000,000,000,000
14
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) { if (!cifsInode) return true; if (is_inode_writable(cifsInode)) { /* This inode is open for write at least once */ struct cifs_sb_info *cifs_sb; cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb); if (cifs_sb->mnt_cifs_flags & CIFS...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
62,690,614,857,365,010,000,000,000,000,000,000,000
23
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
local void build_tree(s, desc) deflate_state *s; tree_desc *desc; /* the tree descriptor */ { ct_data *tree = desc->dyn_tree; const ct_data *stree = desc->stat_desc->static_tree; int elems = desc->stat_desc->elems; int n, m; /* iterate over heap elements */ int ...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
199,207,166,215,381,800,000,000,000,000,000,000,000
83
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
int l2tp_packet_add_int16(struct l2tp_packet_t *pack, int id, int16_t val, int M) { struct l2tp_attr_t *attr = attr_alloc(id, M, pack->hide_avps); if (!attr) return -1; if (attr->H) { if (pack->last_RV == NULL) if (l2tp_packet_add_random_vector(pack) < 0) goto err; val = htons(val); if (encode_attr(...
0
[ "CWE-119", "CWE-125", "CWE-120" ]
accel-ppp
2324bcd5ba12cf28f47357a8f03cd41b7c04c52b
226,360,770,274,441,400,000,000,000,000,000,000,000
26
l2tp: fix RCE through buffer overflow & fix LE/BE compatibility Unsufficent checks of valid l2tp header & avp length cause possible RCE through buffer overflow, reported by https://github.com/WinMin swings & leommxj, Chaitin Security Research Lab. Add missed header length and avp length validation to fix the issue. O...
static void shmem_evict_inode(struct inode *inode) { struct shmem_inode_info *info = SHMEM_I(inode); if (inode->i_mapping->a_ops == &shmem_aops) { shmem_unacct_size(info->flags, inode->i_size); inode->i_size = 0; shmem_truncate_range(inode, 0, (loff_t)-1); if (!list_empty(&info->swaplist)) { mutex_lock(&s...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
77,096,892,888,287,280,000,000,000,000,000,000,000
21
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 em_bsf(struct x86_emulate_ctxt *ctxt) { u8 zf; __asm__ ("bsf %2, %0; setz %1" : "=r"(ctxt->dst.val), "=q"(zf) : "r"(ctxt->src.val)); ctxt->eflags &= ~X86_EFLAGS_ZF; if (zf) { ctxt->eflags |= X86_EFLAGS_ZF; /* Disable writeback. */ ctxt->dst.type = OP_NONE; } return X86EMUL_CONTINUE; }
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
12,424,681,107,378,730,000,000,000,000,000,000,000
16
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
static void set_default_parameters(opj_decompress_parameters* parameters) { if (parameters) { memset(parameters, 0, sizeof(opj_decompress_parameters)); /* default decoding parameters (command line specific) */ parameters->decod_format = -1; parameters->cod_format = -1; /* d...
0
[ "CWE-824" ]
openjpeg
0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
67,258,902,066,933,200,000,000,000,000,000,000,000
13
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
static int uas_use_uas_driver(struct usb_interface *intf, const struct usb_device_id *id, unsigned long *flags_ret) { struct usb_host_endpoint *eps[4] = { }; struct usb_device *udev = interface_to_usbdev(intf); struct usb_hcd *hcd = bus_to_hcd(udev->bus); unsigned long flags = id->driver_info; in...
1
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
321,047,993,482,790,780,000,000,000,000,000,000,000
91
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
uint32 pack_length() const { return my_datetime_binary_length(dec); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
269,387,279,520,386,740,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void operator()(OpKernelContext* ctx, const Tensor& input, const Tensor& filter, int row_stride, int col_stride, int row_dilation, int col_dilation, const Padding& padding, const std::vector<int64>& explicit_paddings, Tensor* output, TensorFormat...
0
[ "CWE-369" ]
tensorflow
b12aa1d44352de21d1a6faaf04172d8c2508b42b
330,303,734,801,420,900,000,000,000,000,000,000,000
60
Fix one more FPE. PiperOrigin-RevId: 369346568 Change-Id: I840fd575962adc879713a4c9cc59e6da3331caa7
static struct page *get_first_slab(struct kmem_cache_node *n, bool pfmemalloc) { struct page *page; assert_spin_locked(&n->list_lock); page = list_first_entry_or_null(&n->slabs_partial, struct page, lru); if (!page) { n->free_touched = 1; page = list_first_entry_or_null(&n->slabs_free, struct page, lru);...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
123,070,899,463,857,000,000,000,000,000,000,000,000
19
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static void br_multicast_send_query(struct net_bridge *br, struct net_bridge_port *port, u32 sent) { unsigned long time; struct br_ip br_group; if (!netif_running(br->dev) || br->multicast_disabled || !br->multicast_querier || timer_pending(&br->multicast_querier_timer)) return; memset(&br_gro...
0
[ "CWE-20" ]
linux
c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1
194,022,390,860,997,700,000,000,000,000,000,000,000
28
bridge: fix some kernel warning in multicast timer Several people reported the warning: "kernel BUG at kernel/timer.c:729!" and the stack trace is: #7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905 #8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge] #9 [ffff880214d25c80] br_mul...
ZipIOS::ZipIOS(std::istream& istr, const ZipLocalFileHeader& fileEntry, bool reposition): _buf(istr, fileEntry, reposition) { poco_ios_init(&_buf); }
0
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
330,058,627,708,524,070,000,000,000,000,000,000,000
4
merge zip entry absolute path vulnerability fix (#1968) from develop
inbound_cap_ack (server *serv, char *nick, char *extensions, const message_tags_data *tags_data) { EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPACK, serv->server_session, nick, extensions, NULL, NULL, 0, tags_data->timestamp); if (strstr (extensions, "identify-msg") != NULL) { serv->have_idmsg = TRUE; } if...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
315,091,571,674,517,030,000,000,000,000,000,000,000
64
Clean up handling CAP LS
static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) { const struct in6_addr *saddr; const struct in6_addr *daddr; struct sock *sk; bool delivered = false; __u8 hash; struct net *net; saddr = &ipv6_hdr(skb)->saddr; daddr = saddr + 1; hash = nexthdr & (RAW_HTABLE_SIZE - 1); read_lock(&raw_v6_hashi...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
339,611,774,371,392,150,000,000,000,000,000,000,000
71
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
void operator=(F fn) { fn_ = make_adaptor(fn, &F::operator()); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
90,051,163,695,261,600,000,000,000,000,000,000,000
3
Fix #122
GF_Err hvcc_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_HEVCConfigurationBox *ptr = (GF_HEVCConfigurationBox *) s; if (!s) return GF_BAD_PARAM; if (!ptr->config) return GF_OK; e = gf_isom_box_write_header(s, bs); if (e) return e; return gf_odf_hevc_cfg_write_bs(ptr->config, bs); }
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
27,072,813,125,852,554,000,000,000,000,000,000,000
11
fix some exploitable overflows (#994, #997)
static int really_probe_debug(struct device *dev, struct device_driver *drv) { ktime_t calltime, rettime; int ret; calltime = ktime_get(); ret = really_probe(dev, drv); rettime = ktime_get(); pr_debug("probe of %s returned %d after %lld usecs\n", dev_name(dev), ret, ktime_us_delta(rettime, calltime)); return...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
263,352,846,939,816,730,000,000,000,000,000,000,000
12
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...
DECLARESepPutFunc(putRGBseparate16bittile) { uint16 *wr = (uint16*) r; uint16 *wg = (uint16*) g; uint16 *wb = (uint16*) b; (void) img; (void) y; (void) a; while (h-- > 0) { for (x = 0; x < w; x++) *cp++ = PACK(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], img->Bitdepth16To8[*wb++]); SK...
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
232,860,806,202,437,240,000,000,000,000,000,000,000
15
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
TPMS_SIGNATURE_ECDSA_Marshal(TPMS_SIGNATURE_ECDSA *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMS_SIGNATURE_ECC_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
157,546,087,236,623,220,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
virDomainDefCheckDuplicateDiskInfo(const virDomainDef *def) { size_t i; size_t j; for (i = 0; i < def->ndisks; i++) { for (j = i + 1; j < def->ndisks; j++) { if (virDomainDiskDefCheckDuplicateInfo(def->disks[i], def->disks[j]) < 0) ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
275,403,934,539,322,400,000,000,000,000,000,000,000
15
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al) { unsigned short length; unsigned short type; unsigned short size; unsigned char *data = *p; int tlsext_servername = 0; int renegotiate_seen = 0; # ifndef OPENSSL_NO_NE...
0
[ "CWE-190" ]
openssl
6f35f6deb5ca7daebe289f86477e061ce3ee5f46
312,325,156,629,583,830,000,000,000,000,000,000,000
249
Avoid some undefined pointer arithmetic A common idiom in the codebase is: if (p + len > limit) { return; /* Too long */ } Where "p" points to some malloc'd data of SIZE bytes and limit == p + SIZE "len" here could be from some externally supplied data (e.g. from a TLS message). The rules of C pointer arithmet...
void iommu_flush_cache(const void *p, uint32_t size) { /* if vtd support page-walk coherency, no need to flush cacheline */ if (!iommu_page_walk_coherent) { flush_cache_range(p, size); } }
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
308,765,045,784,002,200,000,000,000,000,000,000,000
7
hv: validate input for dmar_free_irte function Malicious input 'index' may trigger buffer overflow on array 'irte_alloc_bitmap[]'. This patch validate that 'index' shall be less than 'CONFIG_MAX_IR_ENTRIES' and also remove unnecessary check on 'index' in 'ptirq_free_irte()' function with this fix. Tracked-On: ...
template<typename t> CImg<T>& operator/=(const t value) { if (is_empty()) return *this; cimg_openmp_for(*this,*ptr / value,32768); return *this;
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
215,531,520,757,785,500,000,000,000,000,000,000,000
5
.
static int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, const struct snd_mask *val) { int changed = _snd_pcm_hw_param_mask(params, var, val); if (changed < 0) return changed; if (params->rmask) { int err = snd_pcm_hw_refine(pcm, par...
0
[ "CWE-362" ]
linux
8423f0b6d513b259fdab9c9bf4aaa6188d054c2d
307,435,367,233,135,300,000,000,000,000,000,000,000
15
ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC There is a small race window at snd_pcm_oss_sync() that is called from OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls snd_pcm_oss_make_ready() at first, then takes the params_lock mutex for the rest. When the stream is set up again by another thread between them, ...
static void airo_end_xmit11(struct net_device *dev) { u16 status; int i; struct airo_info *priv = dev->ml_priv; struct sk_buff *skb = priv->xmit11.skb; int fid = priv->xmit11.fid; u32 *fids = priv->fids; clear_bit(JOB_XMIT11, &priv->jobs); clear_bit(FLAG_PENDING_XMIT11, &priv->flags); status = transmit_802_11...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
259,765,791,500,193,420,000,000,000,000,000,000,000
25
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int snd_interval_refine_set(struct snd_interval *i, unsigned int val) { struct snd_interval t; t.empty = 0; t.min = t.max = val; t.openmin = t.openmax = 0; t.integer = 1; return snd_interval_refine(i, &t); }
0
[ "CWE-362" ]
linux
8423f0b6d513b259fdab9c9bf4aaa6188d054c2d
229,143,966,346,837,280,000,000,000,000,000,000,000
9
ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC There is a small race window at snd_pcm_oss_sync() that is called from OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls snd_pcm_oss_make_ready() at first, then takes the params_lock mutex for the rest. When the stream is set up again by another thread between them, ...
static void io_wqe_enqueue(struct io_wqe *wqe, struct io_wq_work *work) { struct io_wqe_acct *acct = io_work_get_acct(wqe, work); unsigned work_flags = work->flags; bool do_create; /* * If io-wq is exiting for this task, or if the request has explicitly * been marked as one that should not get executed, cancel...
0
[ "CWE-200" ]
linux
713b9825a4c47897f66ad69409581e7734a8728e
323,936,841,294,863,040,000,000,000,000,000,000,000
49
io-wq: fix cancellation on create-worker failure WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1151 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1146 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 io_req_complete_post+0xf5...
static int nfs4_xattr_set_nfs4_user(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *key, const void *buf, size_t buflen, int flags) { struct nfs_access_entry cache; int ret; if (!nfs_server_capable(inode, NFS_CAP_XATTR)) return -EOPNOTSUPP; /*...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
235,688,230,574,627,230,000,000,000,000,000,000,000
37
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...
static void test_tls(void) { #if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL struct mg_tls_opts opts = {.ca = "./test/data/ss_ca.pem", .cert = "./test/data/ss_server.pem", .certkey = "./test/data/ss_server.pem"}; struct mg_mgr mgr; struct mg_connection *c; co...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
74,742,757,180,623,140,000,000,000,000,000,000,000
19
Protect against the directory traversal in mg_upload()
void getQueryStuff(const char *&query, int& ntoreturn) { int *i = (int *) (data + strlen(data) + 1); ntoreturn = *i; i++; query = (const char *) i; }
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
71,733,898,409,449,120,000,000,000,000,000,000,000
6
SERVER-7769 - turn objcheck on by default and use new fast bson validate
static int crypto_init_rng_ops(struct crypto_tfm *tfm, u32 type, u32 mask) { struct rng_alg *alg = &tfm->__crt_alg->cra_rng; struct rng_tfm *ops = &tfm->crt_rng; ops->rng_gen_random = alg->rng_make_random; ops->rng_reset = rngapi_reset; return 0; }
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
143,308,782,199,414,300,000,000,000,000,000,000,000
10
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
const string name() override { return "put_cors"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
224,989,135,327,110,000,000,000,000,000,000,000,000
1
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 ssd0323_cd(void *opaque, int n, int level) { ssd0323_state *s = (ssd0323_state *)opaque; DPRINTF("%s mode\n", level ? "Data" : "Command"); s->mode = level ? SSD0323_DATA : SSD0323_CMD; }
0
[ "CWE-119" ]
qemu
ead7a57df37d2187813a121308213f41591bd811
93,675,443,162,930,930,000,000,000,000,000,000,000
6
ssd0323: fix buffer overun on invalid state load CVE-2013-4538 s->cmd_len used as index in ssd0323_transfer() to store 32-bit field. Possible this field might then be supplied by guest to overwrite a return addr somewhere. Same for row/col fields, which are indicies into framebuffer array. To fix validate after load...
int ssl3_get_client_key_exchange(SSL *s) { int i,al,ok; long n; unsigned long alg_k; unsigned char *p; #ifndef OPENSSL_NO_RSA RSA *rsa=NULL; EVP_PKEY *pkey=NULL; #endif #ifndef OPENSSL_NO_DH BIGNUM *pub=NULL; DH *dh_srvr; #endif #ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; #endif /* OPENSSL_NO_KRB5 */ #ifndef ...
0
[ "CWE-310" ]
openssl
37580f43b5a39f5f4e920d17273fab9713d3a744
46,745,569,686,429,310,000,000,000,000,000,000,000
813
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
load_4 (FILE *fp, gint width, gint height, guchar *buffer, guint16 bytes) { gint x, y, c; guchar *line = g_new (guchar, bytes); for (y = 0; y < height; buffer += width, ++y) { for (x = 0; x < width; ++x) buffer[x] = 0; for (c = 0; c < 4; ++c...
0
[ "CWE-190" ]
gimp
a9671395f6573e90316a9d748588c5435216f6ce
204,809,779,522,435,550,000,000,000,000,000,000,000
27
PCX: Avoid allocation overflows. Multiplying gint values may overflow unless cast into a larger type.
TEST_F(ExprMatchTest, ComparisonToConstantVariableMatchesCorrectly) { setVariable("var", Value(5)); createMatcher(BSON("$expr" << BSON("$eq" << BSON_ARRAY("$a" << "$$var")))); ASSERT_TRUE(matches(BSON("a" << 5))); ASSERT_FALSE(matches(BSON("a"...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
308,669,347,317,121,460,000,000,000,000,000,000,000
10
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int del_balance_item(struct btrfs_fs_info *fs_info) { struct btrfs_root *root = fs_info->tree_root; struct btrfs_trans_handle *trans; struct btrfs_path *path; struct btrfs_key key; int ret, err; path = btrfs_alloc_path(); if (!path) return -ENOMEM; trans = btrfs_start_transaction(root, 0); if (IS_ER...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
28,402,705,060,947,490,000,000,000,000,000,000,000
38
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
njs_vm_array_prop(njs_vm_t *vm, njs_value_t *value, int64_t index, njs_opaque_value_t *retval) { njs_int_t ret; njs_array_t *array; if (njs_slow_path(!njs_is_object(value))) { njs_type_error(vm, "njs_vm_array_prop() argument is not object"); return NULL; } if (njs_fast_path...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
96,763,777,415,292,080,000,000,000,000,000,000,000
28
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
static void notify_timeout(struct tevent_context *ev, struct tevent_timer *te, struct timeval current_time, void *private_data) { struct smb2_request *req = talloc_get_type_abort( private_data, struct smb2_request); smb2_cancel(req); }
0
[ "CWE-266" ]
samba
22528b76ed6eb6251fdf01875aaa955480e7663d
270,565,097,639,441,730,000,000,000,000,000,000,000
10
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>
void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer) { unsigned ver97 = 0, offset = 0, entries, tag, type, len, save, c; unsigned i; uchar NikonKey, ci, cj, ck; unsigned serial = 0; unsigned custom_serial = 0; unsigned NikonLensDataVersion = 0; unsigned lenNikonLensData = 0; unsi...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
LibRaw
d13e8f6d1e987b7491182040a188c16a395f1d21
177,831,050,680,703,060,000,000,000,000,000,000,000
793
CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access
unix_recv_io(int argc, VALUE *argv, VALUE sock) { VALUE klass, mode; rb_io_t *fptr; struct iomsg_arg arg; struct iovec vec[2]; char buf[1]; int fd; #if FD_PASSING_BY_MSG_CONTROL union { struct cmsghdr hdr; char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8]; } cmsg; #endif rb_scan_a...
0
[ "CWE-20" ]
ruby
8794dec6a5f11adc5cdd19a5ee91ea6b0816763f
25,330,312,913,303,630,000,000,000,000,000,000,000
117
unixsocket.c: check NUL bytes * ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes. https://hackerone.com/reports/302997 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void Binary::refresh_seg_offset() { offset_seg_.clear(); for (SegmentCommand* segment : segments_) { offset_seg_[segment->file_offset()] = segment; } }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
272,452,810,864,457,000,000,000,000,000,000,000,000
6
Resolve #764
nat_conn_keys_lookup(struct hmap *nat_conn_keys, const struct conn_key *key, uint32_t basis) { struct nat_conn_key_node *nat_conn_key_node; uint32_t nat_conn_key_hash = conn_key_hash(key, basis); HMAP_FOR_EACH_WITH_HASH (nat_conn_key_node, node, nat_conn_key_hash, ...
0
[ "CWE-400" ]
ovs
35c280072c1c3ed58202745b7d27fbbd0736999b
52,468,135,760,611,625,000,000,000,000,000,000,000
15
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 int svm_create_vcpu(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm; struct page *page; struct page *msrpm_pages; struct page *hsave_page; struct page *nested_msrpm_pages; int err; BUILD_BUG_ON(offsetof(struct vcpu_svm, vcpu) != 0); svm = to_svm(vcpu); err = -ENOMEM; page = alloc_page(GFP_KERNEL_ACCOUN...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
187,993,193,902,060,300,000,000,000,000,000,000,000
69
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...