func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int php_openssl_parse_config(struct php_x509_request * req, zval * optional_args TSRMLS_DC) /* {{{ */ { char * str; zval ** item; SET_OPTIONAL_STRING_ARG("config", req->config_filename, default_ssl_conf_filename); SET_OPTIONAL_STRING_ARG("config_section_name", req->section_name, "req"); req->global_config ...
0
[ "CWE-200" ]
php-src
270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
117,618,514,745,299,080,000,000,000,000,000,000,000
75
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
*/ private int mconvert(struct magic_set *ms, struct magic *m, int flip) { union VALUETYPE *p = &ms->ms_value; switch (cvt_flip(m->type, flip)) { case FILE_BYTE: cvt_8(p, m); return 1; case FILE_SHORT: cvt_16(p, m); return 1; case FILE_LONG: case FILE_DATE: case FILE_LDATE: cvt_32(p, m); return 1; ...
0
[ "CWE-755" ]
file
3c081560c23f20b2985c285338b52c7aae9fdb0f
214,762,406,570,424,060,000,000,000,000,000,000,000
132
prevent infinite recursion.
static bool fixed_msr_to_range(u32 msr, u64 *start, u64 *end) { int seg, unit; if (!fixed_msr_to_seg_unit(msr, &seg, &unit)) return false; fixed_mtrr_seg_unit_range(seg, unit, start, end); return true; }
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
141,312,836,869,991,000,000,000,000,000,000,000,000
10
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
void TDStretch::clear() { outputBuffer.clear(); clearInput(); }
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
293,278,411,676,382,600,000,000,000,000,000,000,000
5
Replaced illegal-number-of-channel assertions with run-time exception
static struct rmap_item *get_next_rmap_item(struct mm_slot *mm_slot, struct rmap_item **rmap_list, unsigned long addr) { struct rmap_item *rmap_item; while (*rmap_list) { rmap_item = *rmap_list; if ((rmap_item->address & PAGE_MASK) == addr) return rmap_item; if (rmap_item->address > addr) ...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
68,999,161,236,949,330,000,000,000,000,000,000,000
27
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
int main() { gdImagePtr im1, im2; FILE *fp; int size; fp = gdTestFileOpen2("webp", "bug_double_free.jpg"); gdTestAssert(fp != NULL); im1 = gdImageCreateFromJpeg(fp); gdTestAssert(im1 != NULL); fclose(fp); im2 = gdImageWebpPtr(im1, &size); gdTestAssert(im2 == NULL); gdImage...
0
[ "CWE-415" ]
libgd
a49feeae76d41959d85ee733925a4cf40bac61b2
279,211,445,658,548,000,000,000,000,000,000,000,000
19
Fix double-free in gdImageWebPtr() The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and the other WebP output functions to do the real work) does not return whether it succeeded or failed, so this is not checked in gdImageWebpPtr() and the function wrongly assumes everything is okay, which is no...
set_up_new_line (new_line) char *new_line; { int old_point, at_end; old_point = rl_point; at_end = rl_point == rl_end; /* If the line was history and alias expanded, then make that be one thing to undo. */ maybe_make_readline_line (new_line); free (new_line); /* Place rl_point where we think ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
101,976,648,493,882,860,000,000,000,000,000,000,000
23
Bash-4.4 patch 7
static int do_ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen) { struct inet_sock *inet = inet_sk(sk); int val = 0, err; if (((1<<optname) & ((1<<IP_PKTINFO) | (1<<IP_RECVTTL) | (1<<IP_RECVOPTS) | (1<<IP_RECVTOS) | (1<<IP_RETOPTS) | (1<<IP_TOS) ...
1
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
117,126,148,898,027,260,000,000,000,000,000,000,000
524
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 struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size, int pages) { struct port_buffer *buf; reclaim_dma_bufs(); /* * Allocate buffer and the sg list. The sg list array is allocated * directly after the port_buffer struct. */ buf = kmalloc(sizeof(*buf) + sizeof(struct scatterli...
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
29,165,620,862,738,040,000,000,000,000,000,000,000
58
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
static canon_ace *dup_canon_ace( canon_ace *src_ace) { canon_ace *dst_ace = SMB_MALLOC_P(canon_ace); if (dst_ace == NULL) return NULL; *dst_ace = *src_ace; dst_ace->prev = dst_ace->next = NULL; return dst_ace; }
0
[ "CWE-264" ]
samba
d6c28913f3109d1327a3d1369b6eafd3874b2dca
128,193,764,698,414,540,000,000,000,000,000,000,000
11
Bug 6488: acl_group_override() call in posix acls references an uninitialized variable. (cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad)
parse_GOTO_TABLE(char *arg, const struct ofpact_parse_params *pp) { struct ofpact_goto_table *ogt = ofpact_put_GOTO_TABLE(pp->ofpacts); if (!ofputil_table_from_string(arg, pp->table_map, &ogt->table_id)) { return xasprintf("unknown table \"%s\"", arg); } return NULL; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
257,472,642,035,954,400,000,000,000,000,000,000,000
8
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...
static int cmd_start(struct ImapAccountData *adata, const char *cmdstr, ImapCmdFlags flags) { int rc; if (adata->status == IMAP_FATAL) { cmd_handle_fatal(adata); return -1; } if (cmdstr && ((rc = cmd_queue(adata, cmdstr, flags)) < 0)) return rc; if (flags & IMAP_CMD_QUEUE) return 0; if...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
86,302,678,581,945,300,000,000,000,000,000,000,000
29
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages) { mm->total_vm += npages; if (is_exec_mapping(flags)) mm->exec_vm += npages; else if (is_stack_mapping(flags)) mm->stack_vm += npages; else if (is_data_mapping(flags)) mm->data_vm += npages; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
319,267,416,603,368,650,000,000,000,000,000,000,000
11
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int sctp_eat_data(const struct sctp_association *asoc, struct sctp_chunk *chunk, sctp_cmd_seq_t *commands) { sctp_datahdr_t *data_hdr; struct sctp_chunk *err; size_t datalen; sctp_verb_t deliver; int tmp; __u32 tsn; int account_value; struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.ts...
0
[]
linux-2.6
7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5
278,072,552,257,414,700,000,000,000,000,000,000,000
213
[SCTP]: Allow spillover of receive buffer to avoid deadlock. This patch fixes a deadlock situation in the receive path by allowing temporary spillover of the receive buffer. - If the chunk we receive has a tsn that immediately follows the ctsn, accept it even if we run out of receive buffer space and renege data wi...
sig_handler handle_sigint(int sig) { char kill_buffer[40]; MYSQL *kill_mysql= NULL; /* terminate if no query being executed, or we already tried interrupting */ /* terminate if no query being executed, or we already tried interrupting */ if (!executing_query || (interrupted_query == 2)) { tee_fprintf(s...
0
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
56,571,971,031,070,385,000,000,000,000,000,000,000
53
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
__xfrm_state_locate(struct xfrm_state *x, int use_spi, int family) { struct net *net = xs_net(x); u32 mark = x->mark.v & x->mark.m; if (use_spi) return __xfrm_state_lookup(net, mark, &x->id.daddr, x->id.spi, x->id.proto, family); else return __xfrm_state_lookup_byaddr(net, mark, &x->id.daddr, ...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
305,474,352,909,178,170,000,000,000,000,000,000,000
14
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
flatpak_run_add_session_dbus_args (GPtrArray *argv_array, char ***envp_p, GPtrArray *dbus_proxy_argv, gboolean unrestricted) { const char *dbus_address = g_getenv ("DBUS_SESSION_BUS_ADDRESS"); char *dbus_se...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
335,509,302,706,152,760,000,000,000,000,000,000,000
44
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
static int hns_roce_modify_device(struct ib_device *ib_dev, int mask, struct ib_device_modify *props) { unsigned long flags; if (mask & ~IB_DEVICE_MODIFY_NODE_DESC) return -EOPNOTSUPP; if (mask & IB_DEVICE_MODIFY_NODE_DESC) { spin_lock_irqsave(&to_hr_dev(ib_dev)->sm_lock, flags); memcpy(ib_dev->node_de...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
204,220,544,895,739,300,000,000,000,000,000,000,000
16
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
panel_set_option(struct parsed_tagarg *arg) { FILE *f = NULL; char *p; Str s = Strnew(), tmp; if (config_file == NULL) { disp_message("There's no config file... config not saved", FALSE); } else { f = fopen(config_file, "wt"); if (f == NULL) { disp_message("Can't write option!", FALSE);...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
323,528,811,430,958,750,000,000,000,000,000,000,000
34
Make temporary directory safely when ~/.w3m is unwritable
} static inline void set_bitmap_uptodate(struct buffer_head *bh) { set_bit(BH_BITMAP_UPTODATE, &(bh)->b_state);
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
102,705,094,378,407,880,000,000,000,000,000,000,000
4
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...
signed_time_secs_to_str(wmem_allocator_t *scope, const gint32 time_val) { wmem_strbuf_t *buf; if (time_val == 0) { return wmem_strdup(scope, "0 seconds"); } buf = wmem_strbuf_sized_new(scope, TIME_SECS_LEN+1, TIME_SECS_LEN+1); signed_time_secs_to_str_buf(time_val, 0, FALSE, buf); return wmem_strbuf_finalize...
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
78,969,035,083,527,060,000,000,000,000,000,000,000
14
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
__acquires(ax25_list_lock) { spin_lock_bh(&ax25_list_lock); return seq_hlist_start(&ax25_list, *pos); }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
317,685,847,448,464,950,000,000,000,000,000,000,000
5
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
uint64_t reservableSize() const { ASSERT(capacity_ >= reservable_); return capacity_ - reservable_; }
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
98,515,095,324,785,900,000,000,000,000,000,000,000
4
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
lyd_hash(struct lyd_node *node) { struct lyd_node *iter; int i; assert(!node->hash || ((node->schema->nodetype == LYS_LIST) && !((struct lys_node_list *)node->schema)->keys_size)); if ((node->schema->nodetype != LYS_LIST) || lyd_list_has_keys(node)) { node->hash = dict_hash_multi(0, lyd_node_m...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
74,837,399,276,302,320,000,000,000,000,000,000,000
31
schema tree BUGFIX do not check features while still resolving schema Fixes #723
AP4_HvccAtom::WriteFields(AP4_ByteStream& stream) { return stream.Write(m_RawBytes.GetData(), m_RawBytes.GetDataSize()); }
0
[ "CWE-125", "CWE-787" ]
Bento4
53499d8d4c69142137c7c7f0097a444783fdeb90
107,423,389,278,531,120,000,000,000,000,000,000,000
4
fix for #188
bool is_dispatching(JSObject *self) { MOZ_ASSERT(is_instance(self)); return JS::GetReservedSlot(self, Slots::Dispatch).toBoolean(); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
46,629,251,476,691,310,000,000,000,000,000,000,000
4
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
static inline void kvm_arch_free_vm(struct kvm *kvm) { kfree(kvm); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
199,637,661,788,392,800,000,000,000,000,000,000,000
4
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
virtual int prepare_encryption(map<string, bufferlist>& attrs) { return 0; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
262,477,559,745,213,920,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
vg_virgl_init(VuGpu *g) { int ret; if (g->drm_rnode_fd && virgl_cbs.version == 1) { g_warning("virgl will use the default rendernode"); } ret = virgl_renderer_init(g, VIRGL_RENDERER_USE_EGL | VIRGL_RENDERER_THREAD_SYNC, ...
0
[]
qemu
f6091d86ba9ea05f4e111b9b42ee0005c37a6779
153,000,019,927,615,200,000,000,000,000,000,000,000
24
vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' (CVE-2021-3544) The 'res->iov' will be leaked if the guest trigger following sequences: virgl_cmd_create_resource_2d virgl_resource_attach_backing virgl_cmd_resource_unref This patch fixes this. Fixes: CVE-2021-3544 Reported-by: Li Qiang <liq3ea@163.c...
static int _hostsock_fcntl(oe_fd_t* sock_, int cmd, uint64_t arg) { int ret = -1; sock_t* sock = _cast_sock(sock_); void* argout = NULL; uint64_t argsize = 0; oe_errno = 0; if (!sock) OE_RAISE_ERRNO(OE_EINVAL); switch (cmd) { case OE_F_GETFD: case OE_F_SETFD: ...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
26,564,161,759,943,580,000,000,000,000,000,000,000
59
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
create_type_kind_type(agooErr err) { const char *choices[] = { "SCALAR", "OBJECT", "INTERFACE", "UNION", "ENUM", "INPUT_OBJECT", "LIST", "NON_NULL", NULL }; const char **cp; gqlType type; if (NULL == (type = gql_enum_create(err, "__TypeKind", NULL, 0))) { return err->code; } type-...
0
[ "CWE-703" ]
agoo
ecb72fa66f3d846b724b4fa1d7648669cebabe0c
94,502,551,032,962,660,000,000,000,000,000,000,000
27
Protect against recursive fragment in schema Really a error on the developers part but this catches the error.
test_bson_validate (void) { char filename[64]; size_t offset; bson_t *b; int i; bson_error_t error; for (i = 1; i <= 38; i++) { bson_snprintf (filename, sizeof filename, "test%u.bson", i); b = get_bson (filename); BSON_ASSERT (bson_validate (b, BSON_VALIDATE_NONE, &offset)); b...
1
[ "CWE-125" ]
mongo-c-driver
0d9a4d98bfdf4acd2c0138d4aaeb4e2e0934bd84
106,871,145,300,241,900,000,000,000,000,000,000,000
178
Fix for CVE-2018-16790 -- Verify bounds before binary length read. As reported here: https://jira.mongodb.org/browse/CDRIVER-2819, a heap overread occurs due a failure to correctly verify data bounds. In the original check, len - o returns the data left including the sizeof(l) we just read. Instead, the comparison sh...
static CImg<T> vector(const T& a0, const T& a1, const T& a2, const T& a3, const T& a4, const T& a5, const T& a6, const T& a7, const T& a8, const T& a9, const T& a10, const T& a11, const T& a12, const T& a13) { CImg<T> r(1,14); ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
338,624,573,017,663,800,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int tcf_qevent_init(struct tcf_qevent *qe, struct Qdisc *sch, enum flow_block_binder_type binder_type, struct nlattr *block_index_attr, struct netlink_ext_ack *extack) { u32 block_index; int err; if (!block_index_attr) return 0; err = tcf_qevent_parse_block_index(block_index_attr, &block_index...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
277,924,071,332,820,040,000,000,000,000,000,000,000
25
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
ipmi_sdr_get_unit_string(bool pct, uint8_t relation, uint8_t base, uint8_t modifier) { /* * Twice as long as the longest possible unit name, plus * two characters for '%' and relation (either '*' or '/'), * plus the terminating null-byte. */ static char unitstr[2 * UNIT_TYPE_LONGEST_N...
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
10,948,942,532,638,058,000,000,000,000,000,000,000
57
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
static void kvm_clock_sync_scb(struct kvm_s390_sie_block *scb, u64 delta) { u8 delta_idx = 0; /* * The TOD jumps by delta, we have to compensate this by adding * -delta to the epoch. */ delta = -delta; /* sign-extension - we're adding to signed values below */ if ((s64)delta < 0) delta_idx = -1; scb->e...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
248,537,156,101,714,080,000,000,000,000,000,000,000
21
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst) { #ifdef XSLT_REFACTORED xsltStyleItemVariablePtr comp; #else xsltStylePreCompPtr comp; #endif if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE)) return; #ifdef XSLT_REFACTORED comp = (xsltStyleItemVariablePtr) xsltNe...
0
[]
libxslt
7ca19df892ca22d9314e95d59ce2abdeff46b617
319,645,859,553,665,060,000,000,000,000,000,000,000
70
Fix for type confusion in preprocessing attributes CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10 We need to check that the parent node is an element before dereferencing its namespace
static void auth_exit_ev(const void *event_data, void *user_data) { /* Close the scoreboard descriptor that we opened. */ (void) pr_close_scoreboard(FALSE); }
0
[ "CWE-59", "CWE-61" ]
proftpd
ecff21e0d0e84f35c299ef91d7fda088e516d4ed
165,233,276,412,306,470,000,000,000,000,000,000,000
4
Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks is off, to 1.3.5 branch.
static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header, int header_size) { int len; short wave_format; GetByteContext gb; bytestream2_init(&gb, header, header_size); if (bytestream2_get_le32(&gb) != MKTAG('R', 'I', 'F', 'F')) { av_log(avctx...
0
[ "CWE-703" ]
FFmpeg
1713eec29add37b654ec6bf262b843d139c1ffc6
126,589,998,163,332,900,000,000,000,000,000,000,000
63
shorten: pad the internal bitstream buffer Fixes invalid reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
GF_Err mhap_box_read(GF_Box *s,GF_BitStream *bs) { u32 i; GF_MHACompatibleProfilesBox *ptr = (GF_MHACompatibleProfilesBox *) s; ISOM_DECREASE_SIZE(s, 1) ptr->num_profiles = gf_bs_read_u8(bs); if (!ptr->num_profiles) return GF_OK; ISOM_DECREASE_SIZE(s, ptr->num_profiles) ptr->compat_profiles = gf_malloc(sizeof...
0
[ "CWE-476", "CWE-787" ]
gpac
b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8
268,455,422,887,715,580,000,000,000,000,000,000,000
17
fixed #1757
void bio_clone_blkcg_association(struct bio *dst, struct bio *src) { if (src->bi_css) WARN_ON(bio_associate_blkcg(dst, src->bi_css)); }
0
[ "CWE-772", "CWE-787" ]
linux
95d78c28b5a85bacbc29b8dba7c04babb9b0d467
165,428,231,615,207,870,000,000,000,000,000,000,000
5
fix unbalanced page refcounting in bio_map_user_iov bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if IO vector has small consecutive buffers belonging to the same page. bio_add_pc_page merges them into one, but the page reference is never dropped. Cc: stable@vger.kernel.org Signed-off-by: Vitaly...
static void spl_array_it_get_current_key(zend_object_iterator *iter, zval *key TSRMLS_DC) /* {{{ */ { spl_array_it *iterator = (spl_array_it *)iter; spl_array_object *object = iterator->object; HashTable *aht = spl_array_get_hash_table(object, 0 TSRMLS_CC); if (object->ar_flags & SPL_ARRAY_...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
206,408,390,129,767,800,000,000,000,000,000,000,000
16
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
static int __io_recvmsg_copy_hdr(struct io_kiocb *req, struct io_async_msghdr *iomsg) { struct io_sr_msg *sr = &req->sr_msg; struct iovec __user *uiov; size_t iov_len; int ret; ret = __copy_msghdr_from_user(&iomsg->msg, sr->umsg, &iomsg->uaddr, &uiov, &iov_len); if (ret) return ret; if (req->flags ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
70,648,289,248,231,990,000,000,000,000,000,000,000
31
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...
skip_multibyte_char (char c) { /* bogus if to get rid of unused compiler warning */ if (c) return 0; else return 0; }
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
198,663,045,677,840,870,000,000,000,000,000,000,000
8
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
static int verify_newpolicy_info(struct xfrm_userpolicy_info *p) { int ret; switch (p->share) { case XFRM_SHARE_ANY: case XFRM_SHARE_SESSION: case XFRM_SHARE_USER: case XFRM_SHARE_UNIQUE: break; default: return -EINVAL; } switch (p->action) { case XFRM_POLICY_ALLOW: case XFRM_POLICY_BLOCK: break; ...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
151,084,551,406,973,570,000,000,000,000,000,000,000
53
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
WandExport void DrawComment(DrawingWand *wand,const char *comment) { (void) MVGPrintf(wand,"#%s\n",comment); }
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
173,953,370,238,092,120,000,000,000,000,000,000,000
4
https://github.com/ImageMagick/ImageMagick/issues/716
R_API int r_bin_file_set_bytes(RBinFile *binfile, const ut8 *bytes, ut64 sz, bool steal_ptr) { if (!binfile) { return false; } if (!bytes) { return false; } r_buf_free (binfile->buf); binfile->buf = r_buf_new (); #if LIMIT_SIZE if (sz > 1024 * 1024) { eprintf ("Too big\n"); // TODO: use r_buf_io instead ...
0
[ "CWE-125" ]
radare2
3fcf41ed96ffa25b38029449520c8d0a198745f3
71,514,494,762,031,465,000,000,000,000,000,000,000
24
Fix #9902 - Fix oobread in RBin.string_scan_range
static bool can_skip_alu_sanitation(const struct bpf_verifier_env *env, const struct bpf_insn *insn) { return env->allow_ptr_leaks || BPF_SRC(insn->code) == BPF_K; }
0
[ "CWE-703", "CWE-189" ]
linux
d3bd7413e0ca40b60cf60d4003246d067cafdeda
153,168,298,952,997,680,000,000,000,000,000,000,000
5
bpf: fix sanitation of alu op with pointer / scalar type from different paths While 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") took care of rejecting alu op on pointer when e.g. pointer came from two different map values with different map properties such as value size, Jann reported...
static void svm_load_mmu_pgd(struct kvm_vcpu *vcpu, unsigned long root) { struct vcpu_svm *svm = to_svm(vcpu); bool update_guest_cr3 = true; unsigned long cr3; cr3 = __sme_set(root); if (npt_enabled) { svm->vmcb->control.nested_cr3 = cr3; mark_dirty(svm->vmcb, VMCB_NPT); /* Loading L2's CR3 is handled by e...
0
[ "CWE-835" ]
linux
e72436bc3a5206f95bb384e741154166ddb3202e
174,503,826,787,268,370,000,000,000,000,000,000,000
25
KVM: SVM: avoid infinite loop on NPF from bad address When a nested page fault is taken from an address that does not have a memslot associated to it, kvm_mmu_do_page_fault returns RET_PF_EMULATE (via mmu_set_spte) and kvm_mmu_page_fault then invokes svm_need_emulation_on_page_fault. The default answer there is to re...
dns_message_logpacket(dns_message_t *message, const char *description, isc_logcategory_t *category, isc_logmodule_t *module, int level, isc_mem_t *mctx) { logfmtpacket(message, description, NULL, category, module, &dns_master_style_debug, level, mctx); }
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
183,893,862,771,156,600,000,000,000,000,000,000,000
7
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
__init int intel_pmu_init(void) { union cpuid10_edx edx; union cpuid10_eax eax; union cpuid10_ebx ebx; struct event_constraint *c; unsigned int unused; int version; if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { switch (boot_cpu_data.x86) { case 0x6: return p6_pmu_init(); case 0xb: return...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
80,746,959,927,757,680,000,000,000,000,000,000,000
265
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
process_one(struct conntrack *ct, struct dp_packet *pkt, struct conn_lookup_ctx *ctx, uint16_t zone, bool force, bool commit, long long now, const uint32_t *setmark, const struct ovs_key_ct_labels *setlabel, const struct nat_action_info_t *nat_action_info, ovs...
0
[ "CWE-400" ]
ovs
53c1b8b166f3dd217bc391d707885f789e9ecc49
254,102,074,569,243,500,000,000,000,000,000,000,000
106
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
void CLASS kodak_radc_load_raw() { #ifdef LIBRAW_LIBRARY_BUILD // All kodak radc images are 768x512 if(width>768 || raw_width>768 || height > 512 || raw_height>512 ) throw LIBRAW_EXCEPTION_IO_CORRUPT; #endif static const signed char src[] = { 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, 1,0, 2,1, 3,3, 4,4,...
0
[ "CWE-190" ]
LibRaw
1334647862b0c90b2e8cb2f668e66627d9517b17
168,293,602,675,104,050,000,000,000,000,000,000,000
109
parse_qt: possible integer overflow
static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct mcba_priv *priv = netdev_priv(netdev); struct can_frame *cf = (struct can_frame *)skb->data; struct mcba_usb_ctx *ctx = NULL; struct net_device_stats *stats = &priv->netdev->stats; u16 sid; int err; struct ...
0
[ "CWE-415" ]
linux
04c9b00ba83594a29813d6b1fb8fdc93a3915174
317,212,759,261,231,260,000,000,000,000,000,000,000
64
can: mcba_usb: mcba_usb_start_xmit(): fix double dev_kfree_skb in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analy...
int access_remote_vm(struct mm_struct *mm, unsigned long addr, void *buf, int len, unsigned int gup_flags) { return __access_remote_vm(NULL, mm, addr, buf, len, gup_flags); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
250,970,205,863,329,100,000,000,000,000,000,000,000
5
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
var_exists(char_u *var) { char_u *arg = var; char_u *name; char_u *tofree; typval_T tv; int len = 0; int n = FALSE; // get_name_len() takes care of expanding curly braces name = var; len = get_name_len(&arg, &tofree, TRUE, FALSE); if (len > 0) { if (tofree != NULL) ...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
298,969,456,102,886,100,000,000,000,000,000,000,000
34
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
bool operator() (Halfedge_handle e1, Halfedge_handle e2) const { sort_vertices<T> SORT(*this->sncp()); if(e1->source() != e2->source()) return SORT(e1->source(),e2->source()); return SORT(e1->twin()->source(), e2->twin()->source()); }
0
[ "CWE-125" ]
cgal
5a1ab45058112f8647c14c02f58905ecc597ec76
38,197,987,079,968,390,000,000,000,000,000,000,000
6
Fix Nef_3
list_connections (NMSettings *settings) { NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (settings); if (priv->read_connections_id) { g_source_remove (priv->read_connections_id); priv->read_connections_id = 0; read_connections (NMA_GCONF_SETTINGS (settings)); } return g_slist_copy (priv->co...
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
1,572,899,190,955,990,000,000,000,000,000,000,000
13
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
static void quotad_check_trunc_list(struct gfs2_sbd *sdp) { struct gfs2_inode *ip; while(1) { ip = NULL; spin_lock(&sdp->sd_trunc_lock); if (!list_empty(&sdp->sd_trunc_list)) { ip = list_entry(sdp->sd_trunc_list.next, struct gfs2_inode, i_trunc_list); list_del_init(&ip->i_trunc_list); } spin_unl...
0
[ "CWE-399" ]
linux-2.6
7e619bc3e6252dc746f64ac3b486e784822e9533
17,947,337,973,991,990,000,000,000,000,000,000,000
18
GFS2: Fix writing to non-page aligned gfs2_quota structures This is the upstream fix for this bug. This patch differs from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte value field of the quota. In upstream quota code, we're required to write the entire quota (88 bytes) which can be split across...
static int mct_u232_calculate_baud_rate(struct usb_serial *serial, speed_t value, speed_t *result) { *result = value; if (le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_SITECOM_PID || le16_to_cpu(serial->dev->descriptor.idProduct) == MCT_U232_BELKIN_F5U109_PID) { switch (value) { case 300: ...
0
[ "CWE-703" ]
linux
4e9a0b05257f29cf4b75f3209243ed71614d062e
52,429,342,797,804,740,000,000,000,000,000,000,000
54
USB: mct_u232: add sanity checking in probe An attack using the lack of sanity checking in probe is known. This patch checks for the existence of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org [johan: add error message ] Signed-off-by: Johan Hovold <johan@kern...
Perl_reg_named_buff_iter(pTHX_ REGEXP * const rx, const SV * const lastkey, const U32 flags) { PERL_ARGS_ASSERT_REG_NAMED_BUFF_ITER; PERL_UNUSED_ARG(lastkey); if (flags & RXapif_FIRSTKEY) return reg_named_buff_firstkey(rx, flags); else if (flags & RXapif_NEXTKEY) ...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
315,505,220,804,927,100,000,000,000,000,000,000,000
16
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
load_nameservers_with_getnetworkparams(struct evdns_base *base) { /* Based on MSDN examples and inspection of c-ares code. */ FIXED_INFO *fixed; HMODULE handle = 0; ULONG size = sizeof(FIXED_INFO); void *buf = NULL; int status = 0, r, added_any; IP_ADDR_STRING *ns; GetNetworkParams_fn_t fn; ASSERT_LOCKED(bas...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
291,558,921,551,877,970,000,000,000,000,000,000,000
77
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
uint fast_alter_partition_table(THD *thd, TABLE *table, Alter_info *alter_info, HA_CREATE_INFO *create_info, TABLE_LIST *table_list, char *db, const char *table...
0
[]
server
f305a7ce4bccbd56520d874e1d81a4f29bc17a96
143,793,812,593,080,240,000,000,000,000,000,000,000
398
bugfix: long partition names
static int decode_server_caps(struct xdr_stream *xdr, struct nfs4_server_caps_res *res) { unsigned int savep; uint32_t attrlen, bitmap[3] = {0}; int status; if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) goto xdr_error; if ((status = decode_attr_bitmap(xdr, bitmap)) != 0) goto xdr_error; if ((status = d...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
112,343,841,465,059,230,000,000,000,000,000,000,000
31
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
xps_begin_image(gx_device *dev, const gs_gstate *pgs, const gs_image_t *pim, gs_image_format_t format, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *mem, gx_image_enum_common_t **pinfo) { gx_devic...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
49,824,042,632,915,910,000,000,000,000,000,000,000
249
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
hook_info_get (struct t_weechat_plugin *plugin, const char *info_name, const char *arguments) { struct t_hook *ptr_hook, *next_hook; const char *value; /* make C compiler happy */ (void) plugin; if (!info_name || !info_name[0]) return NULL; hook_exec_start (...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
135,709,983,062,214,280,000,000,000,000,000,000,000
41
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
static void vma_gap_update(struct vm_area_struct *vma) { /* * As it turns out, RB_DECLARE_CALLBACKS_MAX() already created * a callback function that does exactly what we want. */ vma_gap_callbacks_propagate(&vma->vm_rb, NULL); }
0
[ "CWE-787" ]
linux
dcde237319e626d1ec3c9d8b7613032f0fd4663a
66,672,862,320,436,600,000,000,000,000,000,000,000
8
mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() Currently the arm64 kernel ignores the top address byte passed to brk(), mmap() and mremap(). When the user is not aware of the 56-bit address limit or relies on the kernel to return an error, untagging such pointers has the potential to create addres...
parser_parse_for_statement_start (parser_context_t *context_p) /**< context */ { parser_loop_statement_t loop; JERRY_ASSERT (context_p->token.type == LEXER_KEYW_FOR); lexer_next_token (context_p); #if JERRY_ESNEXT bool is_for_await = false; if (context_p->token.type == LEXER_KEYW_AWAIT) { if (JERRY_U...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
234,317,918,031,443,570,000,000,000,000,000,000,000
478
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static bool tcp_tsopt_ecr_before(const struct tcp_sock *tp, u32 when) { return tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && before(tp->rx_opt.rcv_tsecr, when); }
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
272,785,344,883,372,220,000,000,000,000,000,000,000
5
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
static int check_stack_access(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size) { /* Stack accesses must be at a fixed offset, so that we * can determine what type of data were returned. See * check_stack_read(). */ if (!tnum_is_const(reg->var_off)) { char tn_...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
281,614,774,099,869,080,000,000,000,000,000,000,000
24
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
void AOClient::pktPing(AreaData* area, int argc, QStringList argv, AOPacket packet) { // Why does this packet exist // At least Crystal made it useful // It is now used for ping measurement sendPacket("CHECK"); }
0
[ "CWE-703", "CWE-129" ]
akashi
5566cdfedddef1f219aee33477d9c9690bf2f78b
175,931,434,748,367,470,000,000,000,000,000,000,000
7
Fix out of bounds crash on evidence
hek2cstr(HE *he) { /*------------------------- * Unfortunately, while HeUTF8 is true for most things > 256, for values * 128..255 it's not, but perl will treat them as unicode code points if * the utf8 flag is not set ( see The "Unicode Bug" in perldoc perlunicode * for more) * * So if we did the expected...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
269,689,299,229,440,600,000,000,000,000,000,000,000
32
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
NTSTATUS ZeroUnreadableSectors (PDEVICE_OBJECT deviceObject, LARGE_INTEGER startOffset, ULONG size, uint64 *zeroedSectorCount) { NTSTATUS status; ULONG sectorSize; ULONG sectorCount; byte *sectorBuffer = NULL; *zeroedSectorCount = 0; status = GetDeviceSectorSize (deviceObject, &sectorSize); if (!NT_SUCCESS (st...
0
[ "CWE-119", "CWE-787" ]
VeraCrypt
f30f9339c9a0b9bbcc6f5ad38804af39db1f479e
306,809,132,547,906,440,000,000,000,000,000,000,000
41
Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison.
static void test_bitwise_operators() { assert_true_rule( "rule test { condition: 0x55 | 0xAA == 0xFF }", NULL); assert_true_rule( "rule test { condition: ~0xAA ^ 0x5A & 0xFF == (~0xAA) ^ (0x5A & 0xFF) }", NULL); assert_true_rule( "rule test { condition: ~0x55 & 0xFF == 0xAA }", ...
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
218,191,872,679,520,700,000,000,000,000,000,000,000
35
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
static void clear_sockbuf(struct pool *pool) { strcpy(pool->sockbuf, ""); }
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
161,909,040,730,742,650,000,000,000,000,000,000,000
4
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc) { struct sctp_chunk *retval; struct sctp_sackhdr sack; int len; __u32 ctsn; __u16 num_gabs, num_dup_tsns; struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map; ctsn = sctp_tsnmap_get_ctsn(map); SCTP_DEBUG_PRINTK("sackCTSNAck ...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
327,881,371,815,198,500,000,000,000,000,000,000,000
79
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
static void mld_update_qri(struct inet6_dev *idev, const struct mld2_query *mlh2) { /* RFC3810, relevant sections: * - 5.1.3. Maximum Response Code * - 9.3. Query Response Interval */ idev->mc_qri = msecs_to_jiffies(mldv2_mrc(mlh2)); }
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
63,073,799,502,869,410,000,000,000,000,000,000,000
9
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...
static int dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { switch (op) { case ASN1_PKEY_CTRL_PKCS7_SIGN: if (arg1 == 0) { int snid, hnid; X509_ALGOR *alg1, *alg2; PKCS7_SIGNER_INFO_get0_algs(arg2, NULL, &alg1, &alg2); if (alg1 == NULL || alg...
0
[]
openssl
ab4a81f69ec88d06c9d8de15326b9296d7f498ed
324,528,585,784,149,640,000,000,000,000,000,000,000
50
Remove broken DSA private key workarounds. Remove old code that handled various invalid DSA formats in ancient software. This also fixes a double free bug when parsing malformed DSA private keys. Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using libFuzzer. CVE-2016-0705 Reviewed-by: Emilia K...
static int conf__parse_bool(char **token, const char *name, bool *value, char *saveptr) { *token = strtok_r(NULL, " ", &saveptr); if(*token){ if(!strcmp(*token, "false") || !strcmp(*token, "0")){ *value = false; }else if(!strcmp(*token, "true") || !strcmp(*token, "1")){ *value = true; }else{ log__print...
0
[ "CWE-200", "CWE-732", "CWE-254" ]
mosquitto
9097577b49b7fdcf45d30975976dd93808ccc0c4
46,370,819,099,862,500,000,000,000,000,000,000,000
19
Fix acl_file being ignore for default listener if with per_listener_settings Close #1073. Thanks to Jef Driesen. Bug: https://github.com/eclipse/mosquitto/issues/1073
process_value_to_boundary (struct MHD_PostProcessor *pp, size_t *ioffptr, const char *boundary, size_t blen, enum PP_State next_state, enum PP_State next_dash_state) { char *buf = (ch...
0
[ "CWE-120" ]
libmicrohttpd
a110ae6276660bee3caab30e9ff3f12f85cf3241
216,870,675,866,031,500,000,000,000,000,000,000,000
93
fix buffer overflow and add test
static int set_array_info(struct mddev *mddev, mdu_array_info_t *info) { if (info->raid_disks == 0) { /* just setting version number for superblock loading */ if (info->major_version < 0 || info->major_version >= ARRAY_SIZE(super_types) || super_types[info->major_version].name == NULL) { /* maybe t...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
87,878,620,976,229,660,000,000,000,000,000,000,000
71
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
int ext4_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = d_inode(dentry); int error, rc = 0; int orphan = 0; const unsigned int ia_valid = attr->ia_valid; if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) return -EIO; if (unlikely(IS_IMMUTABLE(inode))) return -EPERM; if ...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
93,782,752,138,184,760,000,000,000,000,000,000,000
192
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
rdp_main_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason) { do { if (rdp_loop(deactivated, ext_disc_reason) == False) { g_exit_mainloop = True; } } while (g_exit_mainloop == False); }
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
177,084,420,941,419,970,000,000,000,000,000,000,000
11
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
BitStream::getBitsInt(size_t nbits) { return static_cast<int>( QIntC::to_uint( read_bits(this->p, this->bit_offset, this->bits_available, nbits))); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
223,413,384,475,572,170,000,000,000,000,000,000,000
7
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static js_Ast *multiplicative(js_State *J) { js_Ast *a = unary(J); SAVEREC(); loop: INCREC(); if (jsP_accept(J, '*')) { a = EXP2(MUL, a, unary(J)); goto loop; } if (jsP_accept(J, '/')) { a = EXP2(DIV, a, unary(J)); goto loop; } if (jsP_accept(J, '%')) { a = EXP2(MOD, a, unary(J)); goto loop; } POPREC(); return ...
0
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
295,431,746,533,115,640,000,000,000,000,000,000,000
12
Guard binary expressions from too much recursion.
addr_is_in_cc_list(uint32_t addr, const smartlist_t *cc_list) { country_t country; const char *name; tor_addr_t tar; if (!cc_list) return 0; /* XXXXipv6 */ tor_addr_from_ipv4h(&tar, addr); country = geoip_get_country_by_addr(&tar); name = geoip_get_country_name(country); return smartlist_contains...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
208,432,802,895,307,700,000,000,000,000,000,000,000
14
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
vidtv_s302m_compute_sample_count_from_video(struct vidtv_encoder *e) { struct vidtv_access_unit *sync_au = e->sync->access_units; struct vidtv_access_unit *au = e->access_units; u32 sample_duration_usecs; u32 vau_duration_usecs; u32 s; vau_duration_usecs = USEC_PER_SEC / e->sync->sampling_rate_hz; sample_dur...
0
[ "CWE-476" ]
linux
e6a21a14106d9718aa4f8e115b1e474888eeba44
33,871,423,436,996,150,000,000,000,000,000,000,000
18
media: vidtv: Check for null return of vzalloc As the possible failure of the vzalloc(), e->encoder_buf might be NULL. Therefore, it should be better to check it in order to guarantee the success of the initialization. If fails, we need to free not only 'e' but also 'e->name'. Also, if the allocation for ctx fails, we...
void CL_UpdateVoipGain(const char *idstr, float gain) { if ((*idstr >= '0') && (*idstr <= '9')) { const int id = atoi(idstr); if (gain < 0.0f) gain = 0.0f; if ((id >= 0) && (id < MAX_CLIENTS)) { clc.voipGain[id] = gain; Com_Printf("VoIP: player #%d gain now set to %f\n", id, gain); } } }
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
21,624,968,735,890,373,000,000,000,000,000,000,000
12
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
ecma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */ { JERRY_ASSERT (string_p != NULL); if (ECMA_IS_DIRECT_STRING (string_p)) { return; } ecma_deref_ecma_string_non_direct (string_p); } /* ecma_deref_ecma_string */
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
125,452,842,822,563,960,000,000,000,000,000,000,000
11
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void nfsd_shutdown_net(struct net *net) { struct nfsd_net *nn = net_generic(net, nfsd_net_id); nfs4_state_shutdown_net(net); if (nn->lockd_up) { lockd_down(net); nn->lockd_up = 0; } nn->nfsd_net_up = false; nfsd_shutdown_generic(); }
0
[ "CWE-20" ]
linux
e6838a29ecb484c97e4efef9429643b9851fba6e
231,510,120,625,903,960,000,000,000,000,000,000,000
12
nfsd: check for oversized NFSv2/v3 arguments A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large...
static int lxc_cgroupfs_set(const char *filename, const char *value, const char *name, const char *lxcpath) { char *subsystem = NULL, *p, *path; int ret = -1; subsystem = alloca(strlen(filename) + 1); strcpy(subsystem, filename); if ((p = strchr(subsystem, '.')) != NULL) *p = '\0'; path = lxc_cgroup_get_hiera...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
286,436,562,992,534,250,000,000,000,000,000,000,000
17
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 int bond_set_mac_address(struct net_device *bond_dev, void *addr) { struct bonding *bond = netdev_priv(bond_dev); struct sockaddr *sa = addr, tmp_sa; struct slave *slave, *stop_at; int res = 0; int i; if (bond->params.mode == BOND_MODE_ALB) return bond_alb_set_mac_address(bond_dev, addr); pr_debug("b...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
298,383,424,107,586,300,000,000,000,000,000,000,000
85
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
void blk_put_request(struct request *req) { blk_mq_free_request(req); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
116,707,871,153,348,900,000,000,000,000,000,000,000
4
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
apdu_send_direct (int slot, size_t extended_length, const unsigned char *apdudata, size_t apdudatalen, int handle_more, unsigned char **retbuf, size_t *retbuflen) { #define SHORT_RESULT_BUFFER_SIZE 258 unsigned char short_result_buffer[SHORT_RESULT_BUFFER_SIZE+10]...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
70,736,997,957,263,180,000,000,000,000,000,000,000
214
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static OPJ_BOOL opj_j2k_read_soc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { OPJ_BYTE l_data [2]; OPJ_UINT32 l_marker; /* preconditions */ assert(p_j2k != 00); ass...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
146,781,260,790,724,150,000,000,000,000,000,000,000
40
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
rsa_compute_root(const struct rsa_private_key *key, mpz_t x, const mpz_t m) { mpz_t xp; /* modulo p */ mpz_t xq; /* modulo q */ mpz_init(xp); mpz_init(xq); /* Compute xq = m^d % q = (m%q)^b % q */ mpz_fdiv_r(xq, m, key->q); mpz_powm(xq, xq, key->b, key->q); /* Compute xp = m^d % p = (m%p)^a % p ...
1
[ "CWE-203" ]
nettle
3fe1d6549765ecfb24f0b80b2ed086fdc818bff3
271,697,424,730,601,250,000,000,000,000,000,000,000
56
Use mpz_powm_sec.
RBinElfSymbol *Elf_(r_bin_elf_get_symbols)(ELFOBJ *bin) { if (!bin->g_symbols) { bin->g_symbols = Elf_(_r_bin_elf_get_symbols_imports) (bin, R_BIN_ELF_SYMBOLS); } return bin->g_symbols; }
0
[ "CWE-125" ]
radare2
c6d0076c924891ad9948a62d89d0bcdaf965f0cd
272,954,908,235,035,600,000,000,000,000,000,000,000
6
Fix #8731 - Crash in ELF parser with negative 32bit number
void mbedtls_ssl_reset_in_out_pointers( mbedtls_ssl_context *ssl ) { /* Set the incoming and outgoing record pointers. */ #if defined(MBEDTLS_SSL_PROTO_DTLS) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) { ssl->out_hdr = ssl->out_buf; ssl->in_hdr = ssl->in_buf; } else...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
174,641,274,978,418,320,000,000,000,000,000,000,000
20
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
setorientation(TIFFRGBAImage* img) { switch (img->orientation) { case ORIENTATION_TOPLEFT: case ORIENTATION_LEFTTOP: if (img->req_orientation == ORIENTATION_TOPRIGHT || img->req_orientation == ORIENTATION_RIGHTTOP) return FLIP_HORIZONTALLY; else if (img->req_orientation == ORIENTATION_BOTRIGHT || ...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
88,311,198,072,189,880,000,000,000,000,000,000,000
59
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
static auto convertFunctionWordToUint32(typename ConvertWordTypeToUint32<Args>::type... args) { return convertWordToUint32(F(std::forward<Args>(args)...)); }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
144,819,601,060,611,970,000,000,000,000,000,000,000
3
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...