func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
explicit MemoryAllocatorInfo(Http2Session* session) : info({ session, H2Malloc, H2Free, H2Calloc, H2Realloc }) {}
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
199,749,681,498,724,440,000,000,000,000,000,000,000
2
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
int nsh_key_from_nlattr(const struct nlattr *attr, struct ovs_key_nsh *nsh, struct ovs_key_nsh *nsh_mask) { struct nlattr *a; int rem; /* validate_nsh has check this, so we needn't do duplicate check here */ nla_for_each_nested(a, attr, rem) { int type = nla_type(a); switch (type) { case OVS_NSH_KEY_AT...
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
336,709,986,555,139,080,000,000,000,000,000,000,000
39
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
rsvg_new_ellipse (void) { RsvgNodeEllipse *ellipse; ellipse = g_new (RsvgNodeEllipse, 1); _rsvg_node_init (&ellipse->super, RSVG_NODE_TYPE_ELLIPSE); ellipse->super.draw = _rsvg_node_ellipse_draw; ellipse->super.set_atts = _rsvg_node_ellipse_set_atts; ellipse->cx = ellipse->cy = ellipse->rx = ell...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
94,551,642,851,212,750,000,000,000,000,000,000,000
10
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
TPMI_RH_AC_Unmarshal(TPMI_RH_AC *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPM_HANDLE_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { BOOL isNotAC = (*target < AC_FIRST) || (*target > AC_LAST); if (isNotAC) { rc = TPM_RC_...
1
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
252,479,390,624,889,840,000,000,000,000,000,000,000
15
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
R_API int r_str_rwx(const char *str) { int ret = atoi (str); if (!ret) { ret |= strchr (str, 'm') ? 16 : 0; ret |= strchr (str, 'r') ? 4 : 0; ret |= strchr (str, 'w') ? 2 : 0; ret |= strchr (str, 'x') ? 1 : 0; } else if (ret < 0 || ret >= R_ARRAY_SIZE (rwxstr)) { ret = 0; } return ret; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
250,800,897,730,273,800,000,000,000,000,000,000,000
12
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
grub_ext2_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook, void *hook_data) { struct grub_ext2_dir_ctx ctx = { .hook = hook, .hook_data = hook_data }; struct grub_fshelp_node *fdiro = 0; grub_dl_ref (my_mod); ctx.data = grub_ext2_mount (device->disk); if (! ctx.data) ...
0
[ "CWE-119" ]
grub
ac8cac1dac50daaf1c390d701cca3b55e16ee768
266,979,619,691,417,300,000,000,000,000,000,000,000
32
* grub-core/fs/ext2.c: Remove variable length arrays.
int security_task_getsid(struct task_struct *p) { return security_ops->task_getsid(p); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
44,504,722,454,355,195,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static void vop_virtio_init_post(struct vop_vdev *vdev) { struct mic_vqconfig *vqconfig = mic_vq_config(vdev->dd); struct vop_device *vpdev = vdev->vpdev; int i, used_size; for (i = 0; i < vdev->dd->num_vq; i++) { used_size = PAGE_ALIGN(sizeof(u16) * 3 + sizeof(struct vring_used_elem) * le16_to_cpu(vqcon...
0
[ "CWE-119", "CWE-787" ]
linux
9bf292bfca94694a721449e3fd752493856710f6
242,637,137,017,597,700,000,000,000,000,000,000,000
26
misc: mic: Fix for double fetch security bug in VOP driver The MIC VOP driver does two successive reads from user space to read a variable length data structure. Kernel memory corruption can result if the data structure changes between the two reads. This patch disallows the chance of this happening. Bugzilla: https:...
decode_OFPAT_RAW_PUSH_MPLS(ovs_be16 ethertype, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { struct ofpact_push_mpls *oam; if (!eth_type_mpls(ethertype)) { return OFPERR_OFPBAC_BAD_ARGUMENT; } oam = ofpact_put_PUSH_MPLS(out)...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
81,084,556,765,705,500,000,000,000,000,000,000,000
14
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
TEST(FlexModel, FailureWithoutFlexDelegate) { auto model = FlatBufferModel::BuildFromFile( "tensorflow/lite/testdata/multi_add_flex.bin"); ASSERT_TRUE(model); // Note that creation will succeed when using the BuiltinOpResolver, but // unless the appropriate delegate is linked into the target or the clien...
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
314,126,065,416,591,270,000,000,000,000,000,000,000
18
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf) { g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), GDK_COLORSPACE_RGB); return pixbuf->colorspace; }
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
134,360,289,691,505,720,000,000,000,000,000,000,000
6
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
static int binder_wait_for_work(struct binder_thread *thread, bool do_proc_work) { DEFINE_WAIT(wait); struct binder_proc *proc = thread->proc; int ret = 0; freezer_do_not_count(); binder_inner_proc_lock(proc); for (;;) { prepare_to_wait(&thread->wait, &wait, TASK_INTERRUPTIBLE); if (binder_has_work_ilock...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
186,170,705,841,848,100,000,000,000,000,000,000,000
31
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb) { const struct ip_options *sopt; unsigned char *sptr, *dptr; int soffset, doffset; int optlen; __be32 daddr; memset(dopt, 0, sizeof(struct ip_options)); sopt = &(IPCB(skb)->opt); if (sopt->optlen == 0) return 0; sptr = skb_network_header(s...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
231,636,220,106,691,550,000,000,000,000,000,000,000
117
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static inline void io_put_file(struct file *file) { if (file) fput(file); }
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
266,467,858,259,491,230,000,000,000,000,000,000,000
5
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static int clone_copy_inline_extent(struct inode *dst, struct btrfs_trans_handle *trans, struct btrfs_path *path, struct btrfs_key *new_key, const u64 drop_start, const u64 datal, const u64 skip, const u64 size, char *inline_data) { struct btrfs_fs_info *...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
52,498,272,875,695,930,000,000,000,000,000,000,000
118
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static int register_macsec_dev(struct net_device *real_dev, struct net_device *dev) { struct macsec_dev *macsec = macsec_priv(dev); struct macsec_rxh_data *rxd = macsec_data_rtnl(real_dev); if (!rxd) { int err; rxd = kmalloc(sizeof(*rxd), GFP_KERNEL); if (!rxd) return -ENOMEM; INIT_LIST_HEAD(...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
169,324,644,930,029,190,000,000,000,000,000,000,000
26
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
static bool checkreturn decode_extension(pb_istream_t *stream, uint32_t tag, pb_wire_type_t wire_type, pb_field_iter_t *iter) { pb_extension_t *extension = *(pb_extension_t* const *)iter->pData; size_t pos = stream->bytes_left; while (extension != NULL && pos == stream->bytes_left) { bo...
0
[ "CWE-20", "CWE-119" ]
nanopb
4fe23595732b6f1254cfc11a9b8d6da900b55b0c
206,978,395,269,890,780,000,000,000,000,000,000,000
22
Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615) Nanopb would leak memory when all of the following conditions were true: - PB_ENABLE_MALLOC is defined at the compile time - Message definitions contains an oneof field, the oneof contains a static submessage, and the static submessage contains a pointer fiel...
log_insert_vars (char *buf, int bufsize, char *fmt, char *c, char *n, char *s) { char *end = buf + bufsize; while (1) { switch (fmt[0]) { case 0: buf[0] = 0; return; case '%': fmt++; switch (fmt[0]) { case 'c': buf = log_escape_strcpy (buf, c, end); break; case 'n': buf = l...
0
[ "CWE-22" ]
hexchat
15600f405f2d5bda6ccf0dd73957395716e0d4d3
287,978,462,403,410,900,000,000,000,000,000,000,000
46
Sanitize network name for scrollback files This prevents using invalid chars on Windows or creating directories
static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, const struct xfrm_migrate *m, int num_bundles, const struct xfrm_kmaddress *k) { int i; int sasize_sel; int size = 0; int size_pol = 0; struct sk_buff *skb; struct sadb_msg *hdr; struct sadb_x_policy *pol; const st...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
278,094,019,379,658,240,000,000,000,000,000,000,000
109
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...
static int apply_working_directory( const ExecContext *context, const ExecParameters *params, const char *home, const bool needs_mount_ns, int *exit_status) { const char *d, *wd; assert(context); assert(exit_status...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
330,723,587,004,247,470,000,000,000,000,000,000,000
44
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
bool AbstractWebApplication::isAuthNeeded() { return (env_.clientAddress != QHostAddress::LocalHost && env_.clientAddress != QHostAddress::LocalHostIPv6 && env_.clientAddress != QHostAddress("::ffff:127.0.0.1")) || Preferences::instance()->isWebUiLocalAuthEnabled(); }
0
[ "CWE-20" ]
qBittorrent
f5ad04766f4abaa78374ff03704316f8ce04627d
151,028,655,694,934,920,000,000,000,000,000,000,000
7
[WebUI] Avoid clickjacking attacks
int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3) { struct kvm_mmu *mmu = vcpu->arch.walk_mmu; gfn_t pdpt_gfn = cr3 >> PAGE_SHIFT; gpa_t real_gpa; int i; int ret; u64 pdpte[ARRAY_SIZE(mmu->pdptrs)]; /* * If the MMU is nested, CR3 holds an L2 GPA and needs to be translated * to an L1 GPA. */ real_...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
101,982,445,136,722,770,000,000,000,000,000,000,000
45
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
dissect_kafka_elect_leaders_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; if (api_version >= 1) { offset = dissect_kafka_int8(tree, hf_kafka_election_type, tvb, ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
330,735,364,020,919,400,000,000,000,000,000,000,000
26
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static struct netbk_rx_meta *get_next_rx_buffer(struct xenvif *vif, struct netrx_pending_operations *npo) { struct netbk_rx_meta *meta; struct xen_netif_rx_request *req; req = RING_GET_REQUEST(&vif->rx, vif->rx.req_cons++); meta = npo->meta + npo->meta_prod++; meta->gso_size = 0; meta->size = 0; meta->id...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
297,587,495,561,639,170,000,000,000,000,000,000,000
18
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static inline int l2cap_information_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data) { struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) data; u16 type, result; type = __le16_to_cpu(rsp->type); result = __le16_to_cpu(rsp->result); BT_DBG("type 0x%4.4x result 0x%2.2x", type, result); del...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
209,235,783,504,074,840,000,000,000,000,000,000,000
38
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
aubio_filterbank_set_norm (aubio_filterbank_t *f, smpl_t norm) { if (norm != 0 && norm != 1) return AUBIO_FAIL; f->norm = norm; return AUBIO_OK; }
0
[]
aubio
eda95c9c22b4f0b466ae94c4708765eaae6e709e
264,862,214,205,345,980,000,000,000,000,000,000,000
6
[filterbank] validate input parameters
static struct fwnet_device *fwnet_dev_find(struct fw_card *card) { struct fwnet_device *dev; list_for_each_entry(dev, &fwnet_device_list, dev_link) if (dev->card == card) return dev; return NULL; }
0
[ "CWE-119", "CWE-284", "CWE-787" ]
linux
667121ace9dbafb368618dbabcf07901c962ddac
154,059,014,494,281,890,000,000,000,000,000,000,000
10
firewire: net: guard against rx buffer overflows The IP-over-1394 driver firewire-net lacked input validation when handling incoming fragmented datagrams. A maliciously formed fragment with a respectively large datagram_offset would cause a memcpy past the datagram buffer. So, drop any packets carrying a fragment wi...
close_socket (int sok) { /* close the socket in 5 seconds so the QUIT message is not lost */ fe_timeout_add (5000, close_socket_cb, GINT_TO_POINTER (sok)); }
0
[ "CWE-310" ]
hexchat
c9b63f7f9be01692b03fa15275135a4910a7e02d
307,040,462,876,857,500,000,000,000,000,000,000,000
5
ssl: Validate hostnames Closes #524
static const ut8* r_bin_dwarf_parse_std_opcode( const RBin *a, const ut8 *obuf, size_t len, const RBinDwarfLNPHeader *hdr, RBinDwarfSMRegisters *regs, ut8 opcode, FILE *f, int mode) { const ut8* buf = obuf; const ut8* buf_end = obuf + len; ut64 addr = 0LL; st64 sbuf; ut8 adj_opcode; ut64 op_advance; ut16 o...
0
[ "CWE-119", "CWE-125" ]
radare2
d37d2b858ac47f2f108034be0bcecadaddfbc8b3
9,031,607,206,965,160,000,000,000,000,000,000,000
120
Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478)
static void manager_vacuum_uid_refs_internal( Manager *m, Hashmap **uid_refs, int (*_clean_ipc)(uid_t uid)) { Iterator i; void *p, *k; assert(m); assert(uid_refs); assert(_clean_ipc); HASHMAP_FOREACH_KEY(p, k, *uid_refs, ...
0
[ "CWE-20" ]
systemd
531ac2b2349da02acc9c382849758e07eb92b020
5,376,320,355,510,214,000,000,000,000,000,000,000
33
If the notification message length is 0, ignore the message (#4237) Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
int test_lshift1(BIO *bp) { BIGNUM *a,*b,*c; int i; a=BN_new(); b=BN_new(); c=BN_new(); BN_bntest_rand(a,200,0,0); /**/ a->neg=rand_neg(); for (i=0; i<num0; i++) { BN_lshift1(b,a); if (bp != NULL) { if (!results) { BN_print(bp,a); BIO_puts(bp," * 2"); BIO_puts(bp," - "); } ...
0
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
177,578,431,519,202,670,000,000,000,000,000,000,000
40
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
do_sync_target_write(MirrorBlockJob *job, MirrorMethod method, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { int ret; size_t qiov_offset = 0; int64_t bitmap_offset, bitmap_end; if (!QEMU_IS_ALIGNED(offset, job->granularity) && bdrv_d...
0
[ "CWE-476" ]
qemu
66fed30c9cd11854fc878a4eceb507e915d7c9cd
179,295,924,237,196,650,000,000,000,000,000,000,000
107
block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts() In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer in mirror_wait_on_conflicts() without checks if it is not NULL. Backtrace: Program termi...
TPMI_ALG_KEYEDHASH_SCHEME_Marshal(TPMI_ALG_KEYEDHASH_SCHEME *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM_ALG_ID_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
54,353,822,305,901,980,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static int host_convert(char *hostname, char *ip_str, size_t ip_size) { struct addrinfo *result = NULL, hints = {0}; int re = -1; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_DGRAM; re = getaddrinfo(hostname, NULL, &hints, &result); if (re == 0) { struct in_addr addr...
0
[ "CWE-287", "CWE-284" ]
booth
35bf0b7b048d715f671eb68974fb6b4af6528c67
316,709,058,087,238,440,000,000,000,000,000,000,000
22
Revert "Refactor: main: substitute is_auth_req macro" This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c. authfile != authkey Signed-off-by: Jan Friesse <jfriesse@redhat.com>
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) { const char *auth_line = apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq) ? "Proxy-Authorization" :...
0
[ "CWE-703" ]
httpd
be0f5335e3e73eb63253b050fdc23f252f5c8ae3
235,995,705,872,162,700,000,000,000,000,000,000,000
42
*) SECURITY: CVE-2015-0253 (cve.mitre.org) core: Fix a crash introduced in with ErrorDocument 400 pointing to a local URL-path with the INCLUDES filter active, introduced in 2.4.11. PR 57531. [Yann Ylavic] Submitted By: ylavic Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/http...
static int cdrom_mrw_bgformat_susp(struct cdrom_device_info *cdi, int immed) { struct packet_command cgc; init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE); cgc.cmd[0] = GPCMD_CLOSE_TRACK; /* * Session = 1, Track = 0 */ cgc.cmd[1] = !!immed; cgc.cmd[2] = 1 << 1; cgc.timeout = 5 * 60 * HZ; return cdi->ops...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
11,109,680,533,886,827,000,000,000,000,000,000,000
17
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
handle_get_connection (GVfsDBusDaemon *object, GDBusMethodInvocation *invocation, gpointer user_data) { GVfsDaemon *daemon = G_VFS_DAEMON (user_data); GDBusServer *server; GError *error; gchar *address1; NewConnectionData *data; char *socket_dir; gchar *guid; ...
1
[ "CWE-276" ]
gvfs
e3808a1b4042761055b1d975333a8243d67b8bfe
118,403,742,741,541,000,000,000,000,000,000,000,000
55
gvfsdaemon: Check that the connecting client is the same user Otherwise, an attacker who learns the abstract socket address from netstat(8) or similar could connect to it and issue D-Bus method calls. Signed-off-by: Simon McVittie <smcv@collabora.com>
Status CopyTF_TensorStringsToPyArray(const TF_Tensor* src, uint64 nelems, PyArrayObject* dst) { const void* tensor_data = TF_TensorData(src); DCHECK(tensor_data != nullptr); DCHECK_EQ(TF_STRING, TF_TensorType(src)); const tstring* tstr = static_cast<const tstring*>(tensor_d...
0
[ "CWE-476", "CWE-843" ]
tensorflow
030af767d357d1b4088c4a25c72cb3906abac489
57,119,709,213,555,140,000,000,000,000,000,000,000
30
Fix `tf.raw_ops.ResourceCountUpTo` null pointer dereference. PiperOrigin-RevId: 368294347 Change-Id: I2c16fbfc9b4966c402c3d8e311f0d665a9c852d8
void testRequestResponseSize(bool with_trailers) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Ht...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
281,972,055,384,119,400,000,000,000,000,000,000,000
71
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static int legacy_get_tree(struct fs_context *fc) { struct legacy_fs_context *ctx = fc->fs_private; struct super_block *sb; struct dentry *root; root = fc->fs_type->mount(fc->fs_type, fc->sb_flags, fc->source, ctx->legacy_data); if (IS_ERR(root)) return PTR_ERR(root); sb = root->d_sb; BUG_ON(!sb); ...
0
[ "CWE-787" ]
linux
722d94847de29310e8aa03fcbdb41fc92c521756
196,915,672,101,708,530,000,000,000,000,000,000,000
17
vfs: fs_context: fix up param length parsing in legacy_parse_param The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an unsigned type so a large value of "size" results in a high positive value instead of a negative value as expected. Fix this by getting rid of the subtraction. Signed-off-by: Jamie H...
ext4_xattr_release_block(handle_t *handle, struct inode *inode, struct buffer_head *bh, struct ext4_xattr_inode_array **ea_inode_array, int extra_credits) { struct mb_cache *ea_block_cache = EA_BLOCK_CACHE(inode); u32 hash, ref; int error = 0; BUFFER_TRACE(bh, "get_write_access"); error = ext4_journal...
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
129,741,098,436,748,360,000,000,000,000,000,000,000
81
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
static int create_filter(struct trace_array *tr, struct trace_event_call *call, char *filter_string, bool set_str, struct event_filter **filterp) { struct filter_parse_error *pe = NULL; int err; /* filterp must point to NULL */ if (WARN_ON(*filterp)) *filterp = NULL; err = create_filter_start(filte...
0
[ "CWE-400", "CWE-284", "CWE-401" ]
linux
96c5c6e6a5b6db592acae039fed54b5c8844cd35
23,883,840,815,041,000,000,000,000,000,000,000,000
23
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <nav...
evutil_new_addrinfo_(struct sockaddr *sa, ev_socklen_t socklen, const struct evutil_addrinfo *hints) { struct evutil_addrinfo *res; EVUTIL_ASSERT(hints); if (hints->ai_socktype == 0 && hints->ai_protocol == 0) { /* Indecisive user! Give them a UDP and a TCP. */ struct evutil_addrinfo *r1, *r2; struct evut...
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
339,916,519,393,385,300,000,000,000,000,000,000,000
40
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
static HRESULT STDMETHODCALLTYPE CliprdrStream_Read(IStream* This, void* pv, ULONG cb, ULONG* pcbRead) { int ret; CliprdrStream* instance = (CliprdrStream*)This; wfClipboard* clipboard; if (!pv || !pcbRead || !instance) return E_INVALIDARG; clipboard = (wfCli...
0
[ "CWE-20" ]
FreeRDP
0d79670a28c0ab049af08613621aa0c267f977e9
306,694,944,048,909,500,000,000,000,000,000,000,000
37
Fixed missing input checks for file contents request reported by Valentino Ricotta (Thalium)
walkerParseTest(const char *filename, const char *result, const char *err, int options) { xmlDocPtr doc; xmlTextReaderPtr reader; int ret; doc = xmlReadFile(filename, NULL, options); if (doc == NULL) { fprintf(stderr, "Failed to parse %s\n", filename); return(-1); } ...
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
66,285,754,796,527,030,000,000,000,000,000,000,000
17
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
int dev_set_mtu(struct net_device *dev, int new_mtu) { const struct net_device_ops *ops = dev->netdev_ops; int err; if (new_mtu == dev->mtu) return 0; /* MTU must be positive. */ if (new_mtu < 0) return -EINVAL; if (!netif_device_present(dev)) return -ENODEV; err = 0; if (ops->ndo_change_mtu) err =...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
41,791,136,843,710,380,000,000,000,000,000,000,000
25
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
*/ static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) { return __skb_cow(skb, headroom, skb_header_cloned(skb));
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
314,546,908,413,514,180,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
int processEventsWhileBlocked(void) { int iterations = 4; /* See the function top-comment. */ int count = 0; while (iterations--) { int events = 0; events += aeProcessEvents(server.el, AE_FILE_EVENTS|AE_DONT_WAIT); events += handleClientsWithPendingWrites(); if (!events) brea...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
216,528,243,283,470,900,000,000,000,000,000,000,000
12
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
LIR_Opr LIRGenerator::syncLockOpr() { return new_register(T_INT); }
0
[]
jdk17u
268c0159253b3de5d72eb826ef2329b27bb33fea
283,058,380,790,666,660,000,000,000,000,000,000,000
1
8272014: Better array indexing Reviewed-by: thartmann Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f
get_address( exarg_T *eap UNUSED, char_u **ptr, int addr_type, // flag: one of ADDR_LINES, ... int skip, // only skip the address, don't use it int silent, // no errors or side effects int to_other_file, // flag: may jump to other file int address_count UNUSED) // 1 for first address...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
302,660,451,293,936,100,000,000,000,000,000,000,000
323
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 int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *page_table, pmd_t *pmd, unsigned int flags, pte_t orig_pte) { spinlock_t *ptl; struct page *page, *swapcache; swp_entry_t entry; pte_t pte; int locked; struct mem_cgroup *ptr; int exclusive = 0; int ret =...
0
[ "CWE-703", "CWE-189" ]
linux
b4cbb197c7e7a68dbad0d491242e3ca67420c13e
304,702,732,565,165,800,000,000,000,000,000,000,000
177
vm: add vm_iomap_memory() helper function Various drivers end up replicating the code to mmap() their memory buffers into user space, and our core memory remapping function may be very flexible but it is unnecessarily complicated for the common cases to use. Our internal VM uses pfn's ("page frame numbers") which sim...
is_ICC_signature(png_alloc_size_t it) { return is_ICC_signature_char(it >> 24) /* checks all the top bits */ && is_ICC_signature_char((it >> 16) & 0xff) && is_ICC_signature_char((it >> 8) & 0xff) && is_ICC_signature_char(it & 0xff); }
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
238,005,547,056,023,420,000,000,000,000,000,000,000
7
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, struct sock *sk, gfp_t gfp) { struct sctp_hmac_algo_param *auth_hmacs = NULL; struct sctp_chunks_param *auth_chunks = NULL; struct sctp_shared_key *null_key; int err; memset(ep, 0, sizeof(struct sctp_endpoint)); ep->digest = k...
1
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
198,083,940,795,556,120,000,000,000,000,000,000,000
124
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static void vmsvga_index_write(void *opaque, uint32_t address, uint32_t index) { struct vmsvga_state_s *s = opaque; s->index = index; }
0
[]
qemu
fa892e9abb728e76afcf27323ab29c57fb0fe7aa
238,701,683,779,996,320,000,000,000,000,000,000,000
6
ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206) Prevent potential integer overflow by limiting 'width' and 'height' to 512x512. Also change 'datasize' type to size_t. Refer to security advisory https://starlabs.sg/advisories/22-4206/ for more information. Fixes: CVE-2021-4206 Signed-off-by: Mauro Matt...
static int parse_ranges(const char *hdr, unsigned long len, struct range **ranges) { int ret = HTTP_BAD_RANGE; struct range *new, *tail = *ranges = NULL; tok_t tok; char *token; if (!len) return HTTP_OK; /* need to know length of representation */ /* we only handle byt...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
47,315,812,759,559,460,000,000,000,000,000,000,000
71
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
void util_print_binary(FILE *f, const u8 *buf, int count) { int i; for (i = 0; i < count; i++) { unsigned char c = buf[i]; const char *format; if (!isprint(c)) format = "\\x%02X"; else format = "%c"; fprintf(f, format, c); } (void) fflush(f); }
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
171,450,955,000,260,570,000,000,000,000,000,000,000
15
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
void CBINDInstallDlg::SetItemStatus(UINT nID, BOOL bSuccess) { GetDlgItem(nID)->SetWindowText(bSuccess == TRUE ? "Done" : "Failed"); }
0
[ "CWE-284" ]
bind9
967a3b9419a3c12b8c0870c86d1ee3840bcbbad7
271,252,216,953,380,150,000,000,000,000,000,000,000
3
[master] quote service registry paths 4532. [security] The BIND installer on Windows used an unquoted service path, which can enable privilege escalation. (CVE-2017-3141) [RT #45229]
int jpc_ppxstab_insert(jpc_ppxstab_t *tab, jpc_ppxstabent_t *ent) { int inspt; int i; for (i = 0; i < tab->numents; ++i) { if (tab->ents[i]->ind > ent->ind) { break; } } inspt = i; if (tab->numents >= tab->maxents) { if (jpc_ppxstab_grow(tab, tab->maxents + 128)) { return -1; } } for (i = tab->...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
194,633,040,314,173,450,000,000,000,000,000,000,000
26
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int rtecp_verify(sc_card_t *card, unsigned int type, int ref_qualifier, const u8 *data, size_t data_len, int *tries_left) { sc_apdu_t apdu; int r, send_logout = 0; (void)type; /* no warning */ assert(card && card->ctx && data); for (;;) { sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x20, 0, ...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
108,123,519,482,047,550,000,000,000,000,000,000,000
37
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
g_file_hash (gconstpointer file) { GFileIface *iface; g_return_val_if_fail (G_IS_FILE (file), 0); iface = G_FILE_GET_IFACE (file); return (* iface->hash) ((GFile *)file); }
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
262,229,142,206,831,680,000,000,000,000,000,000,000
10
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
void Errors::Add(int error) { ThreadError add; add.errorID_ = error; add.threadID_ = GetSelf(); Remove(); // may have old error Lock guard(mutex_); list_.push_back(add); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
249,145,944,797,815,350,000,000,000,000,000,000,000
11
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
TEST_F(BrotliDecompressorImplTest, CompressDecompressOfMultipleSlices) { Buffer::OwnedImpl buffer; Buffer::OwnedImpl accumulation_buffer; const std::string sample{"slice, slice, slice, slice, slice, "}; std::string original_text; for (uint64_t i = 0; i < 20; ++i) { Buffer::BufferFragmentImpl* frag = new ...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
87,305,355,187,138,370,000,000,000,000,000,000,000
42
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int DsaKeyIntsToDer(DsaKey* key, byte* output, word32 inLen, int ints, int includeVersion) { word32 seqSz = 0, verSz = 0, rawLen, intTotalLen = 0; word32 sizes[DSA_INTS]; int i, j, outLen, ret = 0, mpSz; byte seq[MAX_SEQ_SZ]; byte ver[MAX_VERSION_SZ]; byte...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
264,673,458,603,605,050,000,000,000,000,000,000,000
70
OCSP: improve handling of OCSP no check extension
ResourceLimit& openConnections() override { return connection_resource_; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
283,763,426,745,829,870,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
void HttpHealthCheckerImpl::HttpActiveHealthCheckSession::decodeHeaders( Http::ResponseHeaderMapPtr&& headers, bool end_stream) { ASSERT(!response_headers_); response_headers_ = std::move(headers); if (end_stream) { onResponseComplete(); } }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
200,299,881,845,569,700,000,000,000,000,000,000,000
8
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
inline bool is_error() const { return m_stmt_da->is_error(); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
260,160,796,333,270,750,000,000,000,000,000,000,000
1
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, long deadline) { const uint8_t *data_start = data; const uint8_t *const data_end = data + data_sz; vpx_codec_err_...
0
[ "CWE-125" ]
libvpx
0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88
48,739,748,459,191,950,000,000,000,000,000,000,000
67
vp9: fix OOB read in decoder_peek_si_internal Profile 1 or 3 bitstreams may require 11 bytes for the header in the intra-only case. Additionally add a check on the bit reader's error handler callback to ensure it's non-NULL before calling to avoid future regressions. This has existed since at least (pre-1.4.0): 09bf...
static void fuse_interrupt(fuse_req_t req, void *d_) { struct fuse_intr_data *d = d_; struct fuse *f = req_fuse(req); if (d->id == pthread_self()) return; pthread_mutex_lock(&f->lock); while (!d->finished) { struct timeval now; struct timespec timeout; pthread_kill...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
234,424,412,871,011,120,000,000,000,000,000,000,000
21
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
acl_to_ac(sc_file_t *file, unsigned int op, u8 *ac) { const sc_acl_entry_t *acl; unsigned int npins = 0; ac[0] = ac[1] = 0; if ((acl = sc_file_get_acl_entry(file, op)) == NULL) return; assert(acl->method != SC_AC_UNKNOWN); switch (acl->method) { case SC_AC_NEVER: ac[0] = 0xC0; return; case SC_AC_NONE: ...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
318,032,217,894,441,350,000,000,000,000,000,000,000
34
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static int ebt_buf_count(struct ebt_entries_buf_state *state, unsigned int sz) { state->buf_kern_offset += sz; return state->buf_kern_offset >= sz ? 0 : -EINVAL; }
0
[ "CWE-787" ]
linux
b71812168571fa55e44cdd0254471331b9c4c4c6
13,291,069,855,276,192,000,000,000,000,000,000,000
5
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets We need to make sure the offsets are not out of range of the total size. Also check that they are in ascending order. The WARN_ON triggered by syzkaller (it sets panic_on_warn) is changed to also bail out, no point in continuing parsing. Briefly tested...
double val_real() { illegal_method_call((const char*)"val"); return 0; };
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
89,514,443,483,603,590,000,000,000,000,000,000,000
5
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
read_2007_section_header (Bit_Chain *restrict dat, Bit_Chain *restrict hdl_dat, Dwg_Data *restrict dwg, r2007_section *restrict sections_map, r2007_page *restrict pages_map) { Bit_Chain sec_dat = { 0 }, str_dat = { 0 }; int error; LOG_T...
0
[ "CWE-787" ]
libredwg
45d2a290c65ed691be0901ba2b2ef51044e07a16
305,501,186,603,044,870,000,000,000,000,000,000,000
56
decode_r2007: fix for invalid section size See GH #350. With fuzzing section->data_size might not fit section_page->uncomp_size.
unsigned int get_random_int(void) { struct keydata *keyptr; __u32 *hash = get_cpu_var(get_random_int_hash); int ret; keyptr = get_keyptr(); hash[0] += current->pid + jiffies + get_cycles() + (int)(long)&ret; ret = half_md4_transform(hash, keyptr->secret); put_cpu_var(get_random_int_hash); return ret; }
0
[ "CWE-310" ]
linux-2.6
8a0a9bd4db63bc45e3017bedeafbd88d0eb84d02
134,018,116,402,125,490,000,000,000,000,000,000,000
14
random: make get_random_int() more random It's a really simple patch that basically just open-codes the current "secure_ip_id()" call, but when open-coding it we now use a _static_ hashing area, so that it gets updated every time. And to make sure somebody can't just start from the same original seed of all-zeroes, a...
f_simplify(typval_T *argvars, typval_T *rettv) { char_u *p; if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL) return; p = tv_get_string_strict(&argvars[0]); rettv->vval.v_string = vim_strsave(p); simplify_filename(rettv->vval.v_string); // simplify in place rettv->v_type = VAR_...
0
[ "CWE-122" ]
vim
615ddd5342b50a6878a907062aa471740bd9a847
261,032,614,916,197,130,000,000,000,000,000,000,000
12
patch 8.2.3611: crash when using CTRL-W f without finding a file name Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero.
BrotliDecoderErrorCode BrotliDecoderGetErrorCode(const BrotliDecoderState* s) { return (BrotliDecoderErrorCode)s->error_code; }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
91,946,824,377,622,540,000,000,000,000,000,000,000
3
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
extglob_skipname (pat, dname, flags) char *pat, *dname; int flags; { char *pp, *pe, *t, *se; int n, r, negate, wild, nullpat; negate = *pat == '!'; wild = *pat == '*' || *pat == '?'; pp = pat + 2; se = pp + strlen (pp) - 1; /* end of string */ pe = glob_patscan (pp, se, 0); /* end of extglob p...
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
253,960,454,908,668,570,000,000,000,000,000,000,000
65
commit bash-20190628 snapshot
CZNC::CZNC() : m_TimeStarted(time(nullptr)), m_eConfigState(ECONFIG_NOTHING), m_vpListeners(), m_msUsers(), m_msDelUsers(), m_Manager(), m_sCurPath(""), m_sZNCPath(""), m_sConfigFile(""), m_sSkinName(""), m_sStatusPrefix(""), m_sPidFile(""), m_...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
256,383,666,094,366,280,000,000,000,000,000,000,000
46
Don't crash if user specified invalid encoding. This is CVE-2019-9917
xmlXPtrGetArity(xmlNodePtr cur) { int i; if (cur == NULL) return(-1); cur = cur->children; for (i = 0;cur != NULL;cur = cur->next) { if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTML_DOCUMENT_NODE)) { i++; } } return(i); }
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
289,643,992,244,449,980,000,000,000,000,000,000,000
14
Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
readconf_readfixed(const uschar *s, int terminator) { int yield = 0; int value, count; if (!isdigit(*s)) return -1; (void)sscanf(CS s, "%d%n", &value, &count); s += count; yield = value * 1000; if (*s == '.') { int m = 100; while (isdigit((*(++s)))) { yield += (*s - '0') * m; m /= 10; } } retu...
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
248,985,097,995,636,000,000,000,000,000,000,000,000
20
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
ref_param_write_string_value(ref * pref, const gs_param_string * pvalue, gs_ref_memory_t *imem) { const byte *pdata = pvalue->data; uint n = pvalue->size; if (pvalue->persistent) make_const_string(pref, a_readonly | avm_foreign, n, pdata); else { byte *pstr ...
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
58,690,885,448,679,510,000,000,000,000,000,000,000
19
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
parse_SET_IP_TTL(char *arg, const struct ofpact_parse_params *pp) { uint8_t ttl; char *error; error = str_to_u8(arg, "TTL", &ttl); if (error) { return error; } ofpact_put_SET_IP_TTL(pp->ofpacts)->ttl = ttl; return NULL; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
172,615,554,548,940,260,000,000,000,000,000,000,000
14
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb, const struct nlmsghdr *nlh, struct netlink_dump_control *control) { struct netlink_callback *cb; struct sock *sk; struct netlink_sock *nlk; int ret; atomic_inc(&skb->users); sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(sk...
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
45,312,715,532,165,830,000,000,000,000,000,000,000
66
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
func_ptr_ref(ufunc_T *fp) { if (fp != NULL) ++fp->uf_refcount; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
128,828,896,009,243,400,000,000,000,000,000,000,000
5
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
*/ PHP_FUNCTION(timezone_identifiers_list) { const timelib_tzdb *tzdb; const timelib_tzdb_index_entry *table; int i, item_count; long what = PHP_DATE_TIMEZONE_GROUP_ALL; char *option = NULL; int ...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
331,260,843,484,248,140,000,000,000,000,000,000,000
35
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) { int type, olen; unsigned long val; /* Use sane default values in case a misbehaving remote device * did not send an RFC or extended window size option. */ u16 txwin_ext = chan->ack_win; struct l2cap_conf_rfc rfc = { .mode = chan->m...
1
[ "CWE-125" ]
linux
7c9cbd0b5e38a1672fcd137894ace3b042dfbf69
259,892,696,851,683,530,000,000,000,000,000,000,000
53
Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer The function l2cap_get_conf_opt will return L2CAP_CONF_OPT_SIZE + opt->len as length value. The opt->len however is in control over the remote user and can be used by an attacker to gain access beyond the bounds of the actual packet. To prevent an...
static long kvm_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm *kvm = filp->private_data; void __user *argp = (void __user *)arg; int r; if (kvm->mm != current->mm) return -EIO; switch (ioctl) { case KVM_CREATE_VCPU: r = kvm_vm_ioctl_create_vcpu(kvm, arg); break; cas...
0
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
247,087,096,162,755,520,000,000,000,000,000,000,000
188
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...
static void __maybe_unused update_runtime_enabled(struct rq *rq) { struct task_group *tg; lockdep_assert_held(&rq->lock); rcu_read_lock(); list_for_each_entry_rcu(tg, &task_groups, list) { struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)]; raw_spin_lock(&cfs_b...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
214,327,720,674,289,500,000,000,000,000,000,000,000
17
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...
static char *php_gethostbyaddr(char *ip) { #if HAVE_IPV6 && HAVE_INET_PTON struct in6_addr addr6; #endif struct in_addr addr; struct hostent *hp; #if HAVE_IPV6 && HAVE_INET_PTON if (inet_pton(AF_INET6, ip, &addr6)) { hp = gethostbyaddr((char *) &addr6, sizeof(addr6), AF_INET6); } else if (inet_pton(AF_INET, ip,...
0
[ "CWE-119", "CWE-787" ]
php-src
2fefae47716d501aec41c1102f3fd4531f070b05
24,895,790,419,670,596,000,000,000,000,000,000,000
32
Fixed Sec Bug #67717 segfault in dns_get_record CVE-2014-3597 Incomplete fix for CVE-2014-4049 Check possible buffer overflow - pass real buffer end to dn_expand calls - check buffer len before each read
rb_glob(const char *path, void (*func)(const char *, VALUE, void *), VALUE arg) { int status = rb_glob2(path, 0, func, arg, rb_ascii8bit_encoding()); if (status) GLOB_JUMP_TAG(status); }
0
[ "CWE-22" ]
ruby
143eb22f1877815dd802f7928959c5f93d4c7bb3
79,637,039,110,448,150,000,000,000,000,000,000,000
5
merge revision(s) 62989: dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c...
packet_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); int ret; if (level != SOL_PACKET) return -ENOPROTOOPT; switch (optname) { case PACKET_ADD_MEMBERSHIP: case PACKET_DROP_MEMBERSHIP: { s...
1
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
169,782,901,318,501,470,000,000,000,000,000,000,000
211
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...
static struct sock *ncp_connection_hack(struct ipx_interface *intrfc, struct ipxhdr *ipx) { /* The packet's target is a NCP connection handler. We want to hand it * to the correct socket directly within the kernel, so that the * mars_nwe packet distribution process does not have to do it. Here we * only car...
0
[ "CWE-416" ]
linux
ee0d8d8482345ff97a75a7d747efc309f13b0d80
36,783,793,864,792,016,000,000,000,000,000,000,000
35
ipx: call ipxitf_put() in ioctl error path We should call ipxitf_put() if the copy_to_user() fails. Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu, struct kvm_device_attr *attr) { int ret; switch (attr->group) { case KVM_ARM_VCPU_PMU_V3_CTRL: ret = kvm_arm_pmu_v3_set_attr(vcpu, attr); break; case KVM_ARM_VCPU_TIMER_CTRL: ret = kvm_arm_timer_set_attr(vcpu, attr); break; default: ret = -...
0
[ "CWE-20" ]
linux
d26c25a9d19b5976b319af528886f89cf455692d
288,867,477,804,938,300,000,000,000,000,000,000,000
19
arm64: KVM: Tighten guest core register access from userspace We currently allow userspace to access the core register file in about any possible way, including straddling multiple registers and doing unaligned accesses. This is not the expected use of the ABI, and nobody is actually using it that way. Let's tighten ...
int imap_create_mailbox (IMAP_DATA* idata, char* mailbox) { char buf[LONG_STRING], mbox[LONG_STRING]; imap_munge_mbox_name (idata, mbox, sizeof (mbox), mailbox); snprintf (buf, sizeof (buf), "CREATE %s", mbox); if (imap_exec (idata, buf, 0) != 0) { mutt_error (_("CREATE failed: %s"), imap_cmd_trailer (i...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
328,430,969,947,225,750,000,000,000,000,000,000,000
15
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
GC_API void GC_CALL GC_dump(void) { GC_printf("***Static roots:\n"); GC_print_static_roots(); GC_printf("\n***Heap sections:\n"); GC_print_heap_sects(); GC_printf("\n***Free blocks:\n"); GC_print_hblkfreelist(); GC_printf("\n***Blocks in use:\n"); GC_print_block_list(); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
108,806,481,910,216,800,000,000,000,000,000,000,000
11
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static int audit_null_notify(MYSQL_THD thd, mysql_event_class_t event_class, const void *event) { char buffer[2000]= { 0, }; int buffer_data= 0; unsigned long event_subclass= (unsigned long)*(int *)event; const char *order_str= (const char *)THDVAR(thd, ...
0
[]
mysql-server
914590c737dab0e3e7d9f023aef4c704a443ed7f
55,687,777,126,489,410,000,000,000,000,000,000,000
353
Bug#24493829 SETTING THE NULL_AUDIT_EVENT_RECORD CAUSES SEGMENTATION FAULT Post-push fix. Memory leak fixed (reported by Valgrind).
static void init_vmcs(struct vcpu_vmx *vmx) { if (nested) nested_vmx_set_vmcs_shadowing_bitmap(); if (cpu_has_vmx_msr_bitmap()) vmcs_write64(MSR_BITMAP, __pa(vmx->vmcs01.msr_bitmap)); vmcs_write64(VMCS_LINK_POINTER, -1ull); /* 22.3.1.5 */ /* Control */ pin_controls_set(vmx, vmx_pin_based_exec_ctrl(vmx)); ...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
237,227,657,226,468,130,000,000,000,000,000,000,000
91
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...
bool pk_equals(ACL_PROXY_USER *grant) { DBUG_ENTER("pk_equals"); DBUG_PRINT("info", ("strcmp(%s,%s) &&" "strcmp(%s,%s) &&" "wild_compare (%s,%s) &&" "wild_compare (%s,%s)", user ? user : "<NULL>", ...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
248,838,700,355,129,140,000,000,000,000,000,000,000
23
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
int jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg) { int i; int newmaxpchgs; jpc_pchg_t **newpchgs; if (pchgno < 0) { pchgno = pchglist->numpchgs; } if (pchglist->numpchgs >= pchglist->maxpchgs) { newmaxpchgs = pchglist->maxpchgs + 128; if (!(newpchgs = jas_realloc2(pchglist->pc...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
304,433,595,447,743,200,000,000,000,000,000,000,000
24
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int casecmp(const void* _a, const void * _b) { const RAnalCaseOp* a = _a; const RAnalCaseOp* b = _b; return a->addr != b->addr; }
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
157,024,407,608,161,630,000,000,000,000,000,000,000
5
Fix segfault in adf (#16230)
mrb_full_gc(mrb_state *mrb) { mrb_gc *gc = &mrb->gc; if (!mrb->c) return; if (gc->disabled || gc->iterating) return; GC_INVOKE_TIME_REPORT("mrb_full_gc()"); GC_TIME_START; if (is_generational(gc)) { /* clear all the old objects back to young */ clear_all_old(mrb, gc); gc->full = TRUE; } e...
0
[ "CWE-415" ]
mruby
97319697c8f9f6ff27b32589947e1918e3015503
297,425,690,960,572,700,000,000,000,000,000,000,000
30
Cancel 9cdf439 Should not free the pointer in `realloc` since it can cause use-after-free problem.