func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
PHP_METHOD(Phar, apiVersion) { if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1); }
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
219,117,112,561,307,700,000,000,000,000,000,000,000
7
Fix bug #71860: Require valid paths for phar filenames
ha_commit_checkpoint_request(void *cookie, void (*pre_hook)(void *)) { st_commit_checkpoint_request st; st.cookie= cookie; st.pre_hook= pre_hook; plugin_foreach(NULL, commit_checkpoint_request_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &st); }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
327,420,615,394,022,270,000,000,000,000,000,000,000
8
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
void bpf_prog_free_id(struct bpf_prog *prog, bool do_idr_lock) { /* cBPF to eBPF migrations are currently not in the idr store. * Offloaded programs are removed from the store when their device * disappears - even if someone grabs an fd to them they are unusable, * simply waiting for refcnt to drop to be freed. ...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
270,227,155,342,176,420,000,000,000,000,000,000,000
23
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static inline bool eb_use_cmdparser(const struct i915_execbuffer *eb) { return intel_engine_needs_cmd_parser(eb->engine) && eb->batch_len; }
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
162,042,479,397,648,530,000,000,000,000,000,000,000
4
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
static int vm_stat_get_per_vm_open(struct inode *inode, struct file *file) { __simple_attr_check_format("%llu\n", 0ull); return kvm_debugfs_open(inode, file, vm_stat_get_per_vm, NULL, "%llu\n"); }
0
[ "CWE-416", "CWE-284" ]
linux
a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
88,722,360,829,305,080,000,000,000,000,000,000,000
6
KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: ...
static void init_amd_k5(struct cpuinfo_x86 *c) { /* * General Systems BIOSen alias the cpu frequency registers * of the Elan at 0x000df000. Unfortuantly, one of the Linux * drivers subsequently pokes it, and changes the CPU speed. * Workaround : Remove the unneeded alias. */ #define CBAR (0xfffc) /* Configuration...
0
[ "CWE-399" ]
tip
3b56496865f9f7d9bcb2f93b44c63f274f08e3b6
108,238,563,707,592,000,000,000,000,000,000,000,000
16
x86, cpu, amd: Add workaround for family 16h, erratum 793 This adds the workaround for erratum 793 as a precaution in case not every BIOS implements it. This addresses CVE-2013-6885. Erratum text: [Revision Guide for AMD Family 16h Models 00h-0Fh Processors, document 51810 Rev. 3.04 November 2013] 793 Specific Com...
void imap_munge_mbox_name(struct ImapData *idata, char *dest, size_t dlen, const char *src) { char *buf = mutt_str_strdup(src); imap_utf_encode(idata, &buf); imap_quote_string(dest, dlen, buf, false); FREE(&buf); }
0
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
217,174,347,410,955,320,000,000,000,000,000,000,000
9
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
int for_each_device_domain(int (*fn)(struct device_domain_info *info, void *data), void *data) { int ret = 0; struct device_domain_info *info; assert_spin_locked(&device_domain_lock); list_for_each_entry(info, &device_domain_list, global) { ret = fn(info, data); if (ret) return ret; } return 0; ...
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
258,588,976,603,181,400,000,000,000,000,000,000,000
15
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
canonical_filter (const char *filter) { /* Canonicalize "no filter", to NULL (empty means the same) */ if (filter && *filter == 0) return NULL; return filter; }
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
89,785,832,982,937,560,000,000,000,000,000,000,000
7
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, int** skip) { int i, len; if (IS_NULL(*skip)) { *skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE); if (IS_NULL(*skip)) return ONIGERR_MEMORY; } len = end - s; for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) ...
0
[ "CWE-125" ]
oniguruma
690313a061f7a4fa614ec5cc8368b4f2284e059b
39,173,718,226,768,355,000,000,000,000,000,000,000
20
fix #57 : DATA_ENSURE() check must be before data access
static int test_invalid_template(void) { INVALIDTEMPLATE *temp = INVALIDTEMPLATE_new(); int ret; if (!TEST_ptr(temp)) return 0; ret = i2d_INVALIDTEMPLATE(temp, NULL); INVALIDTEMPLATE_free(temp); /* We expect the i2d operation to fail */ return ret < 0; }
0
[ "CWE-476" ]
openssl
22b88fc9c0e22545401c0b34d24843883ea73fec
221,698,127,694,984,570,000,000,000,000,000,000,000
15
Add a test for encoding/decoding using an invalid ASN.1 Template If you have a CHOICE type that it must use explicit tagging - otherwise the template is invalid. We add tests for this. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
static void safe_write(int fd, const char *buf, size_t len) { ssize_t n; assert(fd != iobuf.out_fd); n = write(fd, buf, len); if ((size_t)n == len) return; if (n < 0) { if (errno != EINTR && errno != EWOULDBLOCK && errno != EAGAIN) { write_failed: rsyserr(FERROR, errno, "safe_write failed to write...
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
182,894,591,214,131,860,000,000,000,000,000,000,000
55
Some extra file-list safety checks.
static int udp_push_pending_frames(struct sock *sk) { struct udp_sock *up = udp_sk(sk); struct inet_sock *inet = inet_sk(sk); struct flowi4 *fl4 = &inet->cork.fl.u.ip4; struct sk_buff *skb; int err = 0; skb = ip_finish_skb(sk); if (!skb) goto out; err = udp_send_skb(skb, fl4->daddr, fl4->fl4_dport); out: ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
108,016,936,497,365,300,000,000,000,000,000,000,000
19
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...
GF_Err rtpo_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_RTPOBox *ptr = (GF_RTPOBox *)s; if (ptr == NULL) return GF_BAD_PARAM; //here we have no pb, just remembed that some entries will have to //be 4-bytes aligned ... e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->timeOffs...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
105,953,335,168,309,700,000,000,000,000,000,000,000
13
prevent dref memleak on invalid input (#1183)
bitge(PG_FUNCTION_ARGS) { VarBit *arg1 = PG_GETARG_VARBIT_P(0); VarBit *arg2 = PG_GETARG_VARBIT_P(1); bool result; result = (bit_cmp(arg1, arg2) >= 0); PG_FREE_IF_COPY(arg1, 0); PG_FREE_IF_COPY(arg2, 1); PG_RETURN_BOOL(result); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
210,919,075,920,504,660,000,000,000,000,000,000,000
13
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static void vvalue_strbuf_append_ui1(wmem_strbuf_t *strbuf, void *ptr) { guint8 ui1 = *(guint8*)ptr; wmem_strbuf_append_printf(strbuf, "%u", (unsigned)ui1); }
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
242,623,441,710,665,580,000,000,000,000,000,000,000
5
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
void PropertyAccessorDeserialize(Deserializer &d, CellKind kind) { assert(kind == CellKind::PropertyAccessorKind && "Expected PropertyAccessor"); void *mem = d.getRuntime()->alloc(cellSize<PropertyAccessor>()); auto *cell = new (mem) PropertyAccessor(d); d.endObject(cell); }
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
131,843,147,859,894,050,000,000,000,000,000,000,000
6
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
void __fastcall TSCPFileSystem::SCPSendError(const UnicodeString Message, bool Fatal) { unsigned char ErrorLevel = (char)(Fatal ? 2 : 1); FTerminal->LogEvent(FORMAT(L"Sending SCP error (%d) to remote side:", ((int)ErrorLevel))); FSecureShell->Send(&ErrorLevel, 1); // We don't send exact error message,...
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
95,793,524,636,853,430,000,000,000,000,000,000,000
10
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
zcurrentpagedevice(i_ctx_t *i_ctx_p) { os_ptr op = osp; gx_device *dev = gs_currentdevice(igs); push(2); if ((*dev_proc(dev, get_page_device))(dev) != 0) { op[-1] = istate->pagedevice; make_true(op); } else { make_null(op - 1); make_false(op); } return 0; }
0
[]
ghostpdl
5516c614dc33662a2afdc377159f70218e67bde5
137,721,248,305,630,070,000,000,000,000,000,000,000
15
Improve restore robustness Prompted by looking at Bug 699654: There are two variants of the restore operator in Ghostscript: one is Level 1 (restoring VM), the other is Level 2+ (adding page device restoring to the Level operator). This was implemented by the Level 2+ version restoring the device in the graphics sta...
virtual double pos_in_interval(Field *min, Field *max) { return (double) 0.5; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
230,389,080,799,004,900,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer) { unsigned ver97 = 0, offset = 0, entries, tag, type, len, save, c; unsigned i; uchar NikonKey, ci, cj, ck; unsigned serial = 0; unsigned custom_serial = 0; unsigned NikonLensDataVersion = 0; unsigned lenNikonLensData = 0; unsi...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
110,024,354,333,842,030,000,000,000,000,000,000,000
787
Secunia SA75000 advisory: several buffer overruns
get_edns_expire(dns_zone_t * zone, dns_message_t *message, uint32_t *expirep) { isc_result_t result; uint32_t expire; dns_rdata_t rdata = DNS_RDATA_INIT; isc_buffer_t optbuf; uint16_t optcode; uint16_t optlen; REQUIRE(expirep != NULL); REQUIRE(message != NULL); if (message->opt == NULL) return; result ...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
150,120,661,834,538,660,000,000,000,000,000,000,000
43
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
int modbus_write_registers(modbus_t *ctx, int addr, int nb, const uint16_t *src) { int rc; int i; int req_length; int byte_count; uint8_t req[MAX_MESSAGE_LENGTH]; if (ctx == NULL) { errno = EINVAL; return -1; } if (nb > MODBUS_MAX_WRITE_REGISTERS) { if (ctx->deb...
0
[ "CWE-125" ]
libmodbus
5ccdf5ef79d742640355d1132fa9e2abc7fbaefc
171,326,420,578,909,530,000,000,000,000,000,000,000
47
Fix VD-1301 and VD-1302 vulnerabilities This patch was contributed by Maor Vermucht and Or Peles from VDOO Connected Trust.
static int tg3_close(struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); tg3_ptp_fini(tp); tg3_stop(tp); /* Clear stats across close / open calls */ memset(&tp->net_stats_prev, 0, sizeof(tp->net_stats_prev)); memset(&tp->estats_prev, 0, sizeof(tp->estats_prev)); tg3_power_down(tp); tg3_carrier_off...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
167,645,529,139,515,530,000,000,000,000,000,000,000
18
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static inline void rb_time_val_set(local_t *t, unsigned long val, unsigned long cnt) { val = rb_time_val_cnt(val, cnt); local_set(t, val); }
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
228,334,731,545,834,940,000,000,000,000,000,000,000
5
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
load_rrset(RES* ssl, sldns_buffer* buf, struct worker* worker) { char* s = (char*)sldns_buffer_begin(buf); struct regional* region = worker->scratchpad; struct ub_packed_rrset_key* rk; struct packed_rrset_data* d; unsigned int rr_count, rrsig_count, trust, security; long long ttl; unsigned int i; int go_on = 1;...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
103,601,645,542,592,160,000,000,000,000,000,000,000
81
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
DDeviceDiskInfoPrivate::DDeviceDiskInfoPrivate(DDeviceDiskInfo *qq) : DDiskInfoPrivate(qq) { }
0
[ "CWE-59", "CWE-61" ]
deepin-clone
e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab
237,543,472,982,549,800,000,000,000,000,000,000,000
5
fix: Do not use the "/tmp" directory https://github.com/linuxdeepin/deepin-clone/issues/16 https://bugzilla.opensuse.org/show_bug.cgi?id=1130388
static int _pgsql_commit_txn(void *conn, const sasl_utils_t *utils) { return _pgsql_exec(conn, "COMMIT;", NULL, 0, NULL, utils); }
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
186,577,885,750,276,580,000,000,000,000,000,000,000
4
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
static PathInfo *ConvertPrimitiveToPath(const PrimitiveInfo *primitive_info) { MagickBooleanType closed_subpath; PathInfo *path_info; PathInfoCode code; PointInfo p, q; register ssize_t i, n; ssize_t coordinates, start; /* Converts a PrimitiveInfo structure in...
0
[ "CWE-416" ]
ImageMagick
ecf7c6b288e11e7e7f75387c5e9e93e423b98397
225,323,776,564,202,650,000,000,000,000,000,000,000
104
...
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); if (dst && dst->obsolete && dst->ops->check(dst, cookie) == NULL) { sk_tx_queue_clear(sk); RCU_INIT_POINTER(sk->sk_dst_cache, NULL); dst_release(dst); return NULL; } return dst; }
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
117,768,160,392,640,270,000,000,000,000,000,000,000
13
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
static int handle_invalid_continuation_frame(h2o_http2_conn_t *conn, h2o_http2_frame_t *frame, const char **err_desc) { *err_desc = "received invalid CONTINUATION frame"; return H2O_HTTP2_ERROR_PROTOCOL; }
0
[ "CWE-703" ]
h2o
1c0808d580da09fdec5a9a74ff09e103ea058dd4
93,043,465,910,217,600,000,000,000,000,000,000,000
5
h2: use after free on premature connection close #920 lib/http2/connection.c:on_read() calls parse_input(), which might free `conn`. It does so in particular if the connection preface isn't the expected one in expect_preface(). `conn` is then used after the free in `if (h2o_timeout_is_linked(&conn->_write.timeout_entr...
static __always_inline u16 vmcs_read16(unsigned long field) { vmcs_check16(field); return __vmcs_readl(field); }
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
85,488,027,661,384,250,000,000,000,000,000,000,000
5
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
static void set_disconnect_timer(struct avdtp *session) { /* Take a ref while disconnect timer is active */ avdtp_ref(session); DBG("timeout %d", session->dc_timeout); session->dc_timer = timeout_add_seconds(session->dc_timeout, disconnect_timeout, session, NULL); }
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
213,160,216,809,751,500,000,000,000,000,000,000,000
11
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
batch_dict(PicklerObject *self, PyObject *iter) { PyObject *obj = NULL; PyObject *firstitem = NULL; int i, n; const char mark_op = MARK; const char setitem_op = SETITEM; const char setitems_op = SETITEMS; assert(iter != NULL); if (self->proto == 0) { /* SETITEMS isn't availabl...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
185,267,430,718,619,500,000,000,000,000,000,000,000
120
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
void CommandHelpers::appendCommandWCStatus(BSONObjBuilder& result, const Status& awaitReplicationStatus, const WriteConcernResult& wcResult) { if (!awaitReplicationStatus.isOK() && !result.hasField("writeConcernError")) { ...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
221,541,257,349,737,540,000,000,000,000,000,000,000
12
SERVER-38275 ban find explain with UUID
int ad_convert(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname, const char *catia_mappings, uint32_t flags) { struct adouble *ad = NULL; bool ok; bool converted_xattr = false; bool blank; int ret; ad = ad_get(talloc_tos(), handle, smb_fname, ADOUBLE_RSRC); if (ad == NULL) { return...
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
93,856,712,724,190,890,000,000,000,000,000,000,000
62
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
struct net_device *alloc_netdev(int sizeof_priv, const char *name, void (*setup)(struct net_device *)) { void *p; struct net_device *dev; int alloc_size; /* ensure 32-byte alignment of both the device and private area */ alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += size...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
212,113,879,095,131,870,000,000,000,000,000,000,000
29
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
diff_write_buffer(buf_T *buf, diffin_T *din) { linenr_T lnum; char_u *s; long len = 0; char_u *ptr; // xdiff requires one big block of memory with all the text. for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) len += (long)STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1; ptr = alloc(len); ...
0
[ "CWE-787" ]
vim
c101abff4c6756db4f5e740fde289decb9452efa
272,612,228,365,383,680,000,000,000,000,000,000,000
68
patch 8.2.5164: invalid memory access after diff buffer manipulations Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block.
static int __init mcheck_enable(char *str) { struct mca_config *cfg = &mca_cfg; if (*str == 0) { enable_p5_mce(); return 1; } if (*str == '=') str++; if (!strcmp(str, "off")) cfg->disabled = true; else if (!strcmp(str, "no_cmci")) cfg->cmci_disabled = true; else if (!strcmp(str, "no_lmce")) cfg->lmc...
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
34,751,341,592,973,460,000,000,000,000,000,000,000
35
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
Status validateBSONIterative(Buffer* buffer) { std::deque<ValidationObjectFrame> frames; ValidationObjectFrame* curr = NULL; ValidationState::State state = ValidationState::BeginObj; while (state != ValidationState::Done) { switch (state) { ...
0
[ "CWE-20" ]
mongo
3a7e85ea1f672f702660e5472566234b1d19038e
124,939,899,838,645,890,000,000,000,000,000,000,000
76
SERVER-17264: improve bson validation for utf-8 strings (cherry picked from commit 394a8569ff14a215c0691aa34440227b2e62a4de) Conflicts: src/mongo/bson/bson_validate_test.cpp
static int mincore_unmapped_range(unsigned long addr, unsigned long end, struct mm_walk *walk) { unsigned char *vec = walk->private; unsigned long nr = (end - addr) >> PAGE_SHIFT; memset(vec, 0, nr); walk->private += nr; return 0; }
0
[ "CWE-200", "CWE-319" ]
linux
574823bfab82d9d8fa47f422778043fbb4b4f50e
296,705,820,274,879,700,000,000,000,000,000,000,000
10
Change mincore() to count "mapped" pages rather than "cached" pages The semantics of what "in core" means for the mincore() system call are somewhat unclear, but Linux has always (since 2.3.52, which is when mincore() was initially done) treated it as "page is available in page cache" rather than "page is mapped in th...
int security_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted) { return security_ops->capget(target, effective, inheritable, permitted); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
313,546,023,387,457,340,000,000,000,000,000,000,000
7
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...
colon(char *cp) { int flag = 0; if (*cp == ':') /* Leading colon is part of file name. */ return NULL; if (*cp == '[') flag = 1; for (; *cp; ++cp) { if (*cp == '@' && *(cp+1) == '[') flag = 1; if (*cp == ']' && *(cp+1) == ':' && flag) return (cp+1); if (*cp == ':' && !flag) return (cp); if (...
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
253,817,945,567,191,800,000,000,000,000,000,000,000
21
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
option_socket_cb (const gchar *option_name, const gchar *value, gpointer data, GError **error) { FlatpakContext *context = data; FlatpakContextSockets socket; socket = flatpak_context_socket_from_string (value, error); if (socket == 0) return FA...
0
[ "CWE-20" ]
flatpak
902fb713990a8f968ea4350c7c2a27ff46f1a6c4
109,048,690,509,291,750,000,000,000,000,000,000,000
16
Use seccomp to filter out TIOCSTI ioctl This would otherwise let the sandbox add input to the controlling tty.
int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr, int *qp_attr_mask) { struct rdma_id_private *id_priv; int ret = 0; id_priv = container_of(id, struct rdma_id_private, id); if (rdma_cap_ib_cm(id->device, id->port_num)) { if (!id_priv->cm_id.ib || (id_priv->id.qp_type == IB_QPT_UD)...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
101,318,889,272,404,160,000,000,000,000,000,000,000
37
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static void tg3_timer_stop(struct tg3 *tp) { del_timer_sync(&tp->timer); }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
235,732,920,464,384,500,000,000,000,000,000,000,000
4
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
int afm_load_file(const char *filename, TFMInfo *info) { /* the information we want is: * - tfmwidth * - width and heights * - character origins */ FontInfo *fi = NULL; int status; CharMetricInfo *cm; FILE *in; in = fopen(filename, "rb"); if(in == NULL) return -1; status = afm_parse_file(in, &...
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
110,222,891,321,241,160,000,000,000,000,000,000,000
74
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
make_canonical(struct ly_ctx *ctx, int type, const char **value, void *data1, void *data2) { const uint16_t buf_len = 511; char buf[buf_len + 1]; struct lys_type_bit **bits = NULL; struct lyxp_expr *exp; const char *module_name, *cur_expr, *end; int i, j, count; int64_t num; uint64_t unu...
0
[ "CWE-787" ]
libyang
6980afae2ff9fcd6d67508b0a3f694d75fd059d6
216,415,733,716,446,000,000,000,000,000,000,000,000
173
parser BUGFIX long identityref default value buffer overflow STRING_OVERFLOW (CWE-120)
datetime_s_strptime(int argc, VALUE *argv, VALUE klass) { VALUE str, fmt, sg; rb_scan_args(argc, argv, "03", &str, &fmt, &sg); switch (argc) { case 0: str = rb_str_new2("-4712-01-01T00:00:00+00:00"); case 1: fmt = rb_str_new2("%FT%T%z"); case 2: sg = INT2FIX(DEFAULT_SG); } { ...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
71,410,625,779,421,990,000,000,000,000,000,000,000
24
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static plist_t parse_bin_node(struct bplist_data *bplist, const char** object) { uint16_t type = 0; uint64_t size = 0; if (!object) return NULL; type = (**object) & BPLIST_MASK; size = (**object) & BPLIST_FILL; (*object)++; switch (type) { case BPLIST_NULL: switch...
0
[ "CWE-125" ]
libplist
4765d9a60ca4248a8f89289271ac69cbffcc29bc
91,183,501,051,080,740,000,000,000,000,000,000,000
137
bplist: Fix possible out-of-bounds read in parse_array_node() with proper bounds checking
static bool ldm_create_data_partitions (struct parsed_partitions *pp, const struct ldmdb *ldb) { struct list_head *item; struct vblk *vb; struct vblk *disk; struct vblk_part *part; int part_num = 1; BUG_ON (!pp || !ldb); disk = ldm_get_disk_objid (ldb); if (!disk) { ldm_crit ("Can't find the ID of this...
0
[ "CWE-119", "CWE-787" ]
linux
cae13fe4cc3f24820ffb990c09110626837e85d4
58,457,513,661,293,390,000,000,000,000,000,000,000
35
Fix for buffer overflow in ldm_frag_add not sufficient As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer overflow in ldm_frag_add) is not sufficient. The original patch in commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted partition table") does not consider that, for subsequen...
grammar_current_rule_prec_set (symbol *precsym, location loc) { /* POSIX says that any identifier is a nonterminal if it does not appear on the LHS of a grammar rule and is not defined by %token or by one of the directives that assigns precedence to a token. We ignore this here because the only kind of...
0
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
166,487,429,100,388,440,000,000,000,000,000,000,000
19
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
zfs_set_ace(zfs_acl_t *aclp, void *acep, uint32_t access_mask, uint16_t access_type, uint64_t fuid, uint16_t entry_type) { uint16_t type = entry_type & ACE_TYPE_FLAGS; aclp->z_ops->ace_mask_set(acep, access_mask); aclp->z_ops->ace_type_set(acep, access_type); aclp->z_ops->ace_flags_set(acep, entry_type); if (...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
156,797,277,037,685,210,000,000,000,000,000,000,000
12
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
static int check_map_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed) { struct bpf_verifier_state *state = env->cur_state; struct bpf_reg_state *reg = &state->regs[regno]; int err; /* We may have adjusted the register to this map value, so we * need to try adding ...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
196,091,162,839,983,200,000,000,000,000,000,000,000
48
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension, PIRP Irp) { PIO_STACK_LOCATION irpSp = IoGetCurrentIrpStackLocation (Irp); switch (irpSp->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_MOUNTDEV_QUERY_DEVICE_NAME: Dump ("ProcessVolumeDeviceControlIrp (IOCTL_MOUN...
0
[ "CWE-119", "CWE-787" ]
VeraCrypt
f30f9339c9a0b9bbcc6f5ad38804af39db1f479e
158,361,223,188,323,930,000,000,000,000,000,000,000
1,041
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.
_gdata_service_send_message (GDataService *self, SoupMessage *message, GCancellable *cancellable, GError **error) { /* Based on code from evolution-data-server's libgdata: * Ebby Wiselyn <ebbywiselyn@gmail.com> * Jason Willis <zenbrother@gmail.com> * * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) ...
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
260,924,951,794,775,000,000,000,000,000,000,000,000
63
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
static int try_grow_upper(MAIN_WINDOW_REC *window, int count) { MAIN_WINDOW_REC *grow_win; grow_win = mainwindows_find_upper(window); if (grow_win != NULL) { MAIN_WINDOW_REC *win; GSList *grow_list, *shrink_list, *tmp; grow_list = mainwindows_get_line(grow_win); shrink_list = mainwindows_get_line(window); ...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
152,214,425,325,624,500,000,000,000,000,000,000,000
25
check the error condition of mainwindow_create
static bool nested_vmcb_check_save(struct vcpu_svm *svm, struct vmcb *vmcb12) { bool vmcb12_lma; if ((vmcb12->save.efer & EFER_SVME) == 0) return false; if (((vmcb12->save.cr0 & X86_CR0_CD) == 0) && (vmcb12->save.cr0 & X86_CR0_NW)) return false; if (!kvm_dr6_valid(vmcb12->save.dr6) || !kvm_dr7_valid(vmcb12->...
0
[ "CWE-416" ]
linux
a58d9166a756a0f4a6618e4f593232593d6df134
181,364,036,107,971,700,000,000,000,000,000,000,000
34
KVM: SVM: load control fields from VMCB12 before checking them Avoid races between check and use of the nested VMCB controls. This for example ensures that the VMRUN intercept is always reflected to the nested hypervisor, instead of being processed by the host. Without this patch, it is possible to end up with svm->...
static enum hrtimer_restart hrtick(struct hrtimer *timer) { struct rq *rq = container_of(timer, struct rq, hrtick_timer); WARN_ON_ONCE(cpu_of(rq) != smp_processor_id()); spin_lock(&rq->lock); __update_rq_clock(rq); rq->curr->sched_class->task_tick(rq, rq->curr, 1); spin_unlock(&rq->lock); return HRTIMER_NORES...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
207,758,452,385,509,050,000,000,000,000,000,000,000
13
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
void OSD::handle_osd_ping(MOSDPing *m) { if (superblock.cluster_fsid != m->fsid) { dout(20) << "handle_osd_ping from " << m->get_source_inst() << " bad fsid " << m->fsid << " != " << superblock.cluster_fsid << dendl; m->put(); return; } int from = m->get_source().num(); heartbeat_lock.Lock()...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
120,773,093,237,389,200,000,000,000,000,000,000,000
155
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
__releases(atalk_sockets_lock) { read_unlock_bh(&atalk_sockets_lock); }
0
[ "CWE-416" ]
linux
6377f787aeb945cae7abbb6474798de129e1f3ac
300,759,768,690,565,800,000,000,000,000,000,000,000
4
appletalk: Fix use-after-free in atalk_proc_exit KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr ffff8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440...
TEST_P(RBACIntegrationTest, PathWithQueryAndFragment) { config_helper_.addFilter(RBAC_CONFIG_WITH_PATH_EXACT_MATCH); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); const std::vector<std::string> paths{"/allow", "/allow?p1=v1&p2=v2", "/allow?p1=v1#seg"}; for (const auto& path : paths)...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
232,688,477,832,935,200,000,000,000,000,000,000,000
26
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){ Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0); if( p ){ struct SrcList_item *pItem = &pSrc->a[iSrc]; Table *pTab = p->y.pTab = pItem->pTab; p->iTable = pItem->iCursor; if( p->y.pTab->iPKey==iCol ){ p->iColumn = -1...
0
[ "CWE-754" ]
sqlite
926f796e8feec15f3836aa0a060ed906f8ae04d3
250,229,636,503,190,900,000,000,000,000,000,000,000
30
Ensure that the SrcList_item.colUsed field is set correctly (set to have a 1 for all columns of the table) when a generated column appears in the USING clause of a join. FossilOrigin-Name: 1923efb283e8840fa7436eb20b9d2174ef7cace1690d3b97b572a0db2048b8e3
mrb_notimplement(mrb_state *mrb) { mrb_callinfo *ci = mrb->c->ci; if (ci->mid) { mrb_raisef(mrb, E_NOTIMP_ERROR, "%n() function is unimplemented on this machine", ci->mid); } }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
210,422,480,091,155,470,000,000,000,000,000,000,000
8
class.c: clear method cache after `remove_method`.
static PHP_FUNCTION(session_set_save_handler) { zval ***args = NULL; int i, num_args, argc = ZEND_NUM_ARGS(); char *name; if (PS(session_status) != php_session_none) { RETURN_FALSE; } if (argc > 0 && argc <= 2) { zval *obj = NULL, *callback = NULL; zend_uint func_name_len; char *func_name; HashPositio...
0
[ "CWE-416" ]
php-src
3798eb6fd5dddb211b01d41495072fd9858d4e32
57,634,344,389,237,910,000,000,000,000,000,000,000
137
Fix bug #72562 - destroy var_hash properly
static int pfkey_seq_show(struct seq_file *f, void *v) { struct sock *s = sk_entry(v); if (v == SEQ_START_TOKEN) seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n"); else seq_printf(f, "%pK %-6d %-6u %-6u %-6u %-6lu\n", s, atomic_read(&s->sk_refcnt), sk_rmem_alloc_get(s),...
0
[]
linux
096f41d3a8fcbb8dde7f71379b1ca85fe213eded
5,436,227,575,909,243,000,000,000,000,000,000,000
17
af_key: Fix sadb_x_ipsecrequest parsing The parsing of sadb_x_ipsecrequest is broken in a number of ways. First of all we're not verifying sadb_x_ipsecrequest_len. This is needed when the structure carries addresses at the end. Worse we don't even look at the length when we parse those optional addresses. The migra...
static bool valid_ept_address(struct kvm_vcpu *vcpu, u64 address) { struct vcpu_vmx *vmx = to_vmx(vcpu); int maxphyaddr = cpuid_maxphyaddr(vcpu); /* Check for memory type validity */ switch (address & VMX_EPTP_MT_MASK) { case VMX_EPTP_MT_UC: if (!(vmx->nested.nested_vmx_ept_caps & VMX_EPTP_UC_BIT)) return fa...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
101,918,698,652,408,150,000,000,000,000,000,000,000
35
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
\param user_path Specified path, or \c 0 to get the path currently used. \param reinit_path Force path to be recalculated (may take some time). \return Path containing the \c medcon binary. **/ inline const char* medcon_path(const char *const user_path, const bool reinit_path) { stati...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
101,991,983,822,609,210,000,000,000,000,000,000,000
42
.
save_number(const char *fmt, int number, int len) { if (len < 30) len = 30; /* actually log10(MAX_INT)+1 */ get_space((size_t) len + 1); _nc_SPRINTF(TPS(out_buff) + TPS(out_used), _nc_SLIMIT(TPS(out_size) - TPS(out_used)) fmt, number); TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used)); }
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
14,886,235,792,010,687,000,000,000,000,000,000,000
12
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
WM_SYMBOL void WildMidi_ClearError (void) { _WM_Global_ErrorI = 0; if (_WM_Global_ErrorS != NULL) { free(_WM_Global_ErrorS); _WM_Global_ErrorS = NULL; } return; }
0
[ "CWE-200", "CWE-119" ]
wildmidi
814f31d8eceda8401eb812fc2e94ed143fdad0ab
42,788,977,673,943,175,000,000,000,000,000,000,000
8
wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input Fixes bug #178.
xfs_attr3_leaf_add_work( struct xfs_buf *bp, struct xfs_attr3_icleaf_hdr *ichdr, struct xfs_da_args *args, int mapindex) { struct xfs_attr_leafblock *leaf; struct xfs_attr_leaf_entry *entry; struct xfs_attr_leaf_name_local *name_loc; struct xfs_attr_leaf_name_remote *name_rmt; struct xfs_mount *mp; int t...
0
[ "CWE-131" ]
linux
f4020438fab05364018c91f7e02ebdd192085933
143,965,365,910,659,000,000,000,000,000,000,000,000
118
xfs: fix boundary test in xfs_attr_shortform_verify The boundary test for the fixed-offset parts of xfs_attr_sf_entry in xfs_attr_shortform_verify is off by one, because the variable array at the end is defined as nameval[1] not nameval[]. Hence we need to subtract 1 from the calculation. This can be shown by: # tou...
static int task_switch_16(struct x86_emulate_ctxt *ctxt, u16 tss_selector, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { const struct x86_emulate_ops *ops = ctxt->ops; struct tss_segment_16 tss_seg; int ret; u32 new_tss_base = get_desc_base(new_desc); ret = ops->read_std(ctxt, old...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
110,275,868,354,213,360,000,000,000,000,000,000,000
43
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
Locked_tables_list::reopen_tables(THD *thd, bool need_reopen) { Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN); size_t reopen_count= 0; MYSQL_LOCK *lock; MYSQL_LOCK *merged_lock; DBUG_ENTER("Locked_tables_list::reopen_tables"); DBUG_ASSERT(some_table_marked_for_reopen || !need_reopen); /* Reset flag...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
81,105,706,194,470,090,000,000,000,000,000,000,000
92
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
void binlog_unsafe_map_init() { memset((void*) binlog_unsafe_map, 0, sizeof(uint) * 256); /* Classify a statement as unsafe when there is a mixed statement and an on-going transaction at any point of the execution if: 1. The mixed statement is about to update a transactional table and a non-tr...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
155,335,401,447,572,580,000,000,000,000,000,000,000
93
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
gen8_dispatch_bsd_engine(struct drm_i915_private *dev_priv, struct drm_file *file) { struct drm_i915_file_private *file_priv = file->driver_priv; /* Check whether the file_priv has already selected one ring. */ if ((int)file_priv->bsd_engine < 0) file_priv->bsd_engine = atomic_fetch_xor(1, &dev_priv->mm.b...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
160,307,071,555,235,040,000,000,000,000,000,000,000
12
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
static void process_pending_rx(struct work_struct *work) { struct l2cap_conn *conn = container_of(work, struct l2cap_conn, pending_rx_work); struct sk_buff *skb; BT_DBG(""); while ((skb = skb_dequeue(&conn->pending_rx))) l2cap_recv_frame(conn, skb); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
155,538,436,733,427,150,000,000,000,000,000,000,000
11
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static void Sp_replace_regexp(js_State *J) { js_Regexp *re; const char *source, *s, *r; js_Buffer *sb = NULL; int n, x; Resub m; source = checkstring(J, 0); re = js_toregexp(J, 1); if (js_doregexec(J, re->prog, source, &m, 0)) { js_copy(J, 0); return; } re->last = 0; loop: s = m.sub[0].sp; n = m.sub...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
86,998,041,426,083,530,000,000,000,000,000,000,000
101
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
bool dev_valid_name(const char *name) { if (*name == '\0') return false; if (strlen(name) >= IFNAMSIZ) return false; if (!strcmp(name, ".") || !strcmp(name, "..")) return false; while (*name) { if (*name == '/' || *name == ':' || isspace(*name)) return false; name++; } return true; }
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
139,750,777,729,346,830,000,000,000,000,000,000,000
16
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
httpGetLength2(http_t *http) /* I - HTTP connection */ { off_t remaining; /* Remaining length */ DEBUG_printf(("2httpGetLength2(http=%p), state=%s", (void *)http, httpStateString(http->state))); if (!http) return (-1); if (!_cups_strcasecmp(http->fields[HTTP_FIELD_TRANSFER_ENCODING], "chunked")) { ...
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
189,954,640,687,365,180,000,000,000,000,000,000,000
54
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
bool PostgreSqlStorage::initDbSession(QSqlDatabase &db) { // check whether the Qt driver performs string escaping or not. // i.e. test if it doubles slashes. QSqlField testField; testField.setType(QVariant::String); testField.setValue("\\"); QString formattedString = db.driver()->formatValue(tes...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
37,905,485,668,172,785,000,000,000,000,000,000,000
42
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
qtdemux_process_redirects (GstQTDemux * qtdemux, GList * references) { GstQtReference *best; GstStructure *s; GstMessage *msg; GValue list_val = { 0, }; GList *l; g_assert (references != NULL); references = g_list_sort (references, qtdemux_redirects_sort_func); best = (GstQtReference *) references->d...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
53,197,469,510,928,105,000,000,000,000,000,000,000
58
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static bool kvm_hv_is_syndbg_enabled(struct kvm_vcpu *vcpu) { struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu); return hv_vcpu->cpuid_cache.syndbg_cap_eax & HV_X64_SYNDBG_CAP_ALLOW_KERNEL_DEBUGGING; }
0
[ "CWE-476" ]
linux
7ec37d1cbe17d8189d9562178d8b29167fe1c31a
244,376,909,361,446,100,000,000,000,000,000,000,000
7
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for irqchip_in_kernel() so normally SynIC irqs should never be set. It is, however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs causing erroneous behavior. The immedi...
void Data::set_length(uint16 l) { length_ = l; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
252,566,705,382,171,100,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
void nfs4_destroy_session(struct nfs4_session *session) { nfs4_proc_destroy_session(session); dprintk("%s Destroy backchannel for xprt %p\n", __func__, session->clp->cl_rpcclient->cl_xprt); xprt_destroy_backchannel(session->clp->cl_rpcclient->cl_xprt, NFS41_BC_MIN_CALLBACKS); nfs4_destroy_slot_tables(session)...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
138,580,225,485,215,460,000,000,000,000,000,000,000
10
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static int tstream_tls_destructor(struct tstream_tls *tlss) { #if ENABLE_GNUTLS if (tlss->tls_session) { gnutls_deinit(tlss->tls_session); tlss->tls_session = NULL; } #endif /* ENABLE_GNUTLS */ return 0; }
0
[]
samba
22af043d2f20760f27150d7d469c7c7b944c6b55
40,341,194,988,099,886,000,000,000,000,000,000,000
10
CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@s...
static CURLcode imap_state_upgrade_tls(struct connectdata *conn) { struct imap_conn *imapc = &conn->proto.imapc; CURLcode result; result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone); if(imapc->ssldone) { imap_to_imaps(conn); result = imap_state_login(conn); state(conn, IMAP_S...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
206,566,156,955,545,100,000,000,000,000,000,000,000
15
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
static int vmx_get_lpage_level(void) { if (enable_ept && !cpu_has_vmx_ept_1g_page()) return PT_DIRECTORY_LEVEL; else /* For shadow and EPT supported 1GB page */ return PT_PDPE_LEVEL; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
59,267,441,556,431,810,000,000,000,000,000,000,000
8
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
TfLiteRegistration* Register_DEPTHWISE_CONV_2D() { #ifdef USE_NEON return Register_DEPTHWISE_CONVOLUTION_NEON_OPT(); #else return Register_DEPTHWISE_CONVOLUTION_GENERIC_OPT(); #endif }
0
[ "CWE-908" ]
tensorflow
8933b8a21280696ab119b63263babdb54c298538
93,675,220,586,672,160,000,000,000,000,000,000,000
7
Fix a null pointer exception caused by branching on uninitialized data. This is due to not checking that the params for the quantization exists. If there is no quantization, we should not access the `.params` field. PiperOrigin-RevId: 385173491 Change-Id: I8fc476c4b274fdb21ba741caa0fbc6d1b8840663
const EVP_MD *tls12_get_hash(unsigned char hash_alg) { switch (hash_alg) { # ifndef OPENSSL_NO_MD5 case TLSEXT_hash_md5: # ifdef OPENSSL_FIPS if (FIPS_mode()) return NULL; # endif return EVP_md5(); # endif # ifndef OPENSSL_NO_SHA case TLSEXT_hash_sha1: return EVP_sha1()...
0
[]
openssl
76343947ada960b6269090638f5391068daee88d
207,890,587,999,870,200,000,000,000,000,000,000,000
34
Fix for CVE-2015-0291 If a client renegotiates using an invalid signature algorithms extension it will crash a server with a NULL pointer dereference. Thanks to David Ramos of Stanford University for reporting this bug. CVE-2015-0291 Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: ssl/t1_lib.c
static int fit_parse_spec(const char *spec, char sepc, ulong addr_curr, ulong *addr, const char **name) { const char *sep; *addr = addr_curr; *name = NULL; sep = strchr(spec, sepc); if (sep) { if (sep - spec > 0) *addr = simple_strtoul(spec, NULL, 16); *name = sep + 1; return 1; } return 0; }
0
[]
u-boot
6f3c2d8aa5e6cbd80b5e869bbbddecb66c329d01
41,682,959,616,117,815,000,000,000,000,000,000,000
19
image: Add an option to do a full check of the FIT Some strange modifications of the FIT can introduce security risks. Add an option to check it thoroughly, using libfdt's fdt_check_full() function. Enable this by default if signature verification is enabled. CVE-2021-27097 Signed-off-by: Simon Glass <sjg@chromium....
pdf14_buf_free(pdf14_buf *buf, gs_memory_t *memory) { pdf14_parent_color_t *old_parent_color_info = buf->parent_color_info_procs; if (buf->mask_stack && buf->mask_stack->rc_mask) rc_decrement(buf->mask_stack->rc_mask, "pdf14_buf_free"); gs_free_object(memory, buf->mask_stack, "pdf14_buf_free"); ...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
207,259,933,724,505,350,000,000,000,000,000,000,000
24
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
sym_inspect(VALUE sym) { VALUE str; ID id = SYM2ID(sym); rb_encoding *enc; sym = rb_id2str(id); enc = STR_ENC_GET(sym); str = rb_enc_str_new(0, RSTRING_LEN(sym)+1, enc); RSTRING_PTR(str)[0] = ':'; memcpy(RSTRING_PTR(str)+1, RSTRING_PTR(sym), RSTRING_LEN(sym)); if (RSTRING_LEN(sym) !...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
7,499,315,132,594,945,000,000,000,000,000,000,000
19
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
flac_seek (SF_PRIVATE *psf, int UNUSED (mode), sf_count_t offset) { FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ; if (pflac == NULL) return 0 ; if (psf->dataoffset < 0) { psf->error = SFE_BAD_SEEK ; return ((sf_count_t) -1) ; } ; pflac->frame = NULL ; if (psf->file.mode == SFM_READ) { if (FLAC...
0
[ "CWE-119", "CWE-369" ]
libsndfile
60b234301adf258786d8b90be5c1d437fc8799e0
78,735,694,148,210,070,000,000,000,000,000,000,000
35
src/flac.c: Improve error handling Especially when dealing with corrupt or malicious files.
static int create_problem_dir(GHashTable *problem_info, unsigned pid) { /* Exit if free space is less than 1/4 of MaxCrashReportsSize */ if (g_settings_nMaxCrashReportsSize > 0) { if (low_free_space(g_settings_nMaxCrashReportsSize, g_settings_dump_location)) exit(1); } /* Create...
1
[ "CWE-200" ]
abrt
8939398b82006ba1fec4ed491339fc075f43fc7c
214,698,400,050,089,930,000,000,000,000,000,000,000
98
make the dump directories owned by root by default It was discovered that the abrt event scripts create a user-readable copy of a sosreport file in abrt problem directories, and include excerpts of /var/log/messages selected by the user-controlled process name, leading to an information disclosure. This issue was dis...
sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, int tablesize) { int sg_bufflen = tablesize * sizeof(struct page *); gfp_t gfp_flags = GFP_ATOMIC | __GFP_NOWARN; schp->pages = kzalloc(sg_bufflen, gfp_flags); if (!schp->pages) return -ENOMEM; schp->sglist_len = sg_bufflen; return tablesize; /* number o...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
22,496,808,504,907,125,000,000,000,000,000,000,000
11
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Field_new_decimal::Field_new_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
204,436,850,971,989,100,000,000,000,000,000,000,000
15
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void InstanceKlass::init_implementor() { if (is_interface()) { set_implementor(NULL); } }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
332,594,189,068,837,830,000,000,000,000,000,000,000
5
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const auto* op_data = static_cast<const OpData*>(node->user_data); switch (op_data->kernel_type) { case kTfLiteLSTMFullKernel: return full::Eval(context, node); case kTfLiteLSTMBasicKernel: return basic::Eval(context, node); defau...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
240,648,654,747,098,200,000,000,000,000,000,000,000
12
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static int rtnl_link_fill(struct sk_buff *skb, const struct net_device *dev) { struct nlattr *linkinfo; int err = -EMSGSIZE; linkinfo = nla_nest_start(skb, IFLA_LINKINFO); if (linkinfo == NULL) goto out; err = rtnl_link_info_fill(skb, dev); if (err < 0) goto err_cancel_link; err = rtnl_link_slave_info_fil...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
129,507,430,185,202,460,000,000,000,000,000,000,000
25
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
int ieee80211_radiotap_iterator_init( struct ieee80211_radiotap_iterator *iterator, struct ieee80211_radiotap_header *radiotap_header, int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns) { /* Linux only supports version 0 radiotap format */ if (radiotap_header->it_version) return -EINVAL; /...
1
[ "CWE-20", "CWE-119" ]
linux
f5563318ff1bde15b10e736e97ffce13be08bc1a
64,854,387,316,791,910,000,000,000,000,000,000,000
59
wireless: radiotap: fix parsing buffer overrun When parsing an invalid radiotap header, the parser can overrun the buffer that is passed in because it doesn't correctly check 1) the minimum radiotap header size 2) the space for extended bitmaps The first issue doesn't affect any in-kernel user as they all check the...