func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
print_optimize_info(FILE* f, regex_t* reg) { static const char* on[] = { "NONE", "EXACT", "EXACT_BM", "EXACT_BM_NOT_REV", "EXACT_IC", "MAP" }; fprintf(f, "optimize: %s\n", on[reg->optimize]); fprintf(f, " anchor: "); print_anchor(f, reg->anchor); if ((reg->anchor & ANCHOR_END_BUF...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
202,685,472,659,414,100,000,000,000,000,000,000,000
50
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static inline unsigned char *PopFloatPixel(QuantumInfo *quantum_info, const float pixel,unsigned char *magick_restrict pixels) { float *p; unsigned char quantum[4]; (void) memset(quantum,0,sizeof(quantum)); p=(float *) quantum; *p=(float) ((double) pixel*quantum_info->state.inverse_scale+ quan...
0
[ "CWE-190" ]
ImageMagick
5af1dffa4b6ab984b5f13d1e91c95760d75f12a6
75,596,445,309,986,005,000,000,000,000,000,000,000
27
outside the range of representable values of type 'unsigned char' (#3083) Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com>
static int sysfs_slab_add(struct kmem_cache *s) { int err; const char *name; struct kset *kset = cache_kset(s); int unmergeable = slab_unmergeable(s); INIT_WORK(&s->kobj_remove_work, sysfs_slab_remove_workfn); if (!kset) { kobject_init(&s->kobj, &slab_ktype); return 0; } if (!unmergeable && disable_high...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
197,473,210,539,311,500,000,000,000,000,000,000,000
66
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
static inline unsigned nested_cpu_vmx_misc_cr3_count(struct kvm_vcpu *vcpu) { return vmx_misc_cr3_count(to_vmx(vcpu)->nested.nested_vmx_misc_low); }
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
280,773,276,663,459,560,000,000,000,000,000,000,000
4
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...
ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY) { USE_OPLINE ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting)); if (EG(error_reporting)) { do { EG(error_reporting) = 0; if (!EG(error_reporting_ini_entry)) { zval *zv = zend_hash_find_ex(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING)...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
10,247,172,532,382,102,000,000,000,000,000,000,000
32
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static void udp4_format_sock(struct sock *sp, char *tmpbuf, int bucket) { struct inet_sock *inet = inet_sk(sp); __be32 dest = inet->daddr; __be32 src = inet->rcv_saddr; __u16 destp = ntohs(inet->dport); __u16 srcp = ntohs(inet->sport); sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X" " %02X %08X:%08X %02X:%08lX...
0
[]
linux-2.6
32c1da70810017a98aa6c431a5494a302b6b9a30
254,478,912,500,479,580,000,000,000,000,000,000,000
16
[UDP]: Randomize port selection. This patch causes UDP port allocation to be randomized like TCP. The earlier code would always choose same port (ie first empty list). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval) { u32 bmlen; DECODE_HEAD; bmval[0] = 0; bmval[1] = 0; bmval[2] = 0; READ_BUF(4); bmlen = be32_to_cpup(p++); if (bmlen > 1000) goto xdr_error; READ_BUF(bmlen << 2); if (bmlen > 0) bmval[0] = be32_to_cpup(p++); if (bmlen > 1) bmval[1] = ...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
208,552,508,046,711,500,000,000,000,000,000,000,000
24
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
TPM2B_ECC_POINT_Unmarshal(TPM2B_ECC_POINT *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; INT32 startSize; if (rc == TPM_RC_SUCCESS) { rc = UINT16_Unmarshal(&target->size, buffer, size); } if (rc == TPM_RC_SUCCESS) { if (target->size == 0) { rc = TPM_RC_SIZE; } } ...
1
[ "CWE-787" ]
libtpms
f16250b35aff6995e540143a9858c9cf0d1f9573
306,372,836,430,270,550,000,000,000,000,000,000,000
26
tpm2: Reset TPM2B buffer sizes after test fails for valid buffer size Reset the buffer size indicator in a TPM2B type of buffer after it failed the test for the maximum buffer size it allows. This prevents having bad buffer sizes in memory that can come to haunt us when writing the volatile state for example. Signed-...
tor_mathlog(double d) { return log(d); }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
34,039,146,411,162,717,000,000,000,000,000,000,000
4
Fix assertion failure in tor_timegm. Fixes bug 6811.
static void emulator_set_idt(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt) { static_call(kvm_x86_set_idt)(emul_to_vcpu(ctxt), dt); }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
323,024,093,124,749,670,000,000,000,000,000,000,000
4
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
int open_pkcs11_session(pkcs11_handle_t *h, unsigned int slot) { int rv; DBG1("opening a new PKCS #11 session for slot %d", slot + 1); if (slot >= h->slot_count) { set_error("invalid slot number %d", slot); return -1; } /* open a readonly user-session */ rv = h->fl->C_OpenSession(h->slots[slot].id,...
0
[]
pam_pkcs11
cc51b3e2720ea862d500cab2ea517518ff39a497
2,552,732,649,467,182,400,000,000,000,000,000,000
18
verify using a nonce from the system, not the card Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problem.
Mgr::QueryParams::pack(Ipc::TypedMsgHdr& msg) const { msg.putInt(params.size()); for (Params::const_iterator iter = params.begin(); iter != params.end(); ++iter) { Must(iter->first.size() != 0); msg.putString(iter->first); Must(iter->second != NULL); iter->second->pack(msg); ...
0
[ "CWE-401" ]
squid
26e65059bc06ebce508737b5cd0866478691566a
56,058,244,408,632,150,000,000,000,000,000,000,000
10
Bug 5106: Broken cache manager URL parsing (#788) Use already parsed request-target URL in cache manager and update CacheManager to Tokanizer based URL parse Removing use of sscan() and regex string processing which have proven to be problematic on many levels. Most particularly with regards to tolerance of normally ...
bool agg_func_used() const { return m_agg_func_used; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
32,216,774,883,538,680,000,000,000,000,000,000,000
1
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
CtPtr ProtocolV1::send_connect_message() { state = CONNECTING_SEND_CONNECT_MSG; ldout(cct, 20) << __func__ << dendl; if (!authorizer) { authorizer = messenger->ms_deliver_get_authorizer(connection->peer_type); } ceph_msg_connect connect; connect.features = connection->policy.features_supported; con...
0
[ "CWE-294" ]
ceph
4c11203122d729c832a645c9e3f5092db4963840
16,756,275,250,155,030,000,000,000,000,000,000,000
43
msg/async/ProtocolV1: resurrect "implement cephx_*require_version options" This was added in commit 9bcbc2a3621f ("mon,msg: implement cephx_*_require_version options") and inadvertently dropped in commit e6f043f7d2dc ("msgr/async: huge refactoring of protocol V1"). As a result, service daemons don't enforce cephx_requ...
TEST_P(Http2CodecImplDeferredResetTest, DeferredResetServer) { initialize(); InSequence s; TestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, false)); request_encoder_->encodeHeaders(request_headers, false); // In this...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
46,598,596,139,787,000,000,000,000,000,000,000,000
30
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
free_typebuf(void) { if (typebuf.tb_buf == typebuf_init) internal_error("Free typebuf 1"); else vim_free(typebuf.tb_buf); if (typebuf.tb_noremap == noremapbuf_init) internal_error("Free typebuf 2"); else vim_free(typebuf.tb_noremap); }
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
74,763,742,837,854,750,000,000,000,000,000,000,000
11
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
write_icon (FILE *f, GSList *entries) { IconEntry *icon; GSList *entry; guint8 bytes[4]; guint16 words[4]; guint32 dwords[6]; gint type; gint n_entries; gint offset; gint size; if (((IconEntry *)entries->data)->hot_x > -1) type = 2; else type = 1; n_entries = g_slist_length (entries); /* header */ ...
0
[ "CWE-787" ]
gdk-pixbuf
88af50a864195da1a4f7bda5f02539704fbda599
275,489,390,181,459,900,000,000,000,000,000,000,000
82
ico: Be more careful when parsing headers There is some redundancy between the ico directory and the bitmap image header. If the two disagree on the icon dimensions, just toss the image, instead of risking crashes or OOM later. Also add some more debug spew that helped in tracking this down, and make error messages mo...
static void *section_addr(const struct load_info *info, const char *name) { /* Section 0 has sh_addr 0. */ return (void *)info->sechdrs[find_sec(info, name)].sh_addr; }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
1,470,411,629,972,022,600,000,000,000,000,000,000
5
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static bool nested_vmx_exit_handled_vmcs_access(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, gpa_t bitmap) { u32 vmx_instruction_info; unsigned long field; u8 b; if (!nested_cpu_has_shadow_vmcs(vmcs12)) return true; /* Decode instruction info and find the field to access */ vmx_instruction_info = vmcs_read3...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
332,017,846,641,963,700,000,000,000,000,000,000,000
23
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
proxy_C_EncryptFinal (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR last_part, CK_ULONG_PTR last_part_len) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (state->px, &handle, &map, NULL); if (rv !=...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
42,800,573,320,833,360,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
get_default(cupsd_client_t *con) /* I - Client connection */ { http_status_t status; /* Policy status */ cups_array_t *ra; /* Requested attributes array */ cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_default(%p[%d])", con, con->number); /* * Check policy... */ if ((status = cupsdCheckPolicy(DefaultPolic...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
100,849,267,915,534,800,000,000,000,000,000,000,000
31
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::CreateOrUpdateUserArgs args; Status status = auth::parseCreateOrUpdateUserCommands(cmdObj, "createUser", dbname, &args); if (!status.isOK()) {...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
225,707,346,962,189,400,000,000,000,000,000,000,000
122
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
void __fastcall TOwnConsole::TrayIconClick(TObject * /*Sender*/) { DebugAssert(FConsoleWindow != NULL); SetForegroundWindow(FConsoleWindow); ShowWindow(FConsoleWindow, SW_RESTORE); }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
258,571,114,912,997,800,000,000,000,000,000,000,000
6
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { if (loc == NULL) return(NULL); if ((ctxt == NULL) || (ctxt->context == NULL) || (ctxt->context->doc == NULL)) return(NULL); switch (loc->type) { case XPATH_POINT: return(xmlXPtrNewRange(loc->user, loc->index, ...
0
[ "CWE-416" ]
libxml2
9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
53,829,590,700,445,890,000,000,000,000,000,000,000
50
Fix XPointer paths beginning with range-to The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-fr...
int __init irsock_init(void) { int rc = proto_register(&irda_proto, 0); if (rc == 0) rc = sock_register(&irda_family_ops); return rc; }
0
[ "CWE-200" ]
linux-2.6
09384dfc76e526c3993c09c42e016372dc9dd22c
7,816,117,133,850,524,000,000,000,000,000,000,000
9
irda: Fix irda_getname() leak irda_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
R_API RBinJavaField *r_bin_java_get_method_code_attribute_with_addr(RBinJavaObj *bin, ut64 addr) { RListIter *iter = NULL, *iter_tmp = NULL; RBinJavaField *fm_type, *res = NULL; if (!bin && R_BIN_JAVA_GLOBAL_BIN) { bin = R_BIN_JAVA_GLOBAL_BIN; } if (!bin) { eprintf ("Attempting to analyse function when the R_B...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
163,292,242,365,197,720,000,000,000,000,000,000,000
19
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); /* Check #1 */ if (tp->rcv_ssthresh < tp->window_clamp && (int)tp->rcv_ssthresh < tcp_space(sk) && !tcp_under_memory_pressure(sk)) { int incr; /* Check #2. Increase window, if skb with such ove...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
24,922,279,352,812,277,000,000,000,000,000,000,000
26
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 inline Quantum GetPixelGreen(const Image *restrict image, const Quantum *restrict pixel) { return(pixel[image->channel_map[GreenPixelChannel].offset]); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
205,196,084,253,924,380,000,000,000,000,000,000,000
5
h2_end_headers(struct worker *wrk, struct h2_sess *h2, struct req *req, struct h2_req *r2) { h2_error h2e; ASSERT_RXTHR(h2); assert(r2->state == H2_S_OPEN); h2e = h2h_decode_fini(h2); h2->new_req = NULL; if (h2e != NULL) { Lck_Lock(&h2->sess->mtx); VSLb(h2->vsl, SLT_Debug, "HPACK/FINI %s", h2e->name); ...
1
[]
varnish-cache
82b0a629f60136e76112c6f2c6372cce77b683be
174,455,709,750,164,850,000,000,000,000,000,000,000
58
Take content length into account on H/2 request bodies When receiving H/2 data frames, make sure to take the advertised content length into account, and fail appropriately if the combined sum of the data frames does not match the content length.
static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *dir, const char *name, int name_len, u64 ref_objectid, u64 objectid, umode_t mode, u64 *index) { struct inode *inode; struct btrfs_inode_item *inode_item; struct ...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
23,418,499,838,870,380,000,000,000,000,000,000,000
166
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
irc_nick_color_for_pv (struct t_irc_channel *channel, const char *nickname) { if (weechat_config_boolean (irc_config_look_color_pv_nick_like_channel)) { if (!channel->pv_remote_nick_color) channel->pv_remote_nick_color = irc_nick_find_color (nickname); if (channel->pv_remote_nick_col...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
110,271,679,975,762,500,000,000,000,000,000,000,000
12
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
inline void comps_objrtree_pair_destroy_v(void * pair) { free(((COMPS_ObjRTreePair *)pair)->key); free(pair); }
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
162,707,977,862,673,800,000,000,000,000,000,000,000
4
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
static int rawv6_init_sk(struct sock *sk) { struct raw6_sock *rp = raw6_sk(sk); switch (inet_sk(sk)->inet_num) { case IPPROTO_ICMPV6: rp->checksum = 1; rp->offset = 2; break; case IPPROTO_MH: rp->checksum = 1; rp->offset = 4; break; default: break; } return 0; }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
29,316,858,541,866,623,000,000,000,000,000,000,000
18
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
GF_Err bloc_box_read(GF_Box *s,GF_BitStream *bs) { GF_BaseLocationBox *ptr = (GF_BaseLocationBox *) s; ISOM_DECREASE_SIZE(s, 256) gf_bs_read_data(bs, (char *) ptr->baseLocation, 256); ISOM_DECREASE_SIZE(s, 256) gf_bs_read_data(bs, (char *) ptr->basePurlLocation, 256); ISOM_DECREASE_SIZE(s, 512) gf_bs_skip_byte...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
108,343,414,989,011,930,000,000,000,000,000,000,000
12
fixed #1587
nm_gconf_get_valuehash_helper (GConfClient *client, const char *path, const char *setting, GHashTable **value) { char *gc_key; GSList *gconf_entries; GSList *iter; int prefix_len; g_return_val_if_fail (setting != NULL, FA...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
221,645,341,682,453,420,000,000,000,000,000,000,000
38
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
static int selinux_socket_create(int family, int type, int protocol, int kern) { const struct task_security_struct *tsec = current_security(); u32 newsid; u16 secclass; int rc; if (kern) return 0; secclass = socket_type_to_security_class(family, type, protocol); rc = socket_sockcreate_sid(tsec, secclass...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
76,183,277,530,584,240,000,000,000,000,000,000,000
18
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
void gf_bs_write_double (GF_BitStream *bs, Double value) { u32 i; union { Double d; char sz [8]; } double_value; double_value.d = value; for (i = 0; i < 64; i++) { BS_WriteBit(bs, (double_value.sz [7 - i / 8] & 1 << (7 - i % 8)) != 0); } }
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
103,312,534,613,973,510,000,000,000,000,000,000,000
12
fixed #2165
static void fill_prstatus(struct elf_prstatus *prstatus, struct task_struct *p, long signr) { prstatus->pr_info.si_signo = prstatus->pr_cursig = signr; prstatus->pr_sigpend = p->pending.signal.sig[0]; prstatus->pr_sighold = p->blocked.sig[0]; rcu_read_lock(); prstatus->pr_ppid = task_pid_vnr(rcu_dereference(p->r...
0
[ "CWE-284", "CWE-264" ]
linux
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
172,411,505,860,899,000,000,000,000,000,000,000,000
32
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top...
static ssize_t snd_disconnect_read(struct file *file, char __user *buf, size_t count, loff_t *offset) { return -ENODEV; }
0
[ "CWE-416" ]
linux
2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac
123,717,139,172,287,580,000,000,000,000,000,000,000
5
ALSA: core: Fix card races between register and disconnect There is a small race window in the card disconnection code that allows the registration of another card with the very same card id. This leads to a warning in procfs creation as caught by syzkaller. The problem is that we delete snd_cards and snd_cards_lock ...
static void extract_arg(RAnal *anal, RAnalFunction *fcn, RAnalOp *op, const char *reg, const char *sign, char type) { st64 ptr = 0; char *addr, *esil_buf = NULL; const st64 maxstackframe = 1024 * 8; r_return_if_fail (anal && fcn && op && reg); size_t i; for (i = 0; i < R_ARRAY_SIZE (op->src); i++) { if (op->...
1
[ "CWE-416" ]
radare2
a7ce29647fcb38386d7439696375e16e093d6acb
77,495,307,470,538,235,000,000,000,000,000,000,000
177
Fix UAF in aaaa on arm/thumb switching ##crash * Reported by @peacock-doris via huntr.dev * Reproducer tests_65185 * This is a logic fix, but not the fully safe as changes in the code can result on UAF again, to properly protect r2 from crashing we need to break the ABI and add refcounting to RRegItem, which can't...
call_bind_status(struct rpc_task *task) { int status = -EIO; if (task->tk_status >= 0) { dprint_status(task); task->tk_status = 0; task->tk_action = call_connect; return; } switch (task->tk_status) { case -ENOMEM: dprintk("RPC: %5u rpcbind out of memory\n", task->tk_pid); rpc_delay(task, HZ >> 2); ...
1
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
155,609,211,120,806,460,000,000,000,000,000,000,000
67
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
static int handle_switch_rr6(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { return 1; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
152,388,003,567,594,970,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 ...
struct crypt_pbkdf_type *crypt_get_pbkdf(struct crypt_device *cd) { return &cd->pbkdf; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
27,514,406,690,567,045,000,000,000,000,000,000,000
4
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) { unsigned long old_cr0 = kvm_read_cr0(vcpu); unsigned long update_bits = X86_CR0_PG | X86_CR0_WP | X86_CR0_CD | X86_CR0_NW; cr0 |= X86_CR0_ET; #ifdef CONFIG_X86_64 if (cr0 & 0xffffffff00000000UL) return 1; #endif cr0 &= ~CR0_RESERVED_BITS; i...
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
166,605,558,361,072,850,000,000,000,000,000,000,000
44
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
random_poll() { rndstats.slowpolls++; read_random_source( 2, POOLSIZE/5, 1 ); }
0
[ "CWE-200" ]
gnupg
c6dbfe89903d0c8191cf50ecf1abb3c8458b427a
279,893,179,188,051,200,000,000,000,000,000,000,000
5
random: Hash continuous areas in the csprng pool. * cipher/random.c (mix_pool): Store the first hash at the end of the pool. -- This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG. An attacker who obtains 580 bytes of the random number from the standard RNG can trivially predict the next 20 bytes of ou...
static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame) { if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { int i; int num_planes = av_pix_fmt_count_planes(frame->format); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); int flags = desc ? desc...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
22,304,357,633,904,920,000,000,000,000,000,000,000
23
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ExportFormPackages ( IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID ...
0
[ "CWE-416" ]
edk2
c32be82e99ef272e7fa742c2f06ff9a4c3756613
63,918,898,228,379,480,000,000,000,000,000,000,000
63
MdeModulePkg/HiiDB: Remove configuration table when it's freed (CVE-2019-14586) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1995 Fix the corner case issue that the original configuration runtime memory is freed, but it is still exposed to the OS runtime. So this patch is to remove the configuration table to a...
static void renameTableFunc( sqlite3_context *context, int NotUsed, sqlite3_value **argv ){ sqlite3 *db = sqlite3_context_db_handle(context); const char *zDb = (const char*)sqlite3_value_text(argv[0]); const char *zInput = (const char*)sqlite3_value_text(argv[3]); const char *zOld = (const char*)sqlite3_v...
1
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
233,033,857,432,643,000,000,000,000,000,000,000,000
131
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
static void TIFFReadPhotoshopLayers(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { const char *option; const StringInfo *profile; Image *layers; ImageInfo *clone_info; PSDInfo info; register ssize_t i; if (GetImageListLength(image) != 1) return; ...
0
[ "CWE-125" ]
ImageMagick6
d8d844c6f23f4d90d8fe893fe9225dd78fc1e6ef
91,127,398,222,508,990,000,000,000,000,000,000,000
75
https://github.com/ImageMagick/ImageMagick/issues/1532
static void sign_jwt_token_hs384(buffer_t *tokenbuf, buffer_t *key) { i_assert(key != NULL); buffer_t *sig = t_hmac_buffer(&hash_method_sha384, key->data, key->used, tokenbuf); buffer_append(tokenbuf, ".", 1); base64url_encode(BASE64_ENCODE_FLAG_NO_PADDING, SIZE_MAX, sig->data, sig->used, tokenbuf); }
0
[ "CWE-22" ]
core
15682a20d5589ebf5496b31c55ecf9238ff2457b
326,202,878,500,765,200,000,000,000,000,000,000,000
9
lib-oauth2: Do not escape '.' This is not really needed and just makes things difficult.
Event_queue_element_for_exec::init(LEX_STRING db, LEX_STRING n) { if (!(dbname.str= my_strndup(db.str, dbname.length= db.length, MYF(MY_WME)))) return TRUE; if (!(name.str= my_strndup(n.str, name.length= n.length, MYF(MY_WME)))) { my_free(dbname.str); return TRUE; } return FALSE; }
0
[ "CWE-284" ]
server
0b5a5258abbeaf8a0c3a18c7e753699787fdf46e
218,325,087,102,092,100,000,000,000,000,000,000,000
11
MW-416 DDL replication moved after acl checking galera_events test shows a regression with the original fix for MW-416 Reason was that Events::drop_event() can be called also from inside event execution, and there we have a speacial treatment for event, which executes "DROP EVENT" statement, and runs TOI replication i...
void readcb(struct ev_loop *loop, ev_io *w, int revents) { auto conn = static_cast<Connection *>(w->data); auto dconn = static_cast<HttpDownstreamConnection *>(conn->data); auto downstream = dconn->get_downstream(); auto upstream = downstream->get_upstream(); auto handler = upstream->get_client_handler(); ...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
97,670,892,408,777,220,000,000,000,000,000,000,000
11
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *msg, const xmlChar * val) { if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; if (ctxt != NULL) ctxt->errNo = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, ...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
91,632,327,535,474,570,000,000,000,000,000,000,000
13
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
void ssl_set_client_disabled(SSL *s) { CERT *c = s->cert; const unsigned char *sigalgs; size_t i, sigalgslen; int have_rsa = 0, have_dsa = 0, have_ecdsa = 0; c->mask_a = 0; c->mask_k = 0; /* Don't allow TLS 1.2 only ciphers if we don't suppport them */ if (!SSL_CLIENT_USE_TLS1_2_CIPHERS(s)) c->mask_ssl = SSL...
0
[ "CWE-19" ]
openssl
45473632c54947859a731dfe2db087c002ef7aa7
265,116,549,434,105,320,000,000,000,000,000,000,000
74
Prevent use of RSA+MD5 in TLS 1.2 by default. Removing RSA+MD5 from the default signature algorithm list prevents its use by default. If a broken implementation attempts to use RSA+MD5 anyway the sanity checking of signature algorithms will cause a fatal alert.
static Status ValidateNode(const NodeDef& node) { const auto node_iterator = node.attr().find("value"); if (node_iterator != node.attr().end()) { AttrValue node_value = node_iterator->second; if (node_value.has_tensor()) { const PartialTensorShape node_shape(node_value.tensor().tensor_shape()); ...
0
[ "CWE-20", "CWE-703" ]
tensorflow
adf095206f25471e864a8e63a0f1caef53a0e3a6
188,414,905,113,049,400,000,000,000,000,000,000,000
20
Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`. We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail. PiperOrigin-RevId: 332536309 Change...
verify_peer_certificate (GTlsConnectionBase *tls, GTlsCertificate *peer_certificate) { GTlsConnectionBaseClass *tls_class = G_TLS_CONNECTION_BASE_GET_CLASS (tls); GSocketConnectable *peer_identity = NULL; GTlsDatabase *database; GTlsCertificateFlags errors = 0; gboolean is_client; ...
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
36,903,878,538,036,404,000,000,000,000,000,000,000
54
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
validate_nameerror_response(struct module_env* env, struct val_env* ve, struct query_info* qchase, struct reply_info* chase_reply, struct key_entry_key* kkey, int* rcode) { int has_valid_nsec = 0; int has_valid_wnsec = 0; int nsec3s_seen = 0; struct ub_packed_rrset_key* s; size_t i; uint8_t* ce; int ce_labs =...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
112,738,851,501,563,400,000,000,000,000,000,000,000
86
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
bool Item_func_between::fix_length_and_dec() { max_length= 1; /* As some compare functions are generated after sql_yacc, we have to check for out of memory conditions here */ if (!args[0] || !args[1] || !args[2]) return TRUE; if (m_comparator.aggregate_for_comparison(Item_func_between::func_name(...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
244,895,274,175,902,200,000,000,000,000,000,000,000
20
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
void sunionDiffGenericCommand(client *c, robj **setkeys, int setnum, robj *dstkey, int op) { robj **sets = zmalloc(sizeof(robj*)*setnum); setTypeIterator *si; robj *dstset = NULL; sds ele; int j, cardinality = 0; int diff_algo = 1; for (j = 0; j < setnum; j++) ...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
78,607,040,030,256,610,000,000,000,000,000,000,000
160
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
void mysql_read_default_options(struct st_mysql_options *options, const char *filename,const char *group) { int argc; char *argv_buff[1],**argv; const char *groups[3]; DBUG_ENTER("mysql_read_default_options"); DBUG_PRINT("enter",("file: %s group: %s",filename,group ? group :"NULL")); compile_time_ass...
1
[ "CWE-319" ]
mysql-server
060b1eadf4913f7066484ea34ec62feead1bca44
288,493,273,593,562,520,000,000,000,000,000,000,000
213
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)
static int __sctp_setsockopt_connectx(struct sock *sk, struct sockaddr __user *addrs, int addrs_size, sctp_assoc_t *assoc_id) { int err = 0; struct sockaddr *kaddrs; pr_debug("%s: sk:%p addrs:%p addrs_size:%d\n", __func__, sk, addrs, addrs_size); if (unlikely(addrs_size <= 0)) r...
0
[ "CWE-362", "CWE-703" ]
linux
2d45a02d0166caf2627fe91897c6ffc3b19514c4
94,484,539,626,671,200,000,000,000,000,000,000,000
33
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could l...
PHP_MINIT_FUNCTION(pcntl) { php_register_signal_constants(INIT_FUNC_ARGS_PASSTHRU); php_pcntl_register_errno_constants(INIT_FUNC_ARGS_PASSTHRU); php_add_tick_function(pcntl_signal_dispatch); return SUCCESS; }
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
283,686,760,624,177,600,000,000,000,000,000,000,000
8
Fixed bug #69418 - more s->p fixes for filenames
ZEND_VM_COLD_CONSTCONST_HANDLER(9, ZEND_BW_OR, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) { /*...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
163,597,838,022,477,100,000,000,000,000,000,000,000
18
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
GF_Err stsh_Size(GF_Box *s) { GF_ShadowSyncBox *ptr = (GF_ShadowSyncBox *)s; ptr->size += 4 + (8 * gf_list_count(ptr->entries)); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
64,784,759,094,584,860,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) { struct ieee80211_local *local = wiphy_priv(wiphy); int err; if (changed & WIPHY_PARAM_FRAG_THRESHOLD) { ieee80211_check_fast_xmit_all(local); err = drv_set_frag_threshold(local, wiphy->frag_threshold); if (err) { ieee80211_check_fa...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
18,387,671,847,510,107,000,000,000,000,000,000,000
56
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static inline int vmcs12_read_any(struct kvm_vcpu *vcpu, unsigned long field, u64 *ret) { short offset = vmcs_field_to_offset(field); char *p; if (offset < 0) return offset; p = ((char *)(get_vmcs12(vcpu))) + offset; switch (vmcs_field_type(field)) { case VMCS_FIELD_TYPE_NATURAL_WIDTH: *ret = *((natu...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
278,773,008,676,634,620,000,000,000,000,000,000,000
29
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...
f_searchpos(typval_T *argvars, typval_T *rettv) { pos_T match_pos; int lnum = 0; int col = 0; int n; int flags = 0; if (rettv_list_alloc(rettv) == FAIL) return; n = search_cmn(argvars, &match_pos, &flags); if (n > 0) { lnum = match_pos.lnum; col = match_pos.col; } l...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
122,749,438,785,638,270,000,000,000,000,000,000,000
23
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
miniflow_extract(struct dp_packet *packet, struct miniflow *dst) { const struct pkt_metadata *md = &packet->md; const void *data = dp_packet_data(packet); size_t size = dp_packet_size(packet); uint64_t *values = miniflow_values(dst); struct mf_ctx mf = { FLOWMAP_EMPTY_INITIALIZER, values, ...
1
[ "CWE-400" ]
ovs
354e7d860e444fd1472541b0fdc3b8678aa74828
128,757,808,829,141,470,000,000,000,000,000,000,000
337
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...
static int parse_exports_table(long long *table_start) { /* * Note on overflow limits: * Size of SBlk.s.inodes is 2^32 (unsigned int) * Max indexes is (2^32*8)/8K or 2^22 * Max length is ((2^32*8)/8K)*8 or 2^25 */ int res; int indexes = SQUASHFS_LOOKUP_BLOCKS((long long) sBlk.s.inodes); int length = SQUAS...
0
[ "CWE-22" ]
squashfs-tools
79b5a555058eef4e1e7ff220c344d39f8cd09646
275,749,418,019,080,700,000,000,000,000,000,000,000
41
Unsquashfs: fix write outside destination directory exploit An issue on Github (https://github.com/plougher/squashfs-tools/issues/72) shows how some specially crafted Squashfs filesystems containing invalid file names (with '/' and ..) can cause Unsquashfs to write files outside of the destination directory. This com...
int kvm_pv_send_ipi(struct kvm *kvm, unsigned long ipi_bitmap_low, unsigned long ipi_bitmap_high, u32 min, unsigned long icr, int op_64_bit) { struct kvm_apic_map *map; struct kvm_lapic_irq irq = {0}; int cluster_size = op_64_bit ? 64 : 32; int count; if (icr & (APIC_DEST_MASK | APIC_SHORT_MASK)) re...
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
161,510,698,316,145,930,000,000,000,000,000,000,000
30
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
int xt_compat_target(void *target, void **dstptr, int *size, int convert) { struct xt_target *t; struct compat_xt_entry_target *pcompat; struct xt_entry_target *pt; u_int16_t tsize; int off, ret; ret = 0; t = ((struct xt_entry_target *)target)->u.kernel.target; off = XT_ALIGN(t->targetsize) - COMPAT_XT_ALIGN(t...
1
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
177,602,972,204,285,640,000,000,000,000,000,000,000
44
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
my_regcomp(preg, pattern, cflags, charset) my_regex_t *preg; const char *pattern; int cflags; CHARSET_INFO *charset; { struct parse pa; register struct re_guts *g; register struct parse *p = &pa; register int i; register size_t len; #ifdef REDEBUG # define GOODFLAGS(f) (f) #else # define GOODFLAGS(f) ((f)&~REG_DUM...
0
[ "CWE-190" ]
mysql-server
dc45e408250c582eb532417a42cef5b5a8e2fe77
236,482,209,155,995,200,000,000,000,000,000,000,000
116
Bug#20642505: HENRY SPENCER REGULAR EXPRESSIONS (REGEX) LIBRARY The MySQL server uses Henry Spencer's library for regular expressions to support the REGEXP/RLIKE string operator. This changeset adapts a recent fix from the upstream for better 32-bit compatiblity. (Note that we cannot simply use the current upstream ve...
static MagickBooleanType EncodeLabImage(Image *image,ExceptionInfo *exception) { CacheView *image_view; MagickBooleanType status; ssize_t y; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); for (y=0; y < (ssize_t) image->rows; y++) { register Quantum *magi...
0
[ "CWE-399", "CWE-772" ]
ImageMagick
256825d4eb33dc301496710d15cf5a7ae924088b
326,094,303,341,228,800,000,000,000,000,000,000,000
52
Fixed possible memory leak reported in #1206
static inline ut32 r_read_le32(const void *src) { if (!src) { return UT32_MAX; } const ut8 *s = (const ut8*)src; return (((ut32)s[3]) << 24) | (((ut32)s[2]) << 16) | (((ut32)s[1]) << 8) | (((ut32)s[0]) << 0); }
0
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
230,423,468,492,800,320,000,000,000,000,000,000,000
8
Fix #6816 - null deref in r_read_*
Nef_polyhedron_2<T,Items,Mark> operator+(const Nef_polyhedron_2<T,Items,Mark>& N1) const { return join(N1); }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
38,288,849,150,335,453,000,000,000,000,000,000,000
2
Fix Nef_2 and Nef_S2 IO
pid_data_free (PidData *data) { g_free (data->client); g_free (data); }
0
[ "CWE-94", "CWE-74" ]
flatpak
aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4
194,640,155,968,818,380,000,000,000,000,000,000,000
5
portal: Convert --env in extra-args into --env-fd This hides overridden variables from the command-line, which means processes running under other uids can't see them in /proc/*/cmdline, which might be important if they contain secrets. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of: https://github.com/fl...
static bool tg3_enable_msix(struct tg3 *tp) { int i, rc; struct msix_entry msix_ent[TG3_IRQ_MAX_VECS]; tp->txq_cnt = tp->txq_req; tp->rxq_cnt = tp->rxq_req; if (!tp->rxq_cnt) tp->rxq_cnt = netif_get_num_default_rss_queues(); if (tp->rxq_cnt > tp->rxq_max) tp->rxq_cnt = tp->rxq_max; /* Disable multiple TX r...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
263,817,542,385,501,900,000,000,000,000,000,000,000
60
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 ...
template <typename CHAR> inline int IsDot(const CHAR* spec, int offset, int end) { if (spec[offset] == '.') { return 1; } else if (spec[offset] == '%' && offset + 3 <= end && spec[offset + 1] == '2' && (spec[offset + 2] == 'e' || spec[offset + 2] == 'E')) { // Found "%2e" return 3; } re...
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
322,528,499,137,379,300,000,000,000,000,000,000,000
10
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) { struct cfg80211_registered_device *rdev; struct cfg80211_internal_bss *scan; struct wireless_dev *wdev; int start = cb->args[2], idx = 0; int err; rtnl_lock(); err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev); if (err) { rtnl_u...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
18,869,999,998,058,208,000,000,000,000,000,000,000
48
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
int raw_socket_poll (CONNECTION* conn, time_t wait_secs) { fd_set rfds; unsigned long long wait_millis, post_t_millis; struct timeval tv, pre_t, post_t; int rv; if (conn->fd < 0) return -1; wait_millis = (unsigned long long)wait_secs * 1000ULL; FOREVER { tv.tv_sec = wait_millis / 1000; tv...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
133,071,582,910,414,780,000,000,000,000,000,000,000
40
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
void CLASS foveon_load_camf() { unsigned type, wide, high, i, j, row, col, diff; ushort huff[258], vpred[2][2] = {{512,512},{512,512}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); type = get4(); get4(); get4(); wide = get4(); high = get4(); if (type == 2) { fread (meta_data, 1, meta_length, ifp);...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
174,085,961,509,126,730,000,000,000,000,000,000,000
41
backported 0.15.4 datachecks
re_compile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) { int r; OnigErrorInfo einfo; r = onig_compile(reg, (UChar* )pattern, (UChar* )(pattern + size), &einfo); if (r != ONIG_NORMAL) { if (IS_NOT_NULL(ebuf)) (void )onig_error_code_to_str((UChar* )ebuf, r, &einfo); } return r...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
211,824,927,056,266,770,000,000,000,000,000,000,000
13
onig-5.9.2
static ssize_t enabled_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) { ssize_t ret = count; if (sysfs_streq(buf, "always")) { clear_bit(TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG, &transparent_hugepage_flags); set_bit(TRANSPARENT_HUGEPAGE_FLAG, &transparent_hugep...
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
1,654,210,244,977,581,800,000,000,000,000,000,000
25
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...
qeh_in_on_read (struct lsquic_stream *stream, lsquic_stream_ctx_t *ctx) { struct qpack_enc_hdl *const qeh = (void *) ctx; ssize_t nread; nread = lsquic_stream_readf(stream, qeh_read_decoder_stream, qeh); if (nread <= 0) { if (nread < 0) { LSQ_WARN("cannot read from encod...
0
[ "CWE-476", "CWE-269" ]
lsquic
a74702c630e108125e71898398737baec8f02238
245,307,398,324,355,840,000,000,000,000,000,000,000
23
Release 3.1.0
ofpacts_pull(struct ofpbuf *ofpacts) { size_t ofs; ofs = ofpacts->size; ofpbuf_pull(ofpacts, ofs); return ofs; }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
241,149,981,455,944,840,000,000,000,000,000,000,000
9
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
has_label(const char *device, const char *label) { const char *devlabel; int ret; devlabel = fsprobe_get_label_by_devname(device); if (!devlabel) return 0; ret = streq_quoted(label, devlabel); my_free(devlabel); return ret; }
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
235,042,497,710,332,830,000,000,000,000,000,000,000
12
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID, int nLUTPoints, cmsFloat64Number Bright, cmsFloat64Number Contrast, ...
1
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
4,158,402,105,610,858,000,000,000,000,000,000,000
77
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
CUser* GetNewUser(CWebSock& WebSock, CUser* pUser) { CSmartPtr<CWebSession> spSession = WebSock.GetSession(); CString sUsername = WebSock.GetParam("newuser"); if (sUsername.empty()) { sUsername = WebSock.GetParam("user"); } if (sUsername.empty()) { WebSock.PrintErrorPage("Invalid Submission [Username...
0
[]
znc
8756be513ab6663dcd64087006b257ff34e8e487
210,015,124,821,407,000,000,000,000,000,000,000,000
199
webadmin/add channel: Correctly handle channel names The CChan constructor makes sure that the channel name begins with a valid channel prefix. Thus, this could change the name of the resulting channel. When you edited an irc network which already had a channel "#foo", were connected to IRC (so ZNC knows which prefix...
gboolean avdtp_stream_remove_cb(struct avdtp *session, struct avdtp_stream *stream, unsigned int id) { GSList *l; struct stream_callback *cb; if (!stream) return FALSE; for (cb = NULL, l = stream->callbacks; l != NULL; l = l->next) { struct stream_callback *tmp = l->data; if (tmp && tmp->id == id) {...
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
86,566,353,529,129,000,000,000,000,000,000,000,000
26
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
RZ_API ut64 rz_bin_dwarf_line_header_get_spec_op_advance_pc(const RzBinDwarfLineHeader *header, ut8 opcode) { rz_return_val_if_fail(header, 0); if (!header->line_range) { // to dodge division by zero return 0; } ut8 adj_opcode = rz_bin_dwarf_line_header_get_adj_opcode(header, opcode); return (adj_opcode / head...
0
[ "CWE-787" ]
rizin
aa6917772d2f32e5a7daab25a46c72df0b5ea406
47,574,100,403,321,820,000,000,000,000,000,000,000
9
Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086)
handle_doffset(CMD_Request *rx_message, CMD_Reply *tx_message) { long sec, usec; double doffset; sec = (long)(ntohl(rx_message->data.doffset.sec)); usec = (long)(ntohl(rx_message->data.doffset.usec)); doffset = (double) sec + 1.0e-6 * (double) usec; LOG(LOGS_INFO, LOGF_CmdMon, "Accumulated delta offset of %...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
279,100,674,291,980,470,000,000,000,000,000,000,000
11
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static ssize_t snd_compr_write(struct file *f, const char __user *buf, size_t count, loff_t *offset) { struct snd_compr_file *data = f->private_data; struct snd_compr_stream *stream; size_t avail; int retval; if (snd_BUG_ON(!data)) return -EFAULT; stream = &data->stream; mutex_lock(&stream->device->lock); ...
0
[ "CWE-703" ]
linux
b35cc8225845112a616e3a2266d2fde5ab13d3ab
331,806,817,273,809,100,000,000,000,000,000,000,000
43
ALSA: compress_core: integer overflow in snd_compr_allocate_buffer() These are 32 bit values that come from the user, we need to check for integer overflows or we could end up allocating a smaller buffer than expected. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
static inline unsigned tx_desc_get_last(uint32_t *desc) { return (desc[1] & DESC_1_TX_LAST) ? 1 : 0; }
0
[ "CWE-835" ]
qemu
e73adfbeec9d4e008630c814759052ed945c3fed
175,537,003,008,618,430,000,000,000,000,000,000,000
4
cadence_gem: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redha...
static PHP_INI_MH(OnChangeMailForceExtra) { /* Don't allow changing it in htaccess */ if (stage == PHP_INI_STAGE_HTACCESS) { return FAILURE; } return SUCCESS; }
0
[]
php-src
9a07245b728714de09361ea16b9c6fcf70cb5685
125,084,176,172,975,300,000,000,000,000,000,000,000
8
Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash
check_for_cryptkey( char_u *cryptkey, /* previous encryption key or NULL */ char_u *ptr, /* pointer to read bytes */ long *sizep, /* length of read bytes */ off_T *filesizep, /* nr of bytes used from file */ int newfile, /* editing a new buffer */ char_u *fname, /* file name to display */ ...
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
76,159,775,663,232,520,000,000,000,000,000,000,000
74
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
int ssl_prepare_clienthello_tlsext(SSL *s) { # ifdef TLSEXT_TYPE_opaque_prf_input { int r = 1; if (s->ctx->tlsext_opaque_prf_input_callback != 0) { r = s->ctx->tlsext_opaque_prf_input_callback(s, NULL, 0, s-> ...
0
[]
openssl
76343947ada960b6269090638f5391068daee88d
46,856,078,018,457,985,000,000,000,000,000,000,000
50
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
gs_copydevice2(gx_device ** pnew_dev, const gx_device * dev, bool keep_open, gs_memory_t * mem) { gx_device *new_dev; const gs_memory_struct_type_t *std = dev->stype; const gs_memory_struct_type_t *new_std; gs_memory_struct_type_t *a_std = 0; int code; if (dev->stype_is_dynamic) ...
0
[]
ghostpdl
79cccf641486a6595c43f1de1cd7ade696020a31
95,238,311,158,247,460,000,000,000,000,000,000,000
70
Bug 699654(2): preserve LockSafetyParams in the nulldevice The nulldevice does not necessarily use the normal setpagedevice machinery, but can be set using the nulldevice operator. In which case, we don't preserve the settings from the original device (in the way setpagedevice does). Since nulldevice does nothing, th...
static struct inet6_ifaddr *if6_get_next(struct seq_file *seq, struct inet6_ifaddr *ifa) { struct if6_iter_state *state = seq->private; struct net *net = seq_file_net(seq); hlist_for_each_entry_continue_rcu_bh(ifa, addr_lst) { if (!net_eq(dev_net(ifa->idev->dev), net)) continue; state->offset++; retu...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
130,405,915,327,899,620,000,000,000,000,000,000,000
26
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
static inline void Process_ipfix_templates(exporter_ipfix_domain_t *exporter, void *flowset_header, uint32_t size_left, FlowSource_t *fs) { ipfix_template_record_t *ipfix_template_record; void *DataPtr; uint32_t id, count; size_left -= 4; // subtract message header DataPtr = flowset_header + 4; ipfix_template_...
0
[]
nfdump
ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8
92,876,311,316,788,180,000,000,000,000,000,000,000
22
Fix security issues in netflow_v9.c and ipfix.c
static int ib_uverbs_comp_event_fasync(int fd, struct file *filp, int on) { struct ib_uverbs_completion_event_file *comp_ev_file = filp->private_data; return fasync_helper(fd, filp, on, &comp_ev_file->ev_queue.async_queue); }
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
264,059,306,059,152,300,000,000,000,000,000,000,000
7
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...