func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static __init int vmx_disabled_by_bios(void) { return !boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || !boot_cpu_has(X86_FEATURE_VMX); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
80,413,216,101,823,000,000,000,000,000,000,000,000
5
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
ext4_ext_search_left(struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t *logical, ext4_fsblk_t *phys) { struct ext4_extent_idx *ix; struct ext4_extent *ex; int depth, ee_len; BUG_ON(path == NULL); depth = path->p_depth; *phys = 0; if (depth == 0 && path->p_ext == NULL) return 0; /* usually ext...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
116,605,259,511,672,840,000,000,000,000,000,000,000
35
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
TEST(UriSuite, TestUriUserInfoHostPort23Bug3510198RelatedOne) { // Empty user info UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; int res; // 0 4 0 3 01 0 4 01 res = uriParseUriA(&stateA, "http" "://" "@" "host" "/"); ASSERT_TRUE(URI_SUCCESS == res); ASSE...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
245,829,355,703,906,000,000,000,000,000,000,000,000
19
Fix uriParse*Ex* out-of-bounds read
static void stub_timer(unsigned long data) { WARN_ON(1); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
187,583,036,716,534,130,000,000,000,000,000,000,000
4
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
u32 gf_isom_get_sync_point_count(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return 0; if (trak->Media->information->sampleTable->SyncSample) { return trak->Media->information->sampleTable->SyncSample->nb_entries; } return 0; ...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
545,234,232,922,466,700,000,000,000,000,000,000
10
fixed #1706
static int do_loopback(struct path *path, const char *old_name, int recurse) { LIST_HEAD(umount_list); struct path old_path; struct mount *mnt = NULL, *old; int err; if (!old_name || !*old_name) return -EINVAL; err = kern_path(old_name, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &old_path); if (err) return err; e...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
199,408,790,077,146,800,000,000,000,000,000,000,000
53
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
static int selinux_socket_listen(struct socket *sock, int backlog) { return sock_has_perm(sock->sk, SOCKET__LISTEN); }
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
7,134,701,723,547,158,000,000,000,000,000,000,000
4
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
GF_Box *npck_box_new() { ISOM_DECL_BOX_ALLOC(GF_NPCKBox, GF_ISOM_BOX_TYPE_NPCK); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
28,377,885,427,206,597,000,000,000,000,000,000,000
5
fixed #1587
int mesg_make_query (u_char *qname, uint16_t qtype, uint16_t qclass, uint32_t id, int rd, u_char *buf, int buflen) { char *fn = "mesg_make_query()"; u_char *ucp; int i, written_len; Mesg_Hdr *hdr; if (T.debug > 4) syslog (LOG_DEBUG, "%s: (qtype: %s, id: %d): start", fn, string_rtype (qtype), id); hd...
1
[ "CWE-330" ]
totd
afd8a10a6a21f82a70940d1b43cff48143250399
188,979,587,925,268,400,000,000,000,000,000,000,000
50
Patch provided by Gabor Lencse for generating better randomized mesg IDs.
rfbProcessClientNormalMessage(rfbClientPtr cl) { int n=0; rfbClientToServerMsg msg; char *str; int i; uint32_t enc=0; uint32_t lastPreferredEncoding = -1; char encBuf[64]; char encBuf2[64]; if ((n = rfbReadExact(cl, (char *)&msg, 1)) <= 0) { if (n != 0) rfbLogPer...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
300,301,677,235,870,000,000,000,000,000,000,000,000
622
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
R_API void r_bin_set_baddr(RBin *bin, ut64 baddr) { RBinObject *o = r_bin_cur_object (bin); binobj_set_baddr (o, baddr); // XXX - update all the infos? }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
285,977,869,512,834,530,000,000,000,000,000,000,000
5
Fix #8748 - Fix oobread on string search
GC_API void * GC_CALL GC_malloc_atomic_ignore_off_page(size_t lb) { return((void *)GC_generic_malloc_ignore_off_page(lb, PTRFREE)); }
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
267,344,377,676,232,000,000,000,000,000,000,000,000
4
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
zsetalphaisshape(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_type(*op, t_boolean); gs_setalphaisshape(igs, op->value.boolval); pop(1); return 0; }
0
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
35,562,288,107,334,746,000,000,000,000,000,000,000
10
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
static NetworkInterface* handle_null_interface(lua_State* vm) { char allowed_ifname[MAX_INTERFACE_NAME_LEN]; ntop->getTrace()->traceEvent(TRACE_INFO, "NULL interface: did you restart ntopng in the meantime?"); if(ntop->getInterfaceAllowed(vm, allowed_ifname)) { return ntop->getNetworkInterface(allowed_ifn...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
260,240,327,859,568,300,000,000,000,000,000,000,000
11
Security fix: prevents empty host from being used
static int ssl_passwd_cb(char *buf, int size, int rwflag, void *userdata) { ACCOUNT *account = (ACCOUNT*)userdata; if (mutt_account_getuser (account)) return 0; dprint (2, (debugfile, "ssl_passwd_cb: getting password for %s@%s:%u\n", account->user, account->host, account->port)); if (mutt_account_...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
232,640,254,045,549,250,000,000,000,000,000,000,000
15
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p) { struct kmem_cache_cpu *c; int i; /* memcg and kmem_cache debug support */ s = slab_pre_alloc_hook(s, flags); if (unlikely(!s)) return false; /* * Drain objects in the per cpu slab, while disabling local * IRQs, which...
1
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
124,517,195,750,956,520,000,000,000,000,000,000,000
60
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 test_ts() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[6]; MYSQL_TIME ts; MYSQL_RES *prep_res; char strts[30]; ulong length; int rc, field_count; char name; char query[MAX_TEST_QUERY_LENGTH]; const char *queries [3]= {"SELECT a, b, c FROM test_ts WHERE %c=?", ...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
69,850,087,374,890,800,000,000,000,000,000,000,000
107
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
void qpdf_set_object_stream_mode(qpdf_data qpdf, qpdf_object_stream_e mode) { QTC::TC("qpdf", "qpdf-c called qpdf_set_object_stream_mode"); qpdf->qpdf_writer->setObjectStreamMode(mode); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
213,839,327,226,694,700,000,000,000,000,000,000,000
5
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static ssize_t qcow_preadv(struct bdev *bdev, struct iovec *iov, int iovcnt, off_t offset) { uint64_t cluster_offset; uint64_t sector_index; uint64_t sector_count; uint64_t sector_num, n; ssize_t read; struct qcow_state *s = bdev->private; struct iovec _iov[iovcnt]; size_t _cnt; size_t _off = 0; size_t cou...
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
301,223,770,518,275,300,000,000,000,000,000,000,000
59
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
void cfg80211_sta_opmode_change_notify(struct net_device *dev, const u8 *mac, struct sta_opmode_info *sta_opmode, gfp_t gfp) { struct sk_buff *msg; struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); void *hdr; if (WARN_ON(!ma...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
255,396,611,251,205,020,000,000,000,000,000,000,000
53
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
static void corsair_remove(struct hid_device *dev) { k90_cleanup_macro_functions(dev); k90_cleanup_backlight(dev); hid_hw_stop(dev); }
0
[ "CWE-399", "CWE-119" ]
linux
6d104af38b570d37aa32a5803b04c354f8ed513d
252,656,821,011,667,400,000,000,000,000,000,000,000
7
HID: corsair: fix DMA buffers on stack Not all platforms support DMA to the stack, and specifically since v4.9 this is no longer supported on x86 with VMAP_STACK either. Note that the macro-mode buffer was larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stabl...
static void __io_fail_links(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; while (!list_empty(&req->link_list)) { struct io_kiocb *link = list_first_entry(&req->link_list, struct io_kiocb, link_list); list_del_init(&link->link_list); trace_io_uring_fail_link(req, link); io_cqring_fill_ev...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
333,801,506,736,109,130,000,000,000,000,000,000,000
20
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static void sctp_do_8_2_transport_strike(sctp_cmd_seq_t *commands, struct sctp_association *asoc, struct sctp_transport *transport, int is_hb) { /* The check for association's overall error counter exceeding the * threshold is done in the state function. */ /* We are here due to a timer expirati...
0
[]
linux
196d67593439b03088913227093e374235596e33
225,117,006,226,926,300,000,000,000,000,000,000,000
69
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
X509_NAME *X509_get_subject_name(const X509 *a) { return a->cert_info.subject; }
0
[ "CWE-476" ]
openssl
8130d654d1de922ea224fa18ee3bc7262edc39c0
202,691,688,698,398,660,000,000,000,000,000,000,000
4
Fix Null pointer deref in X509_issuer_and_serial_hash() The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the ...
int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans) { struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_async_commit *ac; struct btrfs_transaction *cur_trans; ac = kmalloc(sizeof(*ac), GFP_NOFS); if (!ac) return -ENOMEM; INIT_WORK(&ac->work, do_async_commit); ac->newtrans = btrfs_...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
145,435,962,710,360,150,000,000,000,000,000,000,000
45
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
WandExport void DrawAlpha(DrawingWand *wand,const double x,const double y, const PaintMethod paint_method) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); (void) MVGP...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
18,295,180,073,028,640,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/716
static inline void enable_eprom_write(pegasus_t *pegasus) { __u8 tmp; get_registers(pegasus, EthCtrl2, 1, &tmp); set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE); }
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
280,623,569,247,627,300,000,000,000,000,000,000,000
7
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
nm_utils_read_link_absolute(const char *link_file, GError **error) { char *ln, *dirname, *ln_abs; ln = g_file_read_link(link_file, error); if (!ln) return NULL; if (g_path_is_absolute(ln)) return ln; dirname = g_path_get_dirname(link_file); if (!g_path_is_absolute(dirname)) { ...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
327,964,475,373,399,780,000,000,000,000,000,000,000
26
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
irc_nick_valid (struct t_irc_channel *channel, struct t_irc_nick *nick) { struct t_irc_nick *ptr_nick; if (!channel || !nick) return 0; for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick) { if (ptr_nick == nick) return 1; } /* nick not found *...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
82,895,173,431,155,250,000,000,000,000,000,000,000
16
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
DLLEXPORT int tjDecompress(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf, int width, int pitch, int height, int pixelSize, int flags) { if (flags & TJ_YUV) return tjDecompressToYUV(handle, jpe...
0
[ "CWE-787" ]
libjpeg-turbo
3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3
265,611,439,161,511,630,000,000,000,000,000,000,000
11
tjLoadImage(): Fix int overflow/segfault w/big BMP Fixes #304
int ssl3_connect(SSL *s) { BUF_MEM *buf = NULL; unsigned long Time = (unsigned long)time(NULL); void (*cb) (const SSL *ssl, int type, int val) = NULL; int ret = -1; int new_state, state, skip = 0; RAND_add(&Time, sizeof(Time), 0); ERR_clear_error(); clear_sys_error(); if (s->info_c...
0
[ "CWE-310" ]
openssl
10a70da729948bb573d27cef4459077c49f3eb46
129,320,876,501,705,790,000,000,000,000,000,000,000
475
client: reject handshakes with DH parameters < 768 bits. Since the client has no way of communicating her supported parameter range to the server, connections to servers that choose weak DH will simply fail. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
static void MP4_FreeBox_hvcC(MP4_Box_t *p_box ) { MP4_Box_data_hvcC_t *p_hvcC = p_box->data.p_hvcC; if( p_hvcC->i_hvcC > 0 ) FREENULL( p_hvcC->p_hvcC) ; }
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
228,113,900,776,925,770,000,000,000,000,000,000,000
5
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
MD5& sslHashes::use_MD5(){ return md5HandShake_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
331,684,796,353,565,670,000,000,000,000,000,000,000
3
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void btrfs_put_transaction(struct btrfs_transaction *transaction) { WARN_ON(refcount_read(&transaction->use_count) == 0); if (refcount_dec_and_test(&transaction->use_count)) { BUG_ON(!list_empty(&transaction->list)); WARN_ON(!RB_EMPTY_ROOT( &transaction->delayed_refs.href_root.rb_root)); WARN_ON(!RB_EMPTY_R...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
85,824,400,210,390,370,000,000,000,000,000,000,000
34
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
int snd_line6_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { int ret; struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); struct line6_pcm_stream *pstr = get_stream(line6pcm, substream->stream); mutex_lock(&line6pcm->state_mutex); ret = line6_buffer_acquir...
0
[ "CWE-476" ]
linux
3450121997ce872eb7f1248417225827ea249710
264,759,564,552,193,680,000,000,000,000,000,000,000
25
ALSA: line6: Fix write on zero-sized buffer LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while the other part of the driver code writes the packet data w...
int AsyncConnection::send_message(Message *m) { FUNCTRACE(); lgeneric_subdout(async_msgr->cct, ms, 1) << "-- " << async_msgr->get_myaddr() << " --> " << get_peer_addr() << " -- " << *m << " -- " << m << " con " << m->get_connection().get() << dendl; // optimistic think it's o...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
248,026,617,585,225,580,000,000,000,000,000,000,000
71
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
void diff_debug_queue(const char *msg, struct diff_queue_struct *q) { int i; if (msg) fprintf(stderr, "%s\n", msg); fprintf(stderr, "q->nr = %d\n", q->nr); for (i = 0; i < q->nr; i++) { struct diff_filepair *p = q->queue[i]; diff_debug_filepair(p, i); } }
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
238,945,759,367,792,670,000,000,000,000,000,000,000
11
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
void crypt_set_compatibility(struct crypt_device *cd, uint32_t flags) { if (cd) cd->compatibility = flags; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
152,457,895,875,023,850,000,000,000,000,000,000,000
5
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
void ms_handle_connect(Connection *con) override { };
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
132,577,681,684,009,430,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
inline void base64Encode3to4(std::string_view data, std::string &output) { uint32_t b32 = 0; int i, j = 18; for (i = 0; i < 3; ++i) { b32 <<= 8; b32 |= CharTo8Bit(data[i]); } for (i = 0; i < 4; ++i) { output += base[(uint32_t)((b32 >> j) & 0x3F)]; j -= 6; } }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
202,903,216,359,076,700,000,000,000,000,000,000,000
14
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
utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { const UChar* p = *pp; (*pp) += 4; if (*(p+2) == 0 && *(p+1) == 0 && *p == 0) { int c, v; p += 3; if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { return TRUE; } c = *p; v...
0
[ "CWE-125" ]
php-src
b6fe458ef9ac1372b60c3d3810b0358e2e20840d
69,892,394,638,439,720,000,000,000,000,000,000,000
29
Fix bug #77418 - Heap overflow in utf32be_mbc_to_code (cherry picked from commit aeec40cb50eca6a97975765e2bacc28a5950cfa9)
int __init sysenter_setup(void) { syscall_page = (void *)get_zeroed_page(GFP_ATOMIC); #ifdef CONFIG_COMPAT_VDSO __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); #endif if (!boot_cpu_has(X86_FEATURE_SEP)) { memcpy(syscall_page, ...
1
[ "CWE-264" ]
linux-2.6
7d91d531900bfa1165d445390b3b13a8013f98f7
304,618,310,520,352,100,000,000,000,000,000,000,000
22
[PATCH] i386 vDSO: use install_special_mapping This patch uses install_special_mapping for the i386 vDSO setup, consolidating duplicated code. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> C...
string expectedResult() { return string("\0AB", 3); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
159,988,978,067,753,160,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
X509Certificate::X509CertificateTransferData::Deserialize( Environment* env, Local<Context> context, std::unique_ptr<worker::TransferData> self) { if (context != env->context()) { THROW_ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE(env); return {}; } Local<Value> handle; if (!X509Certificate::New(...
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
173,481,428,283,399,080,000,000,000,000,000,000,000
16
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
static void tg3_read_otp_ver(struct tg3 *tp) { u32 val, val2; if (tg3_asic_rev(tp) != ASIC_REV_5762) return; if (!tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0, &val) && !tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0 + 4, &val2) && TG3_OTP_MAGIC0_VALID(val)) { u64 val64 = (u64) val << 32 | val2; u32 ver = 0; ...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
255,737,391,273,932,970,000,000,000,000,000,000,000
24
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
int ssh_buffer_reinit(struct ssh_buffer_struct *buffer) { if (buffer == NULL) { return -1; } buffer_verify(buffer); if (buffer->secure && buffer->allocated > 0) { explicit_bzero(buffer->data, buffer->allocated); } buffer->used = 0; buffer->pos = 0; /* If the buffer is ...
0
[ "CWE-476" ]
libssh-mirror
10b3ebbe61a7031a3dae97f05834442220447181
134,838,858,705,807,400,000,000,000,000,000,000,000
29
buffer: Reformat ssh_buffer_add_data() Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
static struct sctp_ulpevent *sctp_make_reassembled_event(struct sk_buff_head *queue, struct sk_buff *f_frag, struct sk_buff *l_frag) { struct sk_buff *pos; struct sctp_ulpevent *event; struct sk_buff *pnext, *last; struct sk_buff *list = skb_shinfo(f_frag)->frag_list; /* Store the pointer to the 2nd skb */ if (f...
1
[]
linux-2.6
672e7cca17ed6036a1756ed34cf20dbd72d5e5f6
287,117,608,284,269,740,000,000,000,000,000,000,000
49
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA. There is a rare situation that causes lksctp to go into infinite recursion and crash the system. The trigger is a packet that contains at least the first two DATA fragments of a message bundled together. The recursion is triggered when the user d...
alloc_clear_id(size_t size, alloc_id_T id UNUSED) { #ifdef FEAT_EVAL if (alloc_fail_id == id && alloc_does_fail(size)) return NULL; #endif return alloc_clear(size); }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
102,476,859,141,161,700,000,000,000,000,000,000,000
8
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
void mingw_startup(void) { int i, maxlen, argc; char *buffer; wchar_t **wenv, **wargv; _startupinfo si; /* get wide char arguments and environment */ si.newmode = 0; if (__wgetmainargs(&argc, &wargv, &wenv, _CRT_glob, &si) < 0) die_startup(); /* determine size of argv and environ conversion buffer */ maxle...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
319,979,749,339,458,340,000,000,000,000,000,000,000
59
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
Field *Field_bit::new_key_field(MEM_ROOT *root, TABLE *new_table, uchar *new_ptr, uint32 length, uchar *new_null_ptr, uint new_null_bit) { Field_bit *res; if ((res= (Field_bit*) Field::new_key_field(root, new_table, new_ptr, length, ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
135,675,982,109,438,070,000,000,000,000,000,000,000
16
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...
static int iwl_fw_txf_len(struct iwl_fw_runtime *fwrt, struct iwl_fwrt_shared_mem_cfg *mem_cfg) { size_t hdr_len = sizeof(struct iwl_fw_error_dump_data) + sizeof(struct iwl_fw_error_dump_fifo); u32 fifo_len = 0; int i; if (!iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_TXF)) goto dump_internal_txf; /* Co...
0
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
35,513,939,849,712,790,000,000,000,000,000,000,000
35
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
int tls1_set_server_sigalgs(SSL *s) { int al; size_t i; /* Clear any shared sigtnature algorithms */ if (s->cert->shared_sigalgs) { OPENSSL_free(s->cert->shared_sigalgs); s->cert->shared_sigalgs = NULL; } /* Clear certificate digests and validity flags */ for (i = 0; i < SSL_...
1
[]
openssl
76343947ada960b6269090638f5391068daee88d
852,727,070,496,221,600,000,000,000,000,000,000
36
Fix for CVE-2015-0291 If a client renegotiates using an invalid signature algorithms extension it will crash a server with a NULL pointer dereference. Thanks to David Ramos of Stanford University for reporting this bug. CVE-2015-0291 Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: ssl/t1_lib.c
static unsigned virq_from_irq(unsigned irq) { struct irq_info *info = info_for_irq(irq); BUG_ON(info == NULL); BUG_ON(info->type != IRQT_VIRQ); return info->u.virq; }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
192,854,227,310,103,300,000,000,000,000,000,000,000
9
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
inline bool WireFormatLite::ReadRepeatedPrimitive( int, // tag_size, unused. uint32_t tag, io::CodedInputStream* input, RepeatedField<CType>* values) { CType value; if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false; values->Add(value); int elements_already_reserved = values->Capacity...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
16,486,268,237,104,419,000,000,000,000,000,000,000
14
Apply patch
uint32_t ProtocolV2::get_onwire_size(const uint32_t logical_size) const { if (session_stream_handlers.rx) { return segment_onwire_size(logical_size); } else { return logical_size; } }
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
136,684,594,334,222,820,000,000,000,000,000,000,000
7
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
static int SetReqAttrib(byte* output, char* pw, int pwPrintableString, int extSz) { const byte erOid[] = { ASN_OBJECT_ID, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x0e }; int sz = 0; /* overall size */ int cpSz = 0; /* Challenge ...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
224,583,827,246,133,320,000,000,000,000,000,000,000
76
OCSP: improve handling of OCSP no check extension
isdn_net_force_hangup(char *name) { isdn_net_dev *p = isdn_net_findif(name); struct net_device *q; if (p) { if (p->local->isdn_device < 0) return 1; q = p->local->slave; /* If this interface has slaves, do a hangup for them also. */ while (q) { isdn_net_hangup(q); q = (((isdn_net_local *) q->priv)-...
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
174,753,662,146,544,470,000,000,000,000,000,000,000
19
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
MagickPrivate double GetResizeFilterWindowSupport( const ResizeFilter *resize_filter) { assert(resize_filter != (ResizeFilter *) NULL); assert(resize_filter->signature == MagickCoreSignature); return(resize_filter->window_support); }
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
164,404,039,657,329,080,000,000,000,000,000,000,000
7
https://github.com/ImageMagick/ImageMagick/issues/717
vmw_user_surface_base_to_res(struct ttm_base_object *base) { return &(container_of(base, struct vmw_user_surface, prime.base)->srf.res); }
0
[ "CWE-20" ]
linux
ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf
328,180,809,027,078,020,000,000,000,000,000,000,000
5
drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is a user-controlled 'uint32_t' value which is used as a loop count limit. This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'. References: https://bugzill...
static struct input_device *input_device_new(struct btd_service *service) { struct btd_device *device = btd_service_get_device(service); struct btd_profile *p = btd_service_get_profile(service); const char *path = device_get_path(device); const sdp_record_t *rec = btd_device_get_record(device, p->remote_uuid); str...
0
[]
bluez
3cccdbab2324086588df4ccf5f892fb3ce1f1787
185,962,189,663,642,170,000,000,000,000,000,000,000
26
HID accepts bonded device connections only. This change adds a configuration for platforms to choose a more secure posture for the HID profile. While some older mice are known to not support pairing or encryption, some platform may choose a more secure posture by requiring the device to be bonded and require the con...
static int imap_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags) { if (!m || !m->account) return -1; /* in APPEND mode, we appear to hijack an existing IMAP connection - * ctx is brand new and mostly empty */ struct ImapAccountData *adata = imap_adata_get(m); struct ImapMboxData *mdata = imap...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
236,214,489,535,406,820,000,000,000,000,000,000,000
26
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
local void fill_window(s) deflate_state *s; { unsigned n; unsigned more; /* Amount of free space at the end of the window. */ uInt wsize = s->w_size; Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); do { more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->s...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
273,267,894,767,552,230,000,000,000,000,000,000,000
120
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...
SecureElementStatus_t SecureElementRandomNumber( uint32_t* randomNum ) { if( randomNum == NULL ) { return SECURE_ELEMENT_ERROR_NPE; } *randomNum = SoftSeHalGetRandomNumber( ); return SECURE_ELEMENT_SUCCESS; }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
51,378,493,125,750,230,000,000,000,000,000,000,000
9
Added received buffer size checks.
static void oz_hcd_clear_orphanage(struct oz_hcd *ozhcd, int status) { if (ozhcd) { struct oz_urb_link *urbl, *n; list_for_each_entry_safe(urbl, n, &ozhcd->orphanage, link) { list_del(&urbl->link); oz_complete_urb(ozhcd->hcd, urbl->urb, status); oz_free_urb_link(urbl); } } }
0
[ "CWE-703", "CWE-189" ]
linux
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
124,029,465,584,536,600,000,000,000,000,000,000,000
12
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentiall...
void topology_set_thermal_pressure(const struct cpumask *cpus, unsigned long th_pressure) { int cpu; for_each_cpu(cpu, cpus) WRITE_ONCE(per_cpu(thermal_pressure, cpu), th_pressure); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
268,566,893,496,510,670,000,000,000,000,000,000,000
8
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...
void *genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, const struct genl_family *family, int flags, u8 cmd) { struct nlmsghdr *nlh; struct genlmsghdr *hdr; nlh = nlmsg_put(skb, portid, seq, family->id, GENL_HDRLEN + family->hdrsize, flags); if (nlh == NULL) return NULL; hdr = nlmsg_data(nlh); hdr-...
0
[ "CWE-399", "CWE-401" ]
linux
ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2
51,053,124,899,783,490,000,000,000,000,000,000,000
18
genetlink: Fix a memory leak on error path In genl_register_family(), when idr_alloc() fails, we forget to free the memory we possibly allocate for family->attrbuf. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") Signed-off-by: YueHaibing <yuehaibing@huawei.com...
static int _assign_xshm(Display *dpy, XErrorEvent *error) { cimg::unused(dpy,error); cimg::X11_attr().is_shm_enabled = false; return 0;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
126,894,120,012,542,270,000,000,000,000,000,000,000
5
Fix other issues in 'CImg<T>::load_bmp()'.
void MonClient::handle_config(MConfig *m) { ldout(cct,10) << __func__ << " " << *m << dendl; finisher.queue(new LambdaContext([this, m](int r) { cct->_conf.set_mon_vals(cct, m->config, config_cb); if (config_notify_cb) { config_notify_cb(); } m->put(); })); got_config = true; map_cond.notify_all();...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
53,731,759,576,434,030,000,000,000,000,000,000,000
13
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
GF_Err adaf_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_AdobeDRMAUFormatBox *ptr = (GF_AdobeDRMAUFormatBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u8(bs, ptr->selective_enc); gf_bs_write_u8(bs, 0x0); gf_bs_write_u8(bs, ptr->IV_length); retur...
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
155,156,898,561,937,200,000,000,000,000,000,000,000
13
fixed #1879
static bool mg_sock_would_block(void) { int err = MG_SOCK_ERRNO; return err == EINPROGRESS || err == EWOULDBLOCK #ifndef WINCE || err == EAGAIN || err == EINTR #endif #if defined(_WIN32) && MG_ENABLE_WINSOCK || err == WSAEINTR || err == WSAEWOULDBLOCK #endif ; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
206,569,166,467,228,260,000,000,000,000,000,000,000
11
Protect against the directory traversal in mg_upload()
static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time) { PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); if (!qemu_spice_display_is_running(&qxl->ssd)) { return; } trace_qxl_interface_set_mm_time(qxl->id, mm_time); qxl->shadow_rom.mm_clock = cpu_to_le32(mm_time...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
320,971,296,585,096,780,000,000,000,000,000,000,000
13
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
227,168,183,763,719,300,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int check_packet_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed) { struct bpf_reg_state *regs = cur_regs(env); struct bpf_reg_state *reg = &regs[regno]; int err; /* We may have added a variable offset to the packet pointer; but any * reg->range we have ...
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
97,289,006,539,524,080,000,000,000,000,000,000,000
38
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...
int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) { unsigned int i, j; if (mask > 10) return 1; for (i = 0; i < mask; i++) { j = i / 2; if ((i % 2) != 0) { if ((addr1->rose_addr[j] & 0x0F) != (addr2->rose_addr[j] & 0x0F)) return 1; } else { if ((addr1->rose_addr[j] & 0x...
0
[ "CWE-200" ]
linux-2.6
17ac2e9c58b69a1e25460a568eae1b0dc0188c25
249,174,581,242,216,770,000,000,000,000,000,000,000
21
rose: Fix rose_getname() leak rose_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bool AOClient::checkEvidenceAccess(AreaData *area) { switch(area->eviMod()) { case AreaData::EvidenceMod::FFA: return true; case AreaData::EvidenceMod::CM: case AreaData::EvidenceMod::HIDDEN_CM: return checkAuth(ACLFlags.value("CM")); case AreaData::EvidenceMod::MOD: return a...
0
[ "CWE-703", "CWE-129" ]
akashi
5566cdfedddef1f219aee33477d9c9690bf2f78b
312,630,285,928,534,070,000,000,000,000,000,000,000
14
Fix out of bounds crash on evidence
GF_Err stsd_box_read(GF_Box *s, GF_BitStream *bs) { ISOM_DECREASE_SIZE(s, 4) gf_bs_read_u32(bs); return gf_isom_box_array_read_ex(s, bs, stsd_on_child_box, GF_ISOM_BOX_TYPE_STSD); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
149,310,596,729,448,550,000,000,000,000,000,000,000
7
fixed #1587
SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username) { SRP_user_pwd *user; unsigned char digv[SHA_DIGEST_LENGTH]; unsigned char digs[SHA_DIGEST_LENGTH]; EVP_MD_CTX *ctxt = NULL; if (vb == NULL) return NULL; if ((user = find_user(vb, username)) != NULL) return srp...
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
149,815,838,827,035,420,000,000,000,000,000,000,000
46
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
int regulator_enable(struct regulator *regulator) { struct regulator_dev *rdev = regulator->rdev; int ret = 0; if (regulator->always_on) return 0; if (rdev->supply) { ret = regulator_enable(rdev->supply); if (ret != 0) return ret; } mutex_lock(&rdev->mutex); ret = _regulator_enable(rdev); mutex_unlo...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
86,565,820,226,533,060,000,000,000,000,000,000,000
23
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, struct nfs_open_context *ctx, struct nfs4_lock_state *lsp) { struct nfs4_lockdata *p; struct inode *inode = lsp->ls_state->inode; struct nfs_server *server = NFS_SERVER(inode); p = kzalloc(sizeof(*p), GFP_KERNEL); if (p == NULL) return NUL...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
67,316,169,948,848,040,000,000,000,000,000,000,000
34
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static krb5_tl_data *dup_tl_data(krb5_tl_data *tl) { krb5_tl_data *n; n = (krb5_tl_data *) malloc(sizeof(krb5_tl_data)); if (n == NULL) return NULL; n->tl_data_contents = malloc(tl->tl_data_length); if (n->tl_data_contents == NULL) { free(n); return NULL; } memcpy(n-...
0
[ "CWE-703" ]
krb5
c5be6209311d4a8f10fda37d0d3f876c1b33b77b
282,873,506,446,365,240,000,000,000,000,000,000,000
18
Null pointer deref in kadmind [CVE-2012-1013] The fix for #6626 could cause kadmind to dereference a null pointer if a create-principal request contains no password but does contain the KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix name"). Only clients authorized to create principals can trigger ...
rsock_init_unixsocket(void) { #ifdef HAVE_SYS_UN_H /* * Document-class: UNIXSocket < BasicSocket * * UNIXSocket represents a UNIX domain stream client socket. */ rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket); rb_define_method(rb_cUNIXSocket, "initialize", unix_init, 1);...
0
[ "CWE-20" ]
ruby
8794dec6a5f11adc5cdd19a5ee91ea6b0816763f
334,363,784,335,377,800,000,000,000,000,000,000,000
20
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
static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_siz_t *siz = &ms->parms.siz; int compno; int tileno; jpc_dec_tile_t *tile; jpc_dec_tcomp_t *tcomp; int htileno; int vtileno; jpc_dec_cmpt_t *cmpt; size_t size; dec->xstart = siz->xoff; dec->ystart = siz->yoff; dec->xend = siz->width; dec->...
0
[ "CWE-20", "CWE-399" ]
jasper
ba2b9d000660313af7b692542afbd374c5685865
67,536,564,840,354,760,000,000,000,000,000,000,000
104
Ensure that not all tiles lie outside the image area.
static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void *yyscanner, HEX_LEX_ENVIRONMENT *lex_env) { unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The s...
0
[ "CWE-674", "CWE-787" ]
yara
10e8bd3071677dd1fa76beeef4bc2fc427cea5e7
6,727,116,766,566,016,000,000,000,000,000,000,000
18
Fix issue #674 for hex strings.
static GF_Err gf_isom_check_mvc(GF_ISOFile *the_file, GF_TrackBox *trak, GF_MPEGVisualSampleEntryBox *entry) { u32 i; GF_Box *mvci; GF_MultiviewGroupBox *mvcg; GF_ViewIdentifierBox *vwid; if (entry->mvc_config) {} else if (entry->avc_config && entry->avc_config->config && entry->avc_config->config->sequenceParam...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
55,282,365,399,051,010,000,000,000,000,000,000,000
62
fixed #1785 (fuzz)
TEST(RoleGraphTest, AddRoleFromDocumentWithRestricitonMerge) { const BSONArray roleARestrictions = BSON_ARRAY(BSON("clientSource" << BSON_ARRAY("::1/128"))); const BSONArray roleBRestrictions = BSON_ARRAY(BSON("serverAddress" << BSON_ARRAY("127.0.0.1/8"))); RoleGraph graph; ASSERT_OK(graph.addR...
0
[ "CWE-863" ]
mongo
fb87cc88ecb5d300f14cda7bc238d7d5132118f5
10,862,676,005,022,104,000,000,000,000,000,000,000
41
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
static Value make(const T &value) { #ifdef __clang__ Value result = MakeValue<Formatter>(value); // Workaround a bug in Apple LLVM version 4.2 (clang-425.0.28) of clang: // https://github.com/fmtlib/fmt/issues/276 (void)result.custom.format; return result; #else return MakeValue<Formatter>(val...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
93,471,850,034,553,520,000,000,000,000,000,000,000
11
Fix segfault on complex pointer formatting (#642)
static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp) { int result; START_PROFILE(syscall_close); result = fd_close_posix(fsp); END_PROFILE(syscall_close); return result; }
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
160,131,800,265,065,110,000,000,000,000,000,000,000
9
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
mysql_getopt_value(const char *keyname, uint key_length, const struct my_option *option, int *error) { if (error) *error= 0; switch (option->id) { case OPT_KEY_BUFFER_SIZE: case OPT_KEY_CACHE_BLOCK_SIZE: case OPT_KEY_CACHE_DIVISION_LIMIT: case OPT_KEY_CACHE_AGE_THRESHOLD: case OPT_KEY_CACHE_PARTI...
0
[ "CWE-362" ]
server
347eeefbfc658c8531878218487d729f4e020805
147,811,675,341,782,560,000,000,000,000,000,000,000
35
don't use my_copystat in the server it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
uint64_t address_space_ldq(AddressSpace *as, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { return address_space_ldq_internal(as, addr, attrs, result, DEVICE_NATIVE_ENDIAN); }
0
[]
qemu
e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83
267,459,853,572,134,740,000,000,000,000,000,000,000
6
exec: clamp accesses against the MemoryRegionSection Because the clamping was done against the MemoryRegion, address_space_rw was effectively broken if a write spanned multiple sections that are not linear in underlying memory (with the memory not being under an IOMMU). This is visible with the MIPS rc4030 IOMMU, whi...
static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) { void *ret; ret = svcxdr_tmpalloc(argp, nbytes); if (!ret) return NULL; memcpy(ret, p, nbytes); return ret; }
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
12,672,629,511,864,062,000,000,000,000,000,000,000
10
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
DLLIMPORT cfg_value_t *cfg_setopt(cfg_t *cfg, cfg_opt_t *opt, const char *value) { cfg_value_t *val = NULL; const char *s; char *endptr; long int i; double f; void *p; int b; if (!cfg || !opt) { errno = EINVAL; return NULL; } if (opt->simple_value.ptr) { if (opt->type == CFGT_SEC) { errno = EINVAL;...
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
41,006,029,488,040,584,000,000,000,000,000,000,000
247
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
long dtls1_default_timeout(void) { /* * 2 hours, the 24 hours mentioned in the DTLSv1 spec is way too long for * http, the cache would over fill */ return (60 * 60 * 2); }
0
[]
openssl
819418110b6fff4a7b96f01a5d68f71df3e3b736
201,929,948,417,343,100,000,000,000,000,000,000,000
8
Fix Seg fault in DTLSv1_listen The DTLSv1_listen function is intended to be stateless and processes the initial ClientHello from many peers. It is common for user code to loop over the call to DTLSv1_listen until a valid ClientHello is received with an associated cookie. A defect in the implementation of DTLSv1_listen...
get_keygrip (int pubkey_algo, const char *curve, gcry_mpi_t *pkey, unsigned char *grip) { gpg_error_t err; gcry_sexp_t s_pkey = NULL; switch (pubkey_algo) { case GCRY_PK_DSA: err = gcry_sexp_build (&s_pkey, NULL, "(public-key(dsa(p%m)(q%m)(g%m)(y%m)))", ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
65,161,869,208,081,990,000,000,000,000,000,000,000
49
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static unsigned char convert_num_notes_to_fanout(uintmax_t num_notes) { unsigned char fanout = 0; while ((num_notes >>= 8)) fanout++; return fanout; }
0
[]
git
68061e3470210703cb15594194718d35094afdc0
177,869,693,306,201,060,000,000,000,000,000,000,000
7
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
void InstanceKlass::purge_previous_version_list() { assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); assert(has_been_redefined(), "Should only be called for main class"); // Quick exit. if (previous_versions() == NULL) { return; } // This klass has previous versions so see ...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
43,675,006,754,265,100,000,000,000,000,000,000,000
69
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static VALUE cState_initialize(int argc, VALUE *argv, VALUE self) { VALUE opts; GET_STATE(self); state->max_nesting = 100; state->buffer_initial_length = FBUFFER_INITIAL_LENGTH_DEFAULT; rb_scan_args(argc, argv, "01", &opts); if (!NIL_P(opts)) cState_configure(self, opts); return self; }
0
[ "CWE-119", "CWE-787" ]
json
8f782fd8e181d9cfe9387ded43a5ca9692266b85
33,301,476,397,015,310,000,000,000,000,000,000,000
10
Fix arbitrary heap exposure problem
void sctp_packet_free(struct sctp_packet *packet) { struct sctp_chunk *chunk, *tmp; SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet); list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { list_del_init(&chunk->list); sctp_chunk_free(chunk); } if (packet->malloced) kfree(packet); }
0
[]
linux
196d67593439b03088913227093e374235596e33
281,072,648,790,618,220,000,000,000,000,000,000,000
14
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
static bool kvm_vcpu_write_protect_gfn(struct kvm_vcpu *vcpu, u64 gfn) { struct kvm_memory_slot *slot; slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn); return kvm_mmu_slot_gfn_write_protect(vcpu->kvm, slot, gfn, PG_LEVEL_4K); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
45,496,953,058,833,130,000,000,000,000,000,000,000
7
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
if_command() { if_else_command(IF_INITIAL); return; }
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
171,826,649,113,606,440,000,000,000,000,000,000,000
5
successive failures of "set print <foo>" could cause double-free Bug #2312
privsep_read_loop(void) { struct privsep_command cmd; int ret; while (1) { ret = readn(pfd, &cmd, sizeof(cmd)); if (ret <= 0) { /* Error or EOF, give up */ if (ret < 0) { flog(LOG_ERR, "Exiting, privsep_read_loop had readn error: %s\n", strerror(errno)); } else { flog(LOG_ERR, "Exiting...
0
[ "CWE-20" ]
radvd
074816cd0b37aac7b3209987e6e998f0a847b275
262,336,770,397,884,330,000,000,000,000,000,000,000
71
privsep_read_loop() should return on unprivileged daemon death / socket close(), not loop forever with polling read() getting -1.