func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline bool vruntime_normalized(struct task_struct *p) { struct sched_entity *se = &p->se; /* * In both the TASK_ON_RQ_QUEUED and TASK_ON_RQ_MIGRATING cases, * the dequeue_entity(.flags=0) will already have normalized the * vruntime. */ if (p->on_rq) return true; /* * When !on_rq, vruntime of t...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
276,089,881,378,725,120,000,000,000,000,000,000,000
27
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
dns_setserver(u8_t numdns, ip_addr_t *dnsserver) { if ((numdns < DNS_MAX_SERVERS) && (dns_pcb != NULL) && (dnsserver != NULL) && !ip_addr_isany(dnsserver)) { dns_servers[numdns] = (*dnsserver); } }
1
[]
lwip
9fb46e120655ac481b2af8f865d5ae56c39b831a
107,461,629,748,680,880,000,000,000,000,000,000,000
7
added source port randomization to make the DNS client more robust (see bug #43144)
static void SFDDumpImagePNG(FILE *sfd,ImageList *img) { struct enc85 enc = {0}; char* pngbuf; size_t pnglen, i; if (!GImageWritePngBuf(img->image, &pngbuf, &pnglen, 1, false)) { IError("Failed to serialise PNG image"); return; } fprintf(sfd, "Image2: image/png %d %g %g %g %g\n"...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
230,250,370,661,342,200,000,000,000,000,000,000,000
22
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
TEST(ArrayOpsTest, ShapeN_ShapeFn) { ShapeInferenceTestOp op("ShapeN"); int n = 3; std::vector<NodeDefBuilder::NodeOut> src_list; src_list.reserve(n); for (int i = 0; i < n; ++i) src_list.emplace_back("a", 0, DT_FLOAT); TF_ASSERT_OK(NodeDefBuilder("test", "ShapeN") .Input(src_list) ...
0
[ "CWE-125" ]
tensorflow
7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d
48,903,221,129,832,590,000,000,000,000,000,000,000
14
Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute. PiperOrigin-RevId: 402446942 Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9
wholenum_p(VALUE x) { if (FIXNUM_P(x)) return 1; switch (TYPE(x)) { case T_BIGNUM: return 1; case T_FLOAT: { double d = RFLOAT_VALUE(x); return round(d) == d; } break; case T_RATIONAL: { VALUE den = rb_rational_den(x); return FIXNUM_P(den) && FIX2LONG(den) == 1; } b...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
290,905,357,057,194,700,000,000,000,000,000,000,000
22
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
xfs_dentry_mode_to_name( struct xfs_name *namep, struct dentry *dentry, int mode) { namep->name = dentry->d_name.name; namep->len = dentry->d_name.len; namep->type = xfs_mode_to_ftype(mode); if (unlikely(namep->type == XFS_DIR3_FT_UNKNOWN)) return -EFSCORRUPTED; return 0; }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
1fb254aa983bf190cfd685d40c64a480a9bafaee
247,559,387,158,639,800,000,000,000,000,000,000,000
14
xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT Benjamin Moody reported to Debian that XFS partially wedges when a chgrp fails on account of being out of disk quota. I ran his reproducer script: # adduser dummy # adduser dummy plugdev # dd if=/dev/zero bs=1M count=100 of=test.img # mkfs.x...
isdn_ioctl(struct file *file, uint cmd, ulong arg) { uint minor = iminor(file_inode(file)); isdn_ctrl c; int drvidx; int ret; int i; char __user *p; char *s; union iocpar { char name[10]; char bname[22]; isdn_ioctl_struct iocts; isdn_net_ioctl_phone phone; isdn_net_ioctl_cfg cfg; } iocpar; void __us...
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
330,859,462,946,380,870,000,000,000,000,000,000,000
426
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
imapx_server_stash_command_arguments (CamelIMAPXServer *is) { GString *buffer; /* Stash some reusable capability-based command arguments. */ buffer = g_string_new ("MESSAGES UNSEEN UIDVALIDITY UIDNEXT"); if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, CONDSTORE)) g_string_append (buffer, " HIGHESTMODSEQ"); g...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
237,867,235,995,833,360,000,000,000,000,000,000,000
26
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
copyParsedURL(ParsedURL *p, const ParsedURL *q) { if (q == NULL) { memset(p, 0, sizeof(ParsedURL)); p->scheme = SCM_UNKNOWN; return; } p->scheme = q->scheme; p->port = q->port; p->is_nocache = q->is_nocache; p->user = ALLOC_STR(q->user); p->pass = ALLOC_STR(q->pass); p->host = ALLOC_S...
0
[ "CWE-119" ]
w3m
ba9d78faeba9024c3e8840579c3b0e959ae2cb0f
258,023,402,580,701,840,000,000,000,000,000,000,000
18
Prevent global-buffer-overflow in parseURL() Bug-Debian: https://github.com/tats/w3m/issues/41
free_devinfo(void *private) { struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private; if (dp->timer) snd_seq_oss_timer_delete(dp->timer); if (dp->writeq) snd_seq_oss_writeq_delete(dp->writeq); if (dp->readq) snd_seq_oss_readq_delete(dp->readq); kfree(dp); }
0
[ "CWE-415" ]
linux-2.6
27f7ad53829f79e799a253285318bff79ece15bd
72,511,517,562,829,270,000,000,000,000,000,000,000
15
ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open() The error handling in snd_seq_oss_open() has several bad codes that do dereferecing released pointers and double-free of kmalloc'ed data. The object dp is release in free_devinfo() that is called via private_free callback. The rest shouldn't touch th...
static size_t CompressAlpha(const size_t min, const size_t max, const size_t steps, const ssize_t *alphas, unsigned char* indices) { unsigned char codes[8]; register ssize_t i; size_t error, index, j, least, value; codes[0] = (unsigned char) min; codes[1] = (unsigned char) max...
0
[ "CWE-20", "CWE-617" ]
ImageMagick
0c5b1e430a83ef793a7334bbbee408cf3c628699
225,163,220,137,817,650,000,000,000,000,000,000,000
57
Added check to prevent image being 0x0 (reported in #489).
int usbip_recv_iso(struct usbip_device *ud, struct urb *urb) { void *buff; struct usbip_iso_packet_descriptor *iso; int np = urb->number_of_packets; int size = np * sizeof(*iso); int i; int ret; int total_length = 0; if (!usb_pipeisoc(urb->pipe)) return 0; /* my Bluetooth dongle gets ISO URBs which are np ...
0
[ "CWE-200", "CWE-119" ]
linux
b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb
100,698,208,261,286,040,000,000,000,000,000,000,000
59
USB: usbip: fix potential out-of-bounds write Fix potential out-of-bounds write to urb->transfer_buffer usbip handles network communication directly in the kernel. When receiving a packet from its peer, usbip code parses headers according to protocol. As part of this parsing urb->actual_length is filled. Since the inp...
AirPDcapRecurseCleanSA( PAIRPDCAP_SEC_ASSOCIATION sa) { if (sa->next != NULL) { AirPDcapRecurseCleanSA(sa->next); g_free(sa->next); sa->next = NULL; } }
0
[ "CWE-20" ]
wireshark
9b0b20b8d5f8c9f7839d58ff6c5900f7e19283b4
314,041,255,703,561,840,000,000,000,000,000,000,000
9
Make sure EAPOL body is big enough for a EAPOL_RSN_KEY. A pointer to a EAPOL_RSN_KEY is set on the packet presuming the whole EAPOL_RSN_KEY is there. That's not always the case for fuzzed/malicious captures. Bug: 11585 Change-Id: Ib94b8aceef444c7820e43b969596efdb8dbecccd Reviewed-on: https://code.wireshark.org/revie...
void SimpleMessenger::reaper() { ldout(cct,10) << "reaper" << dendl; assert(lock.is_locked()); while (!pipe_reap_queue.empty()) { Pipe *p = pipe_reap_queue.front(); pipe_reap_queue.pop_front(); ldout(cct,10) << "reaper reaping pipe " << p << " " << p->get_peer_addr() << dendl; p->pipe_lock....
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
294,051,835,200,527,460,000,000,000,000,000,000,000
39
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 ...
virSecuritySELinuxDriverClose(virSecurityManager *mgr) { virSecuritySELinuxData *data = virSecurityManagerGetPrivateData(mgr); if (!data) return 0; if (data->label_handle) selabel_close(data->label_handle); virHashFree(data->mcs); VIR_FREE(data->domain_context); VIR_FREE(data...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
274,113,891,752,489,740,000,000,000,000,000,000,000
19
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
static int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) { u64 xcr0 = xcr; u64 old_xcr0 = vcpu->arch.xcr0; u64 valid_bits; /* Only support XCR_XFEATURE_ENABLED_MASK(xcr0) now */ if (index != XCR_XFEATURE_ENABLED_MASK) return 1; if (!(xcr0 & XFEATURE_MASK_FP)) return 1; if ((xcr0 & XFEATURE_MASK_...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
290,377,157,004,782,500,000,000,000,000,000,000,000
40
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
int socket_check_fd(int fd, fd_mode fdm, unsigned int timeout) { fd_set fds; int sret; int eagain; struct timeval to; struct timeval *pto; if (fd <= 0) { if (verbose >= 2) fprintf(stderr, "ERROR: invalid fd in check_fd %d\n", fd); return -1; } FD_ZERO(&fds); FD_SET(fd, &fds); if (timeout > 0) { to...
0
[ "CWE-284" ]
libimobiledevice
df1f5c4d70d0c19ad40072f5246ca457e7f9849e
298,266,410,013,011,970,000,000,000,000,000,000,000
66
common: [security fix] Make sure sockets only listen locally
bool close_cached_connection_tables(THD *thd, LEX_CSTRING *connection) { close_cached_connection_tables_arg argument; DBUG_ENTER("close_cached_connections"); DBUG_ASSERT(thd); argument.thd= thd; argument.connection= connection; argument.tables= NULL; if (tdc_iterate(thd, (my_hash_walk_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
304,622,961,091,995,370,000,000,000,000,000,000,000
19
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *ift) { struct inet6_dev *idev = ifp->idev; struct in6_addr addr, *tmpaddr; unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_tstamp, age; unsigned long regen_advance; int tmp_plen; int ret = 0; int max_addresses; u32 addr_flags; un...
1
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
252,285,772,680,143,360,000,000,000,000,000,000,000
106
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
void HGraphBuilder::VisitBitNot(UnaryOperation* expr) { CHECK_ALIVE(VisitForValue(expr->expression())); HValue* value = Pop(); TypeInfo info = oracle()->UnaryType(expr); if (info.IsUninitialized()) { AddInstruction(new(zone()) HSoftDeoptimize); current_block()->MarkAsDeoptimizing(); } HInstruction* ...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
213,621,352,830,761,200,000,000,000,000,000,000,000
11
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 int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe *sqe, struct io_submit_state *state) { unsigned int sqe_flags; int id; req->opcode = READ_ONCE(sqe->opcode); req->user_data = READ_ONCE(sqe->user_data); req->io = NULL; req->file = NULL; req->ctx = ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
152,239,637,737,740,940,000,000,000,000,000,000,000
52
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...
int nfc_genl_device_added(struct nfc_dev *dev) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!msg) return -ENOMEM; hdr = genlmsg_put(msg, 0, 0, &nfc_genl_family, 0, NFC_EVENT_DEVICE_ADDED); if (!hdr) goto free_msg; if (nfc_genl_setup_device_added(dev, msg)) ...
0
[ "CWE-476" ]
linux
385097a3675749cbc9e97c085c0e5dfe4269ca51
202,185,904,358,672,430,000,000,000,000,000,000,000
28
nfc: Ensure presence of required attributes in the deactivate_target handler Check that the NFC_ATTR_TARGET_INDEX attributes (in addition to NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to accessing them. This prevents potential unhandled NULL pointer dereference exceptions which can be triggered by...
Tensor Tensor::Slice(int64_t start, int64_t limit) const { CHECK_GE(dims(), 1); CHECK_LE(0, start); CHECK_LE(start, limit); int64_t dim0_size = shape_.dim_size(0); CHECK_LE(limit, dim0_size); if ((start == 0) && (limit == dim0_size)) { return *this; } Tensor ret; ret.shape_ = shape_; ret.set_dty...
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
45,178,440,614,332,920,000,000,000,000,000,000,000
26
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) { int isinstance; PyObject *tmp = NULL; int lineno; int col_offset; int end_lineno; int end_col_offset; if (obj == Py_None) { *out = NULL; return 0; } if (_PyObject_LookupAttrId(obj, &PyId_lineno, &tmp) < 0) ...
1
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
288,561,520,849,934,900,000,000,000,000,000,000,000
1,681
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void sig_complete_channel(GList **list, WINDOW_REC *window, const char *word, const char *line, int *want_space) { g_return_if_fail(list != NULL); g_return_if_fail(word != NULL); *list = completion_get_channels(NULL, word); if (*list != NULL) signal_stop(); }
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
244,445,571,941,031,830,000,000,000,000,000,000,000
10
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
transit_hash_key_make (void *p) { const struct transit * transit = p; return jhash(transit->val, transit->length, 0); }
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
172,702,855,335,430,500,000,000,000,000,000,000,000
6
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
static int sctp_setsockopt_events(struct sock *sk, char __user *optval, int optlen) { if (optlen != sizeof(struct sctp_event_subscribe)) return -EINVAL; if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) return -EFAULT; return 0; }
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
29,374,467,623,529,576,000,000,000,000,000,000,000
9
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
ZrtpPacketClearAck* ZRtp::prepareClearAck(ZrtpPacketGoClear* gpkt) { sendInfo(Warning, WarningGoClearReceived); return &zrtpClearAck; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
334,669,514,842,281,280,000,000,000,000,000,000,000
4
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
void recovery_cipher_init(bool passphrase_protection, bool pin_protection, const char *language, const char *label, bool _enforce_wordlist, uint32_t _auto_lock_delay_ms, uint32_t _u2f_counter, bool _dry_run) { enforce_wordlist = _enforce_wordlist; dry_run = _d...
0
[ "CWE-354" ]
keepkey-firmware
769714fcb569e7a4faff9530a2d9ac1f9d6e5680
277,196,841,791,895,830,000,000,000,000,000,000,000
48
firmware: stronger recovery state machine checks
void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream, const struct snd_rawmidi_ops *ops) { struct snd_rawmidi_substream *substream; list_for_each_entry(substream, &rmidi->streams[stream].substreams, list) substream->ops = ops; }
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
118,521,220,329,514,120,000,000,000,000,000,000,000
8
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
static int vmci_transport_reply_reset(struct vmci_transport_packet *pkt) { return vmci_transport_reply_control_pkt_fast( pkt, VMCI_TRANSPORT_PACKET_TYPE_RST, 0, 0, NULL, VMCI_INVALID_HANDLE); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
29,389,196,165,204,107,000,000,000,000,000,000,000
8
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
rpc_C_Encrypt (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_BYTE_PTR data; CK_ULONG data_len; CK_BYTE_PTR encrypted_data; CK_ULONG encrypted_data_len; BEGIN_CALL (Encrypt); IN_ULONG (session); IN_BYTE_ARRAY (data, data_len); IN_BYTE_BUFFER (encrypted_data, ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
219,197,514,970,277,800,000,000,000,000,000,000,000
17
Check for arithmetic overflows before allocating
bool get_fileinfo(rzip_control *control) { i64 u_len, c_len, second_last, last_head, utotal = 0, ctotal = 0, ofs = 25, stream_head[2]; i64 expected_size, infile_size, chunk_size = 0, chunk_total = 0; int header_length, stream = 0, chunk = 0; char *tmp, *infilecopy = NULL; char chunk_byte = 0; long double cratio; ...
0
[ "CWE-703" ]
lrzip
4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4
189,245,759,115,049,500,000,000,000,000,000,000,000
264
Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure.
abort_job (CommonJob *job) { g_cancellable_cancel (job->cancellable); }
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
101,854,017,787,108,400,000,000,000,000,000,000,000
5
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static void flush_module_icache(const struct module *mod) { /* * Flush the instruction cache, since we've played with text. * Do it before processing of module parameters, so the module * can provide parameter accessor functions of its own. */ if (mod->init_layout.base) flush_icache_range((unsigned long)mod...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
233,355,791,669,196,820,000,000,000,000,000,000,000
14
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static union _zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key) { zend_internal_function f, *fptr = NULL; union _zend_function *func; DISPID dummy; php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr; if (V_VT(&obj->v) != VT_DISPATCH) { return NULL; } if...
0
[ "CWE-502" ]
php-src
115ee49b0be12e3df7d2c7027609fbe1a1297e42
228,658,014,854,902,020,000,000,000,000,000,000,000
100
Fix #77177: Serializing or unserializing COM objects crashes Firstly, we avoid returning NULL from the get_property handler, but instead return an empty HashTable, which already prevents the crashes. Secondly, since (de-)serialization obviously makes no sense for COM, DOTNET and VARIANT objects (at least with the curr...
dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, size_t size, off_t fsize, int *flags, int sh_num) { Elf32_Phdr ph32; Elf64_Phdr ph64; const char *linking_style = "statically"; const char *interp = ""; unsigned char nbuf[BUFSIZ]; char ibuf[BUFSIZ]; ssize_t bufsize; size_t of...
1
[ "CWE-20", "CWE-703" ]
file
445c8fb0ebff85195be94cd9f7e1df89cade5c7f
308,960,365,712,655,700,000,000,000,000,000,000,000
100
Bail out on partial reads, from Alexander Cherepanov
static int eb_prefault_relocations(const struct i915_execbuffer *eb) { const unsigned int count = eb->buffer_count; unsigned int i; if (unlikely(i915_modparams.prefault_disable)) return 0; for (i = 0; i < count; i++) { int err; err = check_relocations(&eb->exec[i]); if (err) return err; } return 0;...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
283,720,793,426,166,580,000,000,000,000,000,000,000
18
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
*/ static struct bfq_queue *bfq_init_rq(struct request *rq) { struct request_queue *q = rq->q; struct bio *bio = rq->bio; struct bfq_data *bfqd = q->elevator->elevator_data; struct bfq_io_cq *bic; const int is_sync = rq_is_sync(rq); struct bfq_queue *bfqq; bool new_queue = false; bool bfqq_already_existing = f...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
215,176,722,610,091,160,000,000,000,000,000,000,000
108
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...
R_API char *r_bin_java_print_fieldref_cp_stringify(RBinJavaCPTypeObj *obj) { ut32 size = 255, consumed = 0; char *value = malloc (size); if (value) { memset (value, 0, size); consumed = snprintf (value, size, "%d.0x%04"PFMT64x ".%s.%d.%d", obj->metas->ord, obj->file_offset + obj->loadaddr, ((RBinJavaCPTypeMet...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
70,287,673,086,486,520,000,000,000,000,000,000,000
24
Fix #10498 - Fix crash in fuzzed java files (#10511)
virDomainChrDefaultTargetType(int devtype) { switch ((virDomainChrDeviceType) devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: virReportError(VIR_ERR_XML_ERROR, _("target type must be specified for %s device"), virDomainChrDeviceTypeToString(devtype)); ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
66,374,955,176,988,410,000,000,000,000,000,000,000
23
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...
static void fib6_gc_timer_cb(unsigned long arg) { fib6_run_gc(0, (struct net *)arg, true); }
0
[ "CWE-284", "CWE-264" ]
linux
ae7b4e1f213aa659aedf9c6ecad0bf5f0476e1e2
299,339,917,027,256,940,000,000,000,000,000,000,000
4
net: fib: fib6_add: fix potential NULL pointer dereference When the kernel is compiled with CONFIG_IPV6_SUBTREES, and we return with an error in fn = fib6_add_1(), then error codes are encoded into the return pointer e.g. ERR_PTR(-ENOENT). In such an error case, we write the error code into err and jump to out, hence ...
initializeUnprivilegedWorkingObjects(WorkingObjects &wo) { eventLoop = createEventLoop(); wo.accountsDatabase = make_shared<AccountsDatabase>(); wo.accountsDatabase->add("logging", password, false); wo.loggingServer = make_shared<LoggingServer>(eventLoop, wo.serverSocketFd, wo.accountsDatabase, agentsOptions); ...
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
34,230,110,596,781,490,000,000,000,000,000,000,000
16
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
msg_prt_line(char_u *s, int list) { int c; int col = 0; int n_extra = 0; int c_extra = 0; int c_final = 0; char_u *p_extra = NULL; // init to make SASC shut up int n; int attr = 0; char_u *trail = NULL; char_u *lead = NULL; int in_multispace = FALSE; int mult...
0
[ "CWE-125" ]
vim
083692d598139228e101b8c521aaef7bcf256e9a
298,374,689,874,436,000,000,000,000,000,000,000,000
187
patch 9.0.0009: going past the end of a menu item with only modifier Problem: Going past the end of a menu item with only modifier. Solution: Check for NUL.
qf_getprop_filewinid(win_T *wp, qf_info_T *qi, dict_T *retdict) { int winid = 0; if (wp != NULL && IS_LL_WINDOW(wp)) { win_T *ll_wp = qf_find_win_with_loclist(qi); if (ll_wp != NULL) winid = ll_wp->w_id; } return dict_add_number(retdict, "filewinid", winid); }
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
15,823,078,633,576,018,000,000,000,000,000,000,000
13
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
iperf_set_test_blksize(struct iperf_test *ipt, int blksize) { ipt->settings->blksize = blksize; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
281,419,759,883,440,960,000,000,000,000,000,000,000
4
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
uint8_t *dhcpv6_get_option(struct dhcpv6_packet *packet, uint16_t pkt_len, int code, uint16_t *option_len, int *option_count) { int rem, count = 0; uint8_t *optionptr, *found = NULL; uint16_t opt_code, opt_len, len; optionptr = packet->options; rem = pkt_len - 1 - 3; if (rem <= 0) goto bad_packet; while ...
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
127,600,881,200,144,480,000,000,000,000,000,000,000
50
gdhcp: Avoid reading invalid data in dhcp_get_option
ds_response_to_ke(struct module_qstate* qstate, struct val_qstate* vq, int id, int rcode, struct dns_msg* msg, struct query_info* qinfo, struct key_entry_key** ke) { struct val_env* ve = (struct val_env*)qstate->env->modinfo[id]; char* reason = NULL; sldns_ede_code reason_bogus = LDNS_EDE_DNSSEC_BOGUS; enu...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
282,485,425,175,408,300,000,000,000,000,000,000,000
208
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
TfLiteStatus EluPrepare(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, 0); TfLiteTensor* output = GetOutput(context, node, 0); OpData* data = reinterpret_cast<OpData*>(node->user_data); // Use LUT to handle quantized elu path. if (input->type == kTfLiteInt8) {...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
103,393,704,754,354,910,000,000,000,000,000,000,000
13
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
f_swapname(typval_T *argvars, typval_T *rettv) { buf_T *buf; rettv->v_type = VAR_STRING; buf = tv_get_buf(&argvars[0], FALSE); if (buf == NULL || buf->b_ml.ml_mfp == NULL || buf->b_ml.ml_mfp->mf_fname == NULL) rettv->vval.v_string = NULL; else rettv->vval.v_string = vim_strsave(buf->b_ml.ml_...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
235,499,888,598,383,700,000,000,000,000,000,000,000
12
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static s16 av1_decode_signed_subexp_with_ref(GF_BitStream *bs, s32 low, s32 high, s32 r) { s16 x = av1_decode_unsigned_subexp_with_ref(bs, high - low, r - low); return x + low; }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
98,846,581,721,231,660,000,000,000,000,000,000,000
5
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
void APar_ExtractMovieDetails(char *uint32_buffer, FILE *isofile, AtomicInfo *mvhd_atom) { if (mvhd_atom->AtomicVerFlags & 0x01000000) { movie_info.creation_time = APar_read64(uint32_buffer, isofile, mvhd_atom->AtomicStart + 12); movie_info.m...
0
[ "CWE-787" ]
atomicparsley
d72ccf06c98259d7261e0f3ac4fd8717778782c1
42,901,587,396,681,730,000,000,000,000,000,000,000
46
Avoid stack overflow refs: https://github.com/wez/atomicparsley/issues/32
static inline pgd_t *pgd_alloc(struct mm_struct *mm) { spin_lock_init(&mm->context.list_lock); INIT_LIST_HEAD(&mm->context.pgtable_list); INIT_LIST_HEAD(&mm->context.gmap_list); return (pgd_t *) crst_table_alloc(mm); }
1
[ "CWE-20" ]
linux
3446c13b268af86391d06611327006b059b8bab1
190,573,308,485,685,650,000,000,000,000,000,000,000
7
s390/mm: four page table levels vs. fork The fork of a process with four page table levels is broken since git commit 6252d702c5311ce9 "[S390] dynamic page tables." All new mm contexts are created with three page table levels and an asce limit of 4TB. If the parent has four levels dup_mmap will add vmas to the new co...
ignore_dot_names (name) char *name; { return (name[0] != '.'); }
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
148,052,930,724,697,900,000,000,000,000,000,000,000
5
Bash-4.4 patch 7
SSL_TICKET_STATUS tls_get_ticket_from_client(SSL *s, CLIENTHELLO_MSG *hello, SSL_SESSION **ret) { size_t size; RAW_EXTENSION *ticketext; *ret = NULL; s->ext.ticket_expected = 0; /* * If tickets disabled or not supported by the protocol version ...
0
[ "CWE-476" ]
openssl
5235ef44b93306a14d0b6c695b13c64b16e1fdec
256,051,942,350,141,100,000,000,000,000,000,000,000
26
Fix SSL_check_chain() The function SSL_check_chain() can be used by applications to check that a cert and chain is compatible with the negotiated parameters. This could be useful (for example) from the certificate callback. Unfortunately this function was applying TLSv1.2 sig algs rules and did not work correctly if T...
HeaderKeyFormatterPtr formatter(const Http::Http1Settings& settings) { if (settings.header_key_format_ == Http1Settings::HeaderKeyFormat::ProperCase) { return std::make_unique<ProperCaseHeaderKeyFormatter>(); } return nullptr; }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
304,651,564,726,504,640,000,000,000,000,000,000,000
7
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static void mov_build_index(MOVContext *mov, AVStream *st) { MOVStreamContext *sc = st->priv_data; FFStream *const sti = ffstream(st); int64_t current_offset; int64_t current_dts = 0; unsigned int stts_index = 0; unsigned int stsc_index = 0; unsigned int stss_index = 0; unsigned int stps...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
165,770,761,787,427,600,000,000,000,000,000,000,000
315
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
processInit(struct module_qstate* qstate, struct val_qstate* vq, struct val_env* ve, int id) { uint8_t* lookup_name; size_t lookup_len; struct trust_anchor* anchor; enum val_classification subtype = val_classify_response( qstate->query_flags, &qstate->qinfo, &vq->qchase, vq->orig_msg->rep, vq->rrset_skip); ...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
59,438,066,955,345,190,000,000,000,000,000,000,000
188
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
static void put_prev_task(struct rq *rq, struct task_struct *prev) { if (prev->on_rq || rq->skip_clock_update < 0) update_rq_clock(rq); prev->sched_class->put_prev_task(rq, prev); }
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
256,725,609,902,493,900,000,000,000,000,000,000,000
6
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
void JBIG2Stream::reset() { segments.resize(0); globalSegments.resize(0); // read the globals stream if (globalsStream.isStream()) { curStr = globalsStream.getStream(); curStr->reset(); arithDecoder->setStream(curStr); huffDecoder->setStream(curStr); mmrDecoder->...
0
[ "CWE-476", "CWE-190" ]
poppler
27354e9d9696ee2bc063910a6c9a6b27c5184a52
90,855,527,146,517,460,000,000,000,000,000,000,000
33
JBIG2Stream: Fix crash on broken file https://github.com/jeffssh/CVE-2021-30860 Thanks to David Warren for the heads up
static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr, struct ib_uverbs_ex_cmd_hdr *ex_hdr, size_t count, const struct uverbs_api_write_method *method_elm) { if (method_elm->is_ex) { count -= sizeof(*hdr) + sizeof(*ex_hdr); if ((hdr->in_words + ex_hdr->provider_in_words) * 8 != count) return -EINVA...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
278,574,828,127,236,670,000,000,000,000,000,000,000
58
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
TiledInputFile::TiledInputFile (InputPartData* part) { _data = new Data (part->numThreads); _data->_deleteStream=false; multiPartInitialize(part); }
1
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
73,372,080,210,332,250,000,000,000,000,000,000,000
6
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
handle_client_accesses(CMD_Request *rx_message, CMD_Reply *tx_message) { CLG_Status result; RPT_ClientAccess_Report report; unsigned long nc; IPAddr ip; int i; struct timeval now; LCL_ReadCookedTime(&now, NULL); nc = ntohl(rx_message->data.client_accesses.n_clients); tx_message->status = htons(STT_S...
0
[ "CWE-189" ]
chrony
c6fdeeb6bb0b17dc28c19ae492c4a1c498e54ea3
46,856,059,573,345,390,000,000,000,000,000,000,000
51
Don't send uninitialized data in command replies The RPY_SUBNETS_ACCESSED and RPY_CLIENT_ACCESSES command replies can contain uninitalized data from stack when the client logging is disabled or a bad subnet is requested. These commands were never used by chronyc and they require the client to be authenticated since ve...
static int do_reconfigure_mnt(struct path *path, unsigned int mnt_flags) { struct super_block *sb = path->mnt->mnt_sb; struct mount *mnt = real_mount(path->mnt); int ret; if (!check_mnt(mnt)) return -EINVAL; if (path->dentry != mnt->mnt.mnt_root) return -EINVAL; if (!can_change_locked_flags(mnt, mnt_flags)...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
215,440,610,440,754,250,000,000,000,000,000,000,000
31
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static int aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { EVP_AES_GCM_CTX *gctx = EVP_C_DATA(EVP_AES_GCM_CTX,ctx); /* If not set up, return error */ if (!gctx->key_set) return -1; if (gctx->tls_aad_len >= 0) retur...
0
[ "CWE-125" ]
openssl
2198b3a55de681e1f3c23edb0586afe13f438051
191,012,807,674,267,950,000,000,000,000,000,000,000
126
crypto/evp: harden AEAD ciphers. Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory. Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Oth...
show_entry_xml (ExifEntry *e, void *data) { unsigned char *ids = data; char v[TAG_VALUE_BUF], t[TAG_VALUE_BUF]; if (*ids) { fprintf (stdout, "<x%04x>", e->tag); fprintf (stdout, "%s", escape_xml(exif_entry_get_value (e, v, sizeof (v)))); fprintf (stdout, "</x%04x>", e->tag); } else { strncpy (t, exif_tag_g...
0
[ "CWE-476" ]
exif
f6334d9d32437ef13dc902f0a88a2be0063d9d1c
18,398,780,077,702,706,000,000,000,000,000,000,000
21
added empty strign check, which would lead to NULL ptr deref/crash in exif XML display. fixes https://github.com/libexif/exif/issues/4
uint32_t read32(uint8_t* arr, int pos, int swapBytes) { if(!swapBytes) { return (arr[pos] << 24) | (arr[pos+1] << 16) | (arr[pos+2] << 8) | arr[pos+3]; } return arr[pos] | (arr[pos+1] << 8) | (arr[pos+2] << 16) | ...
0
[]
Little-CMS
06d4557477e7ab3330a24d69af4c67adcac9acdf
162,819,758,744,747,120,000,000,000,000,000,000,000
16
utils/jpgicc/jpgicc.c: Fix fprintf parameter number
static void set_se_shares(struct sched_entity *se, unsigned long shares) { struct cfs_rq *cfs_rq = se->cfs_rq; struct rq *rq = cfs_rq->rq; unsigned long flags; spin_lock_irqsave(&rq->lock, flags); __set_se_shares(se, shares); spin_unlock_irqrestore(&rq->lock, flags); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
215,512,390,825,948,100,000,000,000,000,000,000,000
10
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height) { gdImagePtr im_scaled = NULL; if (src == NULL || src->interpolation_id < 0 || src->interpolation_id > GD_METHOD_COUNT) { return 0; } switch (src->interpolation_id) { /*Special cases, optimi...
0
[ "CWE-399" ]
libgd
4751b606fa38edc456d627140898a7ec679fcc24
15,878,058,225,404,069,000,000,000,000,000,000,000
33
gdImageScaleTwoPass memory leak fix Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and confirmed by @vapier. This bug actually bit me in production and I'm very thankful that it was reported with an easy fix. Fixes #173.
static bool parse_path(GDBusProxy *proxy, const char *name, const char **path) { DBusMessageIter iter; if (!g_dbus_proxy_get_property(proxy, name, &iter)) return false; if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_OBJECT_PATH) return false; dbus_message_iter_get_basic(&iter, path); return true; }
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
169,097,730,057,012,150,000,000,000,000,000,000,000
14
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
static void irda_disconnect_indication(void *instance, void *sap, LM_REASON reason, struct sk_buff *skb) { struct irda_sock *self; struct sock *sk; self = instance; IRDA_DEBUG(2, "%s(%p)\n", __func__, self); /* Don't care about it, but let's not leak it */ if(skb) dev_kfree_skb(skb); sk = instan...
0
[ "CWE-200" ]
linux-2.6
09384dfc76e526c3993c09c42e016372dc9dd22c
9,773,307,300,019,574,000,000,000,000,000,000,000
56
irda: Fix irda_getname() leak irda_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>
static bool lxc_cgmanager_enter(pid_t pid, const char *controller, const char *cgroup_path, bool abs) { int ret; if (abs) ret = cgmanager_move_pid_abs_sync(NULL, cgroup_manager, controller, cgroup_path, pid); else ret = cgmanager_move_pid_sync(NULL, cgroup_manager, controller, cgroup_path, pid); if (re...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
32,614,129,251,781,537,000,000,000,000,000,000,000
21
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void destruct(struct dce110_resource_pool *pool) { unsigned int i; for (i = 0; i < pool->base.pipe_count; i++) { if (pool->base.opps[i] != NULL) dce110_opp_destroy(&pool->base.opps[i]); if (pool->base.transforms[i] != NULL) dce120_transform_destroy(&pool->base.transforms[i]); if (pool->base.ipps...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
205,584,887,172,279,500,000,000,000,000,000,000,000
67
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
void CWebServer::Cmd_GetUptime(WebEmSession & session, const request& req, Json::Value &root) { //this is used in the about page, we are going to round the seconds a bit to display nicer time_t atime = mytime(NULL); time_t tuptime = atime - m_StartTime; //round to 5 seconds (nicer in about page) tupt...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
252,429,481,963,578,120,000,000,000,000,000,000,000
22
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
static void reg_set_min_max(struct bpf_reg_state *true_reg, struct bpf_reg_state *false_reg, u64 val, u8 opcode) { /* If the dst_reg is a pointer, we can't learn anything about its * variable offset from the compare (unless src_reg were a pointer into * the same object, but we don't bother with that....
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
258,368,262,187,250,300,000,000,000,000,000,000,000
74
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
static void php_date_sub(zval *object, zval *interval, zval *return_value TSRMLS_DC) { php_date_obj *dateobj; php_interval_obj *intobj; timelib_time *new_time; dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); DATE_CHECK_INITIALIZED(dateobj->time, DateTime); intobj = (php_interv...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
79,124,629,524,477,510,000,000,000,000,000,000,000
20
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
static void opj_get_all_encoding_parameters( const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, OPJ_INT32 * p_tx0, OPJ_INT32 * p_tx1, ...
0
[ "CWE-190", "CWE-125", "CWE-787" ]
openjpeg
c16bc057ba3f125051c9966cf1f5b68a05681de4
325,656,015,071,703,600,000,000,000,000,000,000,000
123
Fix an integer overflow issue (#809) Prevent an integer overflow issue in function opj_pi_create_decode of pi.c.
inline void ArgMinMaxLastAxis(const RuntimeShape& input_shape, const T1* input_data, const RuntimeShape& output_shape, T2* output_data) { TFLITE_DCHECK_EQ(input_shape.DimensionsCount(), 2); TFLITE_DCHECK_EQ(output_shape.Dimens...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
167,782,506,311,282,930,000,000,000,000,000,000,000
20
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
static int parse_tree_anr_present(struct ldb_parse_tree *tree, void *private_context) { struct anr_present_ctx *ctx = private_context; switch (tree->operation) { case LDB_OP_EQUALITY: case LDB_OP_GREATER: case LDB_OP_LESS: case LDB_OP_APPROX: if (ldb_attr_cmp(tree->u.equality.attr, ctx->attr) == 0) { ctx->fo...
0
[ "CWE-703" ]
samba
3a4eb50cf74671de3442d179bd2d44afd5bc52c1
169,835,944,568,040,520,000,000,000,000,000,000,000
33
CVE-2021-3670 dsdb/anr: Do a copy of the potentially anr query before starting to modify it RN: Do not modify the caller-supplied memory in the anr=* handling to allow clear logging of the actual caller request after it has been processed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694 Signed-off-by: Andrew B...
static const char *io_port_to_string(uint32_t io_port) { if (io_port >= QXL_IO_RANGE_SIZE) { return "out of range"; } static const char *io_port_to_string[QXL_IO_RANGE_SIZE + 1] = { [QXL_IO_NOTIFY_CMD] = "QXL_IO_NOTIFY_CMD", [QXL_IO_NOTIFY_CURSOR] = "QXL_IO_NOTIF...
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
222,546,787,145,907,350,000,000,000,000,000,000,000
36
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
static int macvtap_open(struct inode *inode, struct file *file) { struct net *net = current->nsproxy->net_ns; struct net_device *dev = dev_get_by_macvtap_minor(iminor(inode)); struct macvtap_queue *q; int err; err = -ENODEV; if (!dev) goto out; err = -ENOMEM; q = (struct macvtap_queue *)sk_alloc(net, AF_UNS...
0
[ "CWE-119", "CWE-787" ]
linux
b92946e2919134ebe2a4083e4302236295ea2a73
289,120,464,507,620,930,000,000,000,000,000,000,000
49
macvtap: zerocopy: validate vectors before building skb There're several reasons that the vectors need to be validated: - Return error when caller provides vectors whose num is greater than UIO_MAXIOV. - Linearize part of skb when userspace provides vectors grater than MAX_SKB_FRAGS. - Return error when userspace pro...
RAMBlock *qemu_ram_alloc(ram_addr_t size, bool share, MemoryRegion *mr, Error **errp) { return qemu_ram_alloc_internal(size, size, NULL, NULL, false, share, mr, errp); }
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
93,759,503,592,049,110,000,000,000,000,000,000,000
6
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
GuestMemoryBlockList *qmp_guest_get_memory_blocks(Error **errp) { error_setg(errp, QERR_UNSUPPORTED); return NULL; }
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
43,831,732,654,105,540,000,000,000,000,000,000,000
5
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
int MYSQL_BIN_LOG::rotate(bool force_rotate, bool* check_purge) { int error= 0; DBUG_ENTER("MYSQL_BIN_LOG::rotate"); //todo: fix the macro def and restore safe_mutex_assert_owner(&LOCK_log); *check_purge= false; if (force_rotate || (my_b_tell(&log_file) >= (my_off_t) max_size)) { if ((error= new_file_...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
294,587,408,178,357,170,000,000,000,000,000,000,000
27
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static void ext4_da_release_space(struct inode *inode, int to_free) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); int total, mdb, mdb_free, release; if (!to_free) return; /* Nothing to release, exit */ spin_lock(&EXT4_I(inode)->i_block_reservation_lock); if (!EXT4_I(inode)->i_reserved_data_blocks) { /...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
217,264,106,334,892,670,000,000,000,000,000,000,000
45
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
Item *LEX::create_item_func_nextval(THD *thd, Table_ident *table_ident) { TABLE_LIST *table; if (unlikely(!(table= current_select->add_table_to_list(thd, table_ident, 0, TL_OPTION_SEQUENCE, TL_WRITE_A...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
202,830,005,445,505,500,000,000,000,000,000,000,000
11
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
BSONObj spec() { return BSON("$or" << BSON_ARRAY(true << false)); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
167,880,215,736,096,060,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static int packet_alloc_pending(struct packet_sock *po) { po->rx_ring.pending_refcnt = NULL; po->tx_ring.pending_refcnt = alloc_percpu(unsigned int); if (unlikely(po->tx_ring.pending_refcnt == NULL)) return -ENOBUFS; return 0; }
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
195,775,913,518,913,100,000,000,000,000,000,000,000
10
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
TEST_F(HttpHealthCheckerImplTest, SuccessServiceCheckWithCustomHostValue) { const std::string host = "www.envoyproxy.io"; const std::string path = "/healthcheck"; setupServiceValidationWithCustomHostValueHC(host); // Requires non-empty `service_name` in config. EXPECT_CALL(runtime_.snapshot_, featureEnabled("...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
17,252,837,983,697,302,000,000,000,000,000,000,000
34
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
add_subdirs (GPtrArray *res, GFile *parent, gboolean recurse) { g_autoptr(GFileEnumerator) dir_enum = NULL; dir_enum = g_file_enumerate_children (parent, G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBU...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
53,520,185,118,356,150,000,000,000,000,000,000,000
56
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static void igmp6_join_group(struct ifmcaddr6 *ma) { unsigned long delay; if (ma->mca_flags & MAF_NOREPORT) return; igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); delay = prandom_u32() % unsolicited_report_interval(ma->idev); if (cancel_delayed_work(&ma->mca_work)) { refcount_dec(&ma->mca_ref...
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
282,356,349,201,313,430,000,000,000,000,000,000,000
20
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host, u8 event, struct sk_buff *skb) { int r = 0; struct device *dev = &hdev->ndev->dev; struct nfc_evt_transaction *transaction; pr_debug("connectivity gate event: %x\n", event); switch (event) { case ST21NFCA_EVT_CONNECTIVITY: r = nfc...
1
[ "CWE-120" ]
linux
4fbcc1a4cb20fe26ad0225679c536c80f1648221
213,748,705,583,574,000,000,000,000,000,000,000,000
51
nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION It appears that there are some buffer overflows in EVT_TRANSACTION. This happens because the length parameters that are passed to memcpy come directly from skb->data and are not guarded in any way. Signed-off-by: Jordy Zomer <jordy@pwning.systems> Revie...
static int nf_tables_newobj(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_next(info->net); u8 family = info->nfmsg->nfgen_family; const struct nft_object_type *type; struct net *net = info->net;...
0
[ "CWE-787" ]
linux
6e1acfa387b9ff82cfc7db8cc3b6959221a95851
135,087,835,970,498,730,000,000,000,000,000,000,000
104
netfilter: nf_tables: validate registers coming from userspace. Bail out in case userspace uses unsupported registers. Fixes: 49499c3e6e18 ("netfilter: nf_tables: switch registers to 32 bit addressing") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
__acquires(dev->ingress_lock) { spin_lock_bh(&dev->queue_lock); spin_lock(&dev->ingress_lock); }
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
92,815,270,118,869,850,000,000,000,000,000,000,000
5
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
Status TrySimplify(NodeDef* node, string* simplified_node_name) override { NodeDef* x; NodeDef* y; TF_RETURN_IF_ERROR(GetInputNode(node->input(0), &x)); TF_RETURN_IF_ERROR(GetInputNode(node->input(1), &y)); bool updated = false; if (IsNeg(*y)) { // a - (-b) = a + b or a + (-b) = a - b ...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
124,301,503,933,748,530,000,000,000,000,000,000,000
27
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler) { if (parser != NULL) parser->m_notStandaloneHandler = handler; }
0
[ "CWE-611" ]
libexpat
11f8838bf99ea0a6f0b76f9760c43704d00c4ff6
121,559,364,371,362,870,000,000,000,000,000,000,000
6
xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev) { struct arc_emac_priv *priv = netdev_priv(ndev); unsigned int len, *txbd_curr = &priv->txbd_curr; struct net_device_stats *stats = &ndev->stats; __le32 *info = &priv->txbd[*txbd_curr].info; dma_addr_t addr; if (skb_padto(skb, ETH_ZLEN)) retu...
1
[ "CWE-362" ]
linux
c278c253f3d992c6994d08aa0efb2b6806ca396f
266,203,728,773,501,500,000,000,000,000,000,000,000
62
net: arc_emac: fix koops caused by sk_buff free There is a race between arc_emac_tx() and arc_emac_tx_clean(). sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx() submitting sk_buff. In order to free sk_buff arc_emac_tx_clean() checks: if ((info & FOR_EMAC) || !txbd->data) break; ... dev_...
gnutls_ocsp_req_import(gnutls_ocsp_req_t req, const gnutls_datum_t * data) { int ret = 0; if (req == NULL || data == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } if (req->init) { /* Any earlier _asn1_strict_der_decode will modify the ASN.1 structure, so we need to replace it with a fresh...
0
[ "CWE-264" ]
gnutls
964632f37dfdfb914ebc5e49db4fa29af35b1de9
237,273,960,883,277,500,000,000,000,000,000,000,000
32
ocsp: corrected the comparison of the serial size in OCSP response Previously the OCSP certificate check wouldn't verify the serial length and could succeed in cases it shouldn't. Reported by Stefan Buehler.
static int intel_vgpu_group_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct intel_vgpu *vgpu = container_of(nb, struct intel_vgpu, vdev.group_notifier); /* the only action we care about */ if (action == VFIO_GROUP_NOTIFY_SET_KVM) { vgpu->vdev.kvm = data; if (!d...
0
[ "CWE-20" ]
linux
51b00d8509dc69c98740da2ad07308b630d3eb7d
296,695,568,022,394,300,000,000,000,000,000,000,000
17
drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always doe...
FLAC__bool EncoderSession_init_encoder(EncoderSession *e, encode_options_t options) { const unsigned channels = e->info.channels; const unsigned bps = e->info.bits_per_sample - e->info.shift; const unsigned sample_rate = e->info.sample_rate; FLACDecoderData *flac_decoder_data = (e->format == FORMAT_FLAC || e->forma...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
141,053,681,473,705,550,000,000,000,000,000,000,000
434
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/