func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b, u64 remaining, u64 expires) { struct cfs_rq *cfs_rq; u64 runtime; u64 starting_runtime = remaining; rcu_read_lock(); list_for_each_entry_rcu(cfs_rq, &cfs_b->throttled_cfs_rq, throttled_list) { struct rq *rq = rq_of(cfs_rq); struct rq_flags r...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
122,920,223,649,548,750,000,000,000,000,000,000,000
39
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
int modbus_receive_confirmation(modbus_t *ctx, uint8_t *rsp) { if (ctx == NULL) { errno = EINVAL; return -1; } return _modbus_receive_msg(ctx, rsp, MSG_CONFIRMATION); }
0
[ "CWE-125" ]
libmodbus
5ccdf5ef79d742640355d1132fa9e2abc7fbaefc
19,766,063,672,322,131,000,000,000,000,000,000,000
9
Fix VD-1301 and VD-1302 vulnerabilities This patch was contributed by Maor Vermucht and Or Peles from VDOO Connected Trust.
bitxor(PG_FUNCTION_ARGS) { VarBit *arg1 = PG_GETARG_VARBIT_P(0); VarBit *arg2 = PG_GETARG_VARBIT_P(1); VarBit *result; int len, bitlen1, bitlen2, i; bits8 *p1, *p2, *r; bits8 mask; bitlen1 = VARBITLEN(arg1); bitlen2 = VARBITLEN(arg2); if (bitlen1 != bitlen2) ereport(ER...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
82,810,854,446,302,210,000,000,000,000,000,000,000
42
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 bool pfn_range_valid_gigantic(struct zone *z, unsigned long start_pfn, unsigned long nr_pages) { unsigned long i, end_pfn = start_pfn + nr_pages; struct page *page; for (i = start_pfn; i < end_pfn; i++) { if (!pfn_valid(i)) return false; page = pfn_to_page(i); if (page_zone(page) != z) retur...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
54,997,686,350,939,960,000,000,000,000,000,000,000
27
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu) { /* * If the AP instructions are not being interpreted and the MSAX3 * facility is not configured for the guest, there is nothing to set up. */ if (!vcpu->kvm->arch.crypto.apie && !test_kvm_facility(vcpu->kvm, 76)) return; vcpu->arch.sie_block->...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
295,185,242,112,643,400,000,000,000,000,000,000,000
28
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
const Type_handler *type_handler() const { return &type_handler_float; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
324,194,778,865,631,100,000,000,000,000,000,000,000
1
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...
int gnutls_system_global_init() { #ifdef _WIN32 #if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20 HMODULE crypto; crypto = LoadLibraryA("Crypt32.dll"); if (crypto == NULL) return GNUTLS_E_CRYPTO_INIT_FAILED; Loaded_CertEnumCRLsInStore = (Type...
0
[ "CWE-20" ]
gnutls
b0a3048e56611a2deee4976aeba3b8c0740655a6
16,721,022,363,898,795,000,000,000,000,000,000,000
23
env: use secure_getenv when reading environment variables
int imap_body_parse_from_bodystructure(const char *bodystructure, string_t *dest, const char **error_r) { struct istream *input; struct imap_parser *parser; const struct imap_arg *args; int ret; input = i_stream_create_from_data(bodystructure, strlen(bodystructure)); (void)i_stream_read(input); pars...
0
[ "CWE-20" ]
core
266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19
273,510,545,349,333,300,000,000,000,000,000,000,000
28
lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit If the last MIME part was message/rfc822 and its child was truncated away, BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by writing empty dummy ones.
process_owned_by(Relation seqrel, List *owned_by, bool for_identity) { DependencyType deptype; int nnames; Relation tablerel; AttrNumber attnum; deptype = for_identity ? DEPENDENCY_INTERNAL : DEPENDENCY_AUTO; nnames = list_length(owned_by); Assert(nnames > 0); if (nnames == 1) { /* Must be OWNED BY NONE ...
0
[ "CWE-94" ]
postgres
cc7e0feba51b4aeb0adf9bdac659f83e9986b90d
218,822,688,808,948,900,000,000,000,000,000,000,000
108
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq) { int i; int j = 0; for (i = vq->done_idx; i != vq->upend_idx; i = (i + 1) % UIO_MAXIOV) { if ((vq->heads[i].len == VHOST_DMA_DONE_LEN)) { vq->heads[i].len = VHOST_DMA_CLEAR_LEN; vhost_add_used_and_signal(vq->dev, vq, vq->heads[i].id, 0); ...
0
[]
linux-2.6
bd97120fc3d1a11f3124c7c9ba1d91f51829eb85
253,957,392,548,335,200,000,000,000,000,000,000,000
18
vhost: fix length for cross region descriptor If a single descriptor crosses a region, the second chunk length should be decremented by size translated so far, instead it includes the full descriptor length. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: D...
static int setup_ctxt(struct qib_pportdata *ppd, int ctxt, struct file *fp, const struct qib_user_info *uinfo) { struct qib_filedata *fd = fp->private_data; struct qib_devdata *dd = ppd->dd; struct qib_ctxtdata *rcd; void *ptmp = NULL; int ret; int numa_id; assign_ctxt_affinity(fp, dd); numa_id = qib_...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
281,962,767,296,560,360,000,000,000,000,000,000,000
57
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
void fx_ArrayBuffer(txMachine* the) { txSlot* instance; txInteger byteLength; txInteger maxByteLength = -1; txSlot* property; if (mxIsUndefined(mxTarget)) mxTypeError("call: ArrayBuffer"); mxPushSlot(mxTarget); fxGetPrototypeFromConstructor(the, &mxArrayBufferPrototype); instance = fxNewArrayBufferInstance(th...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
318,391,192,088,336,260,000,000,000,000,000,000,000
30
XS: #896
show_text_in_icons_changed_callback (gpointer callback_data) { show_text_in_icons = eel_preferences_get_enum (NAUTILUS_PREFERENCES_SHOW_TEXT_IN_ICONS); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
313,066,649,901,992,370,000,000,000,000,000,000,000
4
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv) { if (what_arg->v_type == VAR_UNKNOWN) { if (rettv_list_alloc(rettv) == OK) if (is_qf || wp != NULL) (void)get_errorlist(NULL, wp, -1, rettv->vval.v_list); } else { if (rettv_dict_alloc(rettv) == OK) if (is_qf |...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
201,661,520,207,816,750,000,000,000,000,000,000,000
25
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.
njs_typed_array_compare(double a, double b) { if (njs_slow_path(isnan(a))) { if (isnan(b)) { return 0; } return 1; } if (njs_slow_path(isnan(b))) { return -1; } if (a < b) { return -1; } if (a > b) { return 1; } return ...
0
[ "CWE-703" ]
njs
5c6130a2a0b4c41ab415f6b8992aa323636338b9
60,263,745,309,814,300,000,000,000,000,000,000,000
24
Fixed Array.prototype.fill() for typed-arrays. This closes #478 issue on Github.
foreachfile_callback (char *dirname, void *data1, void *data2) { file_worker_func *func = *(file_worker_func **) data1; int is_done = 0; char *argz = 0; size_t argz_len = 0; if (list_files_by_dir (dirname, &argz, &argz_len) != 0) goto cleanup; if (!argz) goto cleanup; { char *file...
0
[]
libtool
e91f7b960032074a55fc91273c1917e3082b5338
339,199,477,264,227,900,000,000,000,000,000,000,000
25
Don't load module.la from current directory by default. * libltdl/ltdl.c (try_dlopen): Do not attempt to load an unqualified module.la file from the current directory (by default) since doing so is insecure and is not compliant with the documentation. * tests/testsuite.at: Qualify access to module.la file in current d...
static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) { struct rb_node *n = alloc->free_buffers.rb_node; struct binder_buffer *buffer; size_t buffer_size; struct rb_node *best_fit = NU...
1
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
113,961,485,178,476,420,000,000,000,000,000,000,000
162
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
GetLengthMemory(const CSoundFile &sf) : sndFile(sf) , state(mpt::make_unique<CSoundFile::PlayState>(sf.m_PlayState)) { Reset(); }
0
[ "CWE-125" ]
openmpt
7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c
255,726,884,015,527,830,000,000,000,000,000,000,000
6
[Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27
handle_manual_delete(CMD_Request *rx_message, CMD_Reply *tx_message) { int status; int index; index = ntohl(rx_message->data.manual_delete.index); status = MNL_DeleteSample(index); if (!status) { tx_message->status = htons(STT_BADSAMPLE); } else { tx_message->status = htons(STT_SUCCESS); } }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
216,722,869,561,113,120,000,000,000,000,000,000,000
13
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...
virtual void assertEvaluates(Value input, Value output) override { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); _expr = new ExpressionFloor(expCtx); ExpressionNaryTestOneArg::assertEvaluates(input, output); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
17,930,276,268,574,604,000,000,000,000,000,000,000
5
SERVER-38070 fix infinite loop in agg expression
static void *encap_hash_alloc(void *p) { /* Encap structure is already allocated. */ return p; }
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
115,512,946,231,769,200,000,000,000,000,000,000,000
5
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
static void i40e_queue_pair_disable_irq(struct i40e_vsi *vsi, int queue_pair) { struct i40e_ring *rxr = vsi->rx_rings[queue_pair]; struct i40e_pf *pf = vsi->back; struct i40e_hw *hw = &pf->hw; /* For simplicity, instead of removing the qp interrupt causes * from the interrupt linked list, we simply disable the i...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
19,364,177,566,590,867,000,000,000,000,000,000,000
26
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
private uint32_t do_ops(struct magic *m, intmax_t lhs, intmax_t off) { intmax_t offset; if (off) { switch (m->in_op & FILE_OPS_MASK) { case FILE_OPAND: offset = lhs & off; break; case FILE_OPOR: offset = lhs | off; break; case FILE_OPXOR: offset = lhs ^ off; break; case FILE_OPADD: off...
0
[ "CWE-787" ]
file
d65781527c8134a1202b2649695d48d5701ac60b
198,777,591,142,377,630,000,000,000,000,000,000,000
37
PR/62: spinpx: limit size of file_printable.
call_expand_word_internal (w, q, i, c, e) WORD_DESC *w; int q, i, *c, *e; { WORD_LIST *result; result = expand_word_internal (w, q, i, c, e); if (result == &expand_word_error || result == &expand_word_fatal) { /* By convention, each time this error is returned, w->word has already been free...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
18,248,059,939,768,626,000,000,000,000,000,000,000
22
bash-4.4-rc2 release
int main(void) { int i; for (i = 0; tests[i].hash; i++) { char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash && strlen(tests[i].hash) < 13) continue; /* expected failure */ if (!strcmp(hash, tests[i].hash)) continue; /* expected success */ puts("FAILED"); return 1; } puts("PASSED"); retur...
0
[ "CWE-310" ]
php-src
aab49e934de1fff046e659cbec46e3d053b41c34
317,148,741,482,387,140,000,000,000,000,000,000,000
18
fix CVE-2012-2143
TfLiteIntArray* TfLiteIntArrayCreate(int size) { int alloc_size = TfLiteIntArrayGetSizeInBytes(size); if (alloc_size <= 0) return NULL; TfLiteIntArray* ret = (TfLiteIntArray*)malloc(alloc_size); if (!ret) return ret; ret->size = size; return ret; }
0
[ "CWE-190" ]
tensorflow
7c8cc4ec69cd348e44ad6a2699057ca88faad3e5
231,945,924,034,172,250,000,000,000,000,000,000,000
8
Fix a dangerous integer overflow and a malloc of negative size. PiperOrigin-RevId: 371254154 Change-Id: I250a98a3df26328770167025670235a963a72da0
CLG_Initialise(void) { clear_subnet(&top_subnet4); clear_subnet(&top_subnet6); if (CNF_GetNoClientLog()) { active = 0; } else { active = 1; } nodes = NULL; max_nodes = 0; n_nodes = 0; }
0
[]
chrony
8f72155b438494e6d8e9e75920c36fd88d90f5b2
230,984,490,760,825,250,000,000,000,000,000,000,000
15
Multiply clientlog node table size when reallocating
PJ_DEF(pj_status_t) pjsua_destroy(void) { return pjsua_destroy2(0); }
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
119,043,153,214,605,060,000,000,000,000,000,000,000
4
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
int ssl_version_supported(const SSL *s, int version) { const version_info *vent; const version_info *table; switch (s->method->version) { default: /* Version should match method version for non-ANY method */ return version_cmp(s, version, s->version) == 0; case TLS_ANY_VERSION: ...
0
[ "CWE-400" ]
openssl
4b390b6c3f8df925dc92a3dd6b022baa9a2f4650
9,276,761,549,219,515,000,000,000,000,000,000,000
28
Excessive allocation of memory in tls_get_message_header() A TLS message includes 3 bytes for its length in the header for the message. This would allow for messages up to 16Mb in length. Messages of this length are excessive and OpenSSL includes a check to ensure that a peer is sending reasonably sized messages in or...
babel_print_v2(netdissect_options *ndo, const u_char *cp, u_int length) { u_int i; u_short bodylen; u_char v4_prefix[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 }; u_char v6_prefix[16] = {0}; ND_TCHECK2(*cp, 4); if (length < 4) goto invalid; bo...
0
[ "CWE-125" ]
tcpdump
12f66f69f7bf1ec1266ddbee90a7616cbf33696b
180,860,731,143,342,280,000,000,000,000,000,000,000
377
(for 4.9.3) CVE-2018-14470/Babel: fix an existing length check In babel_print_v2() the non-verbose branch for an Update TLV compared the TLV Length against 1 instead of 10 (probably a typo), put it right. This fixes a buffer over-read discovered by Henri Salo from Nixu Corporation. Add a test using the capture file ...
bool EOS() const { return (GetKind() == kBlockEOS); }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
159,148,112,411,303,680,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
void kvm_pit_reset(struct kvm_pit *pit) { int i; struct kvm_kpit_channel_state *c; mutex_lock(&pit->pit_state.lock); pit->pit_state.flags = 0; for (i = 0; i < 3; i++) { c = &pit->pit_state.channels[i]; c->mode = 0xff; c->gate = (i != 2); pit_load_count(pit->kvm, i, 0); } mutex_unlock(&pit->pit_state.loc...
0
[ "CWE-362" ]
kvm
2febc839133280d5a5e8e1179c94ea674489dae2
109,996,640,603,283,390,000,000,000,000,000,000,000
18
KVM: x86: Improve thread safety in pit There's a race condition in the PIT emulation code in KVM. In __kvm_migrate_pit_timer the pit_timer object is accessed without synchronization. If the race condition occurs at the wrong time this can crash the host kernel. This fixes CVE-2014-3611. Cc: stable@vger.kernel.org ...
SPICE_GNUC_VISIBLE int spice_server_set_streaming_video(SpiceServer *reds, int value) { if (value != SPICE_STREAM_VIDEO_OFF && value != SPICE_STREAM_VIDEO_ALL && value != SPICE_STREAM_VIDEO_FILTER) return -1; reds->config->streaming_video = value; reds_on_sv_change(reds); return ...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
269,824,641,413,071,320,000,000,000,000,000,000,000
10
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
void CLASS colorcheck() { #define NSQ 24 // Coordinates of the GretagMacbeth ColorChecker squares // width, height, 1st_column, 1st_row int cut[NSQ][4]; // you must set these // ColorChecker Chart under 6500-kelvin illumination static const double gmb_xyY[NSQ][3] = { { 0.400, 0.350, 10.1 }, // Dark Skin ...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
166,118,724,720,673,270,000,000,000,000,000,000,000
67
Avoid overflow in ljpeg_start().
static inline int __kvm_irq_line_state(unsigned long *irq_state, int irq_source_id, int level) { /* Logical OR for level trig interrupt */ if (level) __set_bit(irq_source_id, irq_state); else __clear_bit(irq_source_id, irq_state); return !!(*irq_state); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
232,017,737,054,572,400,000,000,000,000,000,000,000
11
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
HeaderString::Type HeaderString::type() const { // buffer_.index() is correlated with the order of Reference and Inline in the // enum. ASSERT(buffer_.index() == 0 || buffer_.index() == 1); ASSERT((buffer_.index() == 0 && absl::holds_alternative<absl::string_view>(buffer_)) || (buffer_.index() != 0)); ...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
50,296,108,071,298,920,000,000,000,000,000,000,000
10
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...
WandExport MagickBooleanType PixelClearIteratorException( PixelIterator *iterator) { assert(iterator != (PixelIterator *) NULL); assert(iterator->signature == MagickWandSignature); if (iterator->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name); ClearMagickExcept...
0
[ "CWE-369" ]
ImageMagick
a81ca9a1b46a96be83682af3389f0a6f3d0d389d
237,420,039,754,507,200,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/1711
void btrfs_free_device(struct btrfs_device *device) { rcu_string_free(device->name); bio_put(device->flush_bio); kfree(device); }
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
335,838,204,412,218,260,000,000,000,000,000,000,000
6
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
void debug_hdr(const char *dir, struct session *t, const char *start, const char *end) { int len, max; len = sprintf(trash, "%08x:%s.%s[%04x:%04x]: ", t->uniq_id, t->be->id, dir, (unsigned short)t->req->prod->fd, (unsigned short)t->req->cons->fd); max = end - start; UBOUND(max, trashlen - len - 1); len +=...
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
214,034,957,105,349,200,000,000,000,000,000,000,000
11
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
static int linkSane(FD_t wfd, const char *dest) { struct stat sb, lsb; return (fstat(Fileno(wfd), &sb) == 0 && sb.st_size == 0 && (sb.st_mode & ~S_IFMT) == S_IWUSR && lstat(dest, &lsb) == 0 && S_ISREG(lsb.st_mode) && sb.st_dev == lsb.st_dev && sb.st_ino == lsb.st_ino); }
0
[ "CWE-59", "CWE-61" ]
rpm
f2d3be2a8741234faaa96f5fd05fdfdc75779a79
2,703,436,674,546,112,000,000,000,000,000,000,000
9
Restrict following symlinks to directories by ownership (CVE-2017-7500) Only follow directory symlinks owned by target directory owner or root. This prevents privilege escalation from user-writable directories via directory symlinks to privileged directories on package upgrade, while still allowing admin to arrange di...
PHP_FUNCTION(gethostname) { char buf[HOST_NAME_MAX]; if (zend_parse_parameters_none() == FAILURE) { return; } if (gethostname(buf, sizeof(buf) - 1)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to fetch host [%d]: %s", errno, strerror(errno)); RETURN_FALSE; } RETURN_STRING(buf, 1); }
0
[ "CWE-119", "CWE-787" ]
php-src
2fefae47716d501aec41c1102f3fd4531f070b05
131,543,199,896,003,110,000,000,000,000,000,000,000
15
Fixed Sec Bug #67717 segfault in dns_get_record CVE-2014-3597 Incomplete fix for CVE-2014-4049 Check possible buffer overflow - pass real buffer end to dn_expand calls - check buffer len before each read
static UINT drive_process_irp_create(DRIVE_DEVICE* drive, IRP* irp) { UINT32 FileId; DRIVE_FILE* file; BYTE Information; UINT32 FileAttributes; UINT32 SharedAccess; UINT32 DesiredAccess; UINT32 CreateDisposition; UINT32 CreateOptions; UINT32 PathLength; UINT64 allocationSize; const WCHAR* path; if (!drive ...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
252,373,181,711,715,200,000,000,000,000,000,000,000
79
Fixed oob read in irp_write and similar
XLoadFont ( register Display *dpy, _Xconst char *name) { register long nbytes; Font fid; register xOpenFontReq *req; if (_XF86LoadQueryLocaleFont(dpy, name, (XFontStruct **)0, &fid)) return fid; LockDisplay(dpy); GetReq(OpenFont, req); nbytes = req->nbytes = name ? (CARD16) s...
1
[ "CWE-120" ]
libx11
8d2e02ae650f00c4a53deb625211a0527126c605
198,634,355,357,261,960,000,000,000,000,000,000,000
22
Reject string longer than USHRT_MAX before sending them on the wire The X protocol uses CARD16 values to represent the length so this would overflow. CVE-2021-31535 Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
inline void SetActivationParams(float min, float max, P* params) { params->float_activation_min = min; params->float_activation_max = max; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
8ee24e7949a203d234489f9da2c5bf45a7d5157d
266,279,468,994,307,540,000,000,000,000,000,000,000
4
[tflite] Ensure `MatchingDim` does not allow buffer overflow. We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ...
static inline bool PageHugeTemporary(struct page *page) { if (!PageHuge(page)) return false; return (unsigned long)page[2].mapping == -1U; }
0
[ "CWE-362" ]
linux
17743798d81238ab13050e8e2833699b54e15467
154,422,648,130,914,260,000,000,000,000,000,000,000
7
mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write ...
static int link_set_ipv6_accept_ra(Link *link) { const char *p = NULL, *v = NULL; int r; /* Make this a NOP if IPv6 is not available */ if (!socket_ipv6_is_supported()) return 0; if (link->flags & IFF_LOOPBACK) return 0; /* If unset use ...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
114,415,863,522,150,670,000,000,000,000,000,000,000
38
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
int mkpath_as_root(const char* path) { assert(path && *path); // work on a copy of the path char *file_path = strdup(path); if (!file_path) errExit("strdup"); char* p; int done = 0; for (p=strchr(file_path+1, '/'); p; p=strchr(p+1, '/')) { *p='\0'; if (mkdir(file_path, 0755)==-1) { if (errno != EEXIST...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
53,126,528,225,994,940,000,000,000,000,000,000,000
32
fixing CVE-2022-31214
Method* LinkResolver::resolve_method(const LinkInfo& link_info, Bytecodes::Code code, TRAPS) { Handle nested_exception; Klass* resolved_klass = link_info.resolved_klass(); // 1. For invokevirtual, cannot call an interface method if (code == Bytecodes::_invokevirtual && res...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
139,529,478,946,698,000,000,000,000,000,000,000,000
73
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
find_last_paren(char_u *l, int start, int end) { int i; int retval = FALSE; int open_count = 0; curwin->w_cursor.col = 0; // default is start of line for (i = 0; l[i] != NUL; i++) { i = (int)(cin_skipcomment(l + i) - l); // ignore parens in comments i = (int)(skip_string(l + i) - l);...
0
[ "CWE-122", "CWE-787" ]
vim
2de9b7c7c8791da8853a9a7ca9c467867465b655
188,336,296,564,036,060,000,000,000,000,000,000,000
27
patch 8.2.3625: illegal memory access when C-indenting Problem: Illegal memory access when C-indenting. Solution: Also set the cursor column.
dtv_property_legacy_params_sync(struct dvb_frontend *fe, const struct dtv_frontend_properties *c, struct dvb_frontend_parameters *p) { p->frequency = c->frequency; p->inversion = c->inversion; switch (dvbv3_type(c->delivery_system)) { case DVBV3_UNKNOWN: dev_err(fe->dvb->device, "%s: doesn't know how...
0
[ "CWE-416" ]
linux
b1cb7372fa822af6c06c8045963571d13ad6348b
171,422,685,605,465,200,000,000,000,000,000,000,000
63
dvb_frontend: don't use-after-free the frontend struct dvb_frontend_invoke_release() may free the frontend struct. So, the free logic can't update it anymore after calling it. That's OK, as __dvb_frontend_free() is called only when the krefs are zeroed, so nobody is using it anymore. That should fix the following KA...
static int gdLayerOverlay (int dst, int src) { int a1, a2; a1 = gdAlphaMax - gdTrueColorGetAlpha(dst); a2 = gdAlphaMax - gdTrueColorGetAlpha(src); return ( ((gdAlphaMax - a1*a2/gdAlphaMax) << 24) + (gdAlphaOverlayColor( gdTrueColorGetRed(src), gdTrueColorGetRed(dst), gdRedMax ) << 16) + (gdAlphaOverlayColor( gd...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
35,406,473,542,547,145,000,000,000,000,000,000,000
11
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
static void test_wl6797() { MYSQL_STMT *stmt; int rc; const char *stmt_text; my_ulonglong res; myheader("test_wl6797"); if (mysql_get_server_version(mysql) < 50703) { if (!opt_silent) fprintf(stdout, "Skipping test_wl6797: " "tested feature does not exist in versions before...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
90,466,642,948,103,840,000,000,000,000,000,000,000
75
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
pci_write_dsdt(void) { int bus; dsdt_indent(1); dsdt_line("Name (PICM, 0x00)"); dsdt_line("Method (_PIC, 1, NotSerialized)"); dsdt_line("{"); dsdt_line(" Store (Arg0, PICM)"); dsdt_line("}"); dsdt_line(""); dsdt_line("Scope (_SB)"); dsdt_line("{"); for (bus = 0; bus < MAXBUSES; bus++) pci_bus_write_dsdt(...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
248,585,363,724,422,060,000,000,000,000,000,000,000
18
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, struct srpt_recv_ioctx *recv_ioctx, struct srpt_send_ioctx *send_ioctx) { struct srp_tsk_mgmt *srp_tsk; struct se_cmd *cmd; struct se_session *sess = ch->sess; uint64_t unpacked_lun; uint32_t tag = 0; int tcm_tmr; int rc; BUG_ON(!send_ioctx); ...
1
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
261,808,458,123,180,300,000,000,000,000,000,000,000
52
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static void acm_tty_unthrottle(struct tty_struct *tty) { struct acm *acm = tty->driver_data; unsigned int was_throttled; spin_lock_irq(&acm->read_lock); was_throttled = acm->throttled; acm->throttled = 0; acm->throttle_req = 0; spin_unlock_irq(&acm->read_lock); if (was_throttled) acm_submit_read_urbs(acm, G...
0
[ "CWE-703" ]
linux
8835ba4a39cf53f705417b3b3a94eb067673f2c9
144,271,424,664,473,760,000,000,000,000,000,000,000
14
USB: cdc-acm: more sanity checking An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: sta...
static void xen_machine_power_off(void) { do_kernel_power_off(); xen_reboot(SHUTDOWN_poweroff); }
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
62,893,059,900,072,450,000,000,000,000,000,000,000
5
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
static struct sk_buff *br_multicast_alloc_query(struct net_bridge *br, struct br_ip *addr) { switch (addr->proto) { case htons(ETH_P_IP): return br_ip4_multicast_alloc_query(br, addr->u.ip4); #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) case htons(ETH_P_IPV6): return br_ip6_multicast_alloc_query...
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
86,309,383,188,949,080,000,000,000,000,000,000,000
13
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
static int coroutine_fn bdrv_aligned_preadv(BlockDriverState *bs, BdrvTrackedRequest *req, int64_t offset, unsigned int bytes, int64_t align, QEMUIOVector *qiov, int flags) { BlockDriver *drv = bs->drv; int ret; int64_t sector_num = offset >> BDRV_SECTOR_BITS; unsigned int nb_sectors = bytes >>...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
70,466,443,041,748,870,000,000,000,000,000,000,000
74
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
void AuthorizationManagerImpl::_invalidateRelevantCacheData(const char* op, const NamespaceString& ns, const BSONObj& o, const BSONObj* o2) ...
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
312,607,616,362,125,760,000,000,000,000,000,000,000
31
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
_copyJoinExpr(const JoinExpr *from) { JoinExpr *newnode = makeNode(JoinExpr); COPY_SCALAR_FIELD(jointype); COPY_SCALAR_FIELD(isNatural); COPY_NODE_FIELD(larg); COPY_NODE_FIELD(rarg); COPY_NODE_FIELD(usingClause); COPY_NODE_FIELD(quals); COPY_NODE_FIELD(alias); COPY_SCALAR_FIELD(rtindex); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
248,783,435,862,411,600,000,000,000,000,000,000,000
15
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static void start_auth_request(PgSocket *client, const char *username) { int res; PktBuf *buf; client->auth_user = client->db->auth_user; /* have to fetch user info from db */ client->pool = get_pool(client->db, client->db->auth_user); if (!find_server(client)) { client->wait_for_user_conn = true; return; }...
1
[ "CWE-287", "CWE-284" ]
pgbouncer
7ca3e5279d05fceb1e8a043c6f5b6f58dea3ed38
239,801,419,309,040,540,000,000,000,000,000,000,000
37
Remove too early set of auth_user When query returns 0 rows (user not found), this user stays as login user... Should fix #69.
static int perf_copy_attr(struct perf_event_attr __user *uattr, struct perf_event_attr *attr) { u32 size; int ret; if (!access_ok(VERIFY_WRITE, uattr, PERF_ATTR_SIZE_VER0)) return -EFAULT; /* * zero the full structure, so that a short copy will be nice. */ memset(attr, 0, sizeof(*attr)); ret = get_u...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
220,418,458,124,470,750,000,000,000,000,000,000,000
128
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
static int cmd_ls(void *data, const char *input) { // "ls" RCore *core = (RCore *)data; const char *arg = strchr (input, ' '); if (arg) { arg = r_str_trim_ro (arg + 1); } switch (*input) { case '?': // "l?" eprintf ("Usage: l[es] # ls to list files, le[ss] to less a file\n"); break; case 'e': // "le" if ...
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
161,299,050,623,994,390,000,000,000,000,000,000,000
34
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
static AVRational get_timebase(struct playlist *pls) { if (pls->is_id3_timestamped) return MPEG_TIME_BASE_Q; return pls->ctx->streams[pls->pkt.stream_index]->time_base; }
0
[ "CWE-703" ]
FFmpeg
7ba100d3e6e8b1e5d5342feb960a7f081d6e15af
288,286,982,070,453,470,000,000,000,000,000,000,000
7
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
TEST_F(Http1ServerConnectionImplTest, UpgradeRequestWithEarlyData) { initialize(); InSequence sequence; NiceMock<MockRequestDecoder> decoder; EXPECT_CALL(callbacks_, newStream(_, _)).WillOnce(ReturnRef(decoder)); Buffer::OwnedImpl expected_data("12345abcd"); EXPECT_CALL(decoder, decodeHeaders_(_, false));...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
193,272,972,359,066,140,000,000,000,000,000,000,000
15
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
parser_get_class_field_info_size (uint8_t class_field_type) /**< class field type */ { if (class_field_type & PARSER_CLASS_FIELD_INITIALIZED) { return sizeof (scanner_range_t) + 1; } if (class_field_type & PARSER_CLASS_FIELD_NORMAL) { return sizeof (scanner_location_t) + 1; } return 1; } /* pars...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
163,941,542,796,696,730,000,000,000,000,000,000,000
14
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static u8 dccp_feat_prefer(u8 preferred_value, u8 *array, u8 array_len) { u8 i, does_occur = 0; if (array != NULL) { for (i = 0; i < array_len; i++) if (array[i] == preferred_value) { array[i] = array[0]; does_occur++; } if (does_occur) array[0] = preferred_value; } return does_occur; }
0
[ "CWE-401" ]
linux
1d3ff0950e2b40dc861b1739029649d03f591820
144,879,453,924,267,570,000,000,000,000,000,000,000
15
dccp: Fix memleak in __feat_register_sp If dccp_feat_push_change fails, we forget free the mem which is alloced by kmemdup in dccp_feat_clone_sp_val. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values") Reviewed-by: Mukesh Ojha <mojha@codeaurora.o...
int LibRaw::phase_one_subtract_black(ushort *src, ushort *dest) { try { if (O.user_black < 0 && O.user_cblack[0] <= -1000000 && O.user_cblack[1] <= -1000000 && O.user_cblack[2] <= -1000000 && O.user_cblack[3] <= -1000000) { if (!imgdata.rawdata.ph1_cblack || !imgdata.rawdata.ph1_rblack) ...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
270,394,363,626,199,280,000,000,000,000,000,000,000
62
fixed two more problems found by fuzzer
asc_initcap(const char *buff, size_t nbytes) { char *result; char *p; int wasalnum = false; if (!buff) return NULL; result = pnstrdup(buff, nbytes); for (p = result; *p; p++) { char c; if (wasalnum) *p = c = pg_ascii_tolower((unsigned char) *p); else *p = c = pg_ascii_toupper((unsigned...
0
[ "CWE-120" ]
postgres
0150ab567bcf5e5913e2b62a1678f84cc272441f
212,680,192,897,204,700,000,000,000,000,000,000,000
27
to_char(): prevent accesses beyond the allocated buffer Previously very long field masks for floats could access memory beyond the existing buffer allocated to hold the result. Reported by Andres Freund and Peter Geoghegan. Backpatch to all supported versions. Security: CVE-2015-0241
static inline uint64_t storage_size_max(void) { if (arg_storage == COREDUMP_STORAGE_EXTERNAL) return arg_external_size_max; if (arg_storage == COREDUMP_STORAGE_JOURNAL) return arg_journal_size_max; assert(arg_storage == COREDUMP_STORAGE_NONE); return 0; }
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
131,331,049,784,269,180,000,000,000,000,000,000,000
8
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
static void atl2_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) { struct atl2_adapter *adapter = netdev_priv(netdev); strlcpy(drvinfo->driver, atl2_driver_name, sizeof(drvinfo->driver)); strlcpy(drvinfo->version, atl2_driver_version, sizeof(drvinfo->version)); strlcpy(drvinfo->fw_versi...
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
112,024,966,906,599,400,000,000,000,000,000,000,000
12
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
ngx_mail_auth_login_username(ngx_mail_session_t *s, ngx_connection_t *c, ngx_uint_t n) { ngx_str_t *arg; arg = s->args.elts; ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0, "mail auth login username: \"%V\"", &arg[n]); s->login.data = ngx_pnalloc(c->pool, ngx_base64_decoded_leng...
0
[ "CWE-284", "CWE-295" ]
nginx
173f16f736c10eae46cd15dd861b04b82d91a37a
109,509,048,710,704,210,000,000,000,000,000,000,000
26
Mail: max_errors directive. Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands in Exim, specifies the number of errors after which the connection is closed.
bool InferenceContext::FullyDefined(ShapeHandle s) { if (!RankKnown(s)) return false; for (int i = 0; i < Rank(s); ++i) { if (!ValueKnown(Dim(s, i))) return false; } return true; }
0
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
30,937,829,133,244,290,000,000,000,000,000,000,000
7
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
static void h2_session_ev_stream_change(h2_session *session, int arg, const char *msg) { switch (session->state) { case H2_SESSION_ST_IDLE: case H2_SESSION_ST_WAIT: transit(session, "stream change", H2_SESSION_ST_BUSY); break; default: /* nop */ ...
0
[]
mod_h2
5e75e5685dd043fe93a5a08a15edd087a43f6968
4,332,374,704,814,541,500,000,000,000,000,000,000
12
v1.11.0 -------------------------------------------------------------------------------- * connection IO event handling reworked. Instead of reacting on incoming bytes, the state machine now acts on incoming frames that are affecting it. This reduces state transitions. * pytest suite now covers some basic tests...
static int make_indexed_dir(handle_t *handle, struct dentry *dentry, struct inode *inode, struct buffer_head *bh) { struct inode *dir = dentry->d_parent->d_inode; const char *name = dentry->d_name.name; int namelen = dentry->d_name.len; struct buffer_head *bh2; struct dx_root *root; struct dx_frame frames...
1
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
248,442,840,806,747,100,000,000,000,000,000,000,000
77
ext4: Add sanity check to make_indexed_dir Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodor...
void ber_write_application_tag(wStream* s, BYTE tag, int length) { if (tag > 30) { Stream_Write_UINT8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK); Stream_Write_UINT8(s, tag); ber_write_length(s, length); } else { Stream_Write_UINT8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag)); ber_...
0
[ "CWE-476" ]
FreeRDP
0dc22d5a30a1c7d146b2a835b2032668127c33e9
126,085,827,939,282,230,000,000,000,000,000,000,000
14
Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically.
void verifyTransportParameters(std::chrono::milliseconds idleTimeout) { EXPECT_EQ(server->getConn().peerIdleTimeout, idleTimeout); if (getCanIgnorePathMTU()) { EXPECT_EQ( server->getConn().udpSendPacketLen, fakeHandshake->maxRecvPacketSize); } }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
278,838,337,679,059,300,000,000,000,000,000,000,000
7
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
version_get (char const *filename, char const *cs, bool exists, bool readonly, char const *getbuf, struct stat *filestat) { if (patch_get < 0) { ask ("Get file %s from %s%s? [y] ", quotearg (filename), cs, readonly ? "" : " with lock"); if (*buf == 'n') return 0; } if (dry_run) {...
0
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
19,675,901,740,808,516,000,000,000,000,000,000,000
30
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
TPMI_DH_PARENT_Unmarshal(TPMI_DH_PARENT *target, BYTE **buffer, INT32 *size, BOOL allowNull) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPM_HANDLE_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { BOOL isNotTransient = (*target < TRANSIENT_FIRST) || (*target > T...
1
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
116,807,068,202,915,500,000,000,000,000,000,000,000
25
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static void i40e_pf_unquiesce_all_vsi(struct i40e_pf *pf) { int v; for (v = 0; v < pf->num_alloc_vsi; v++) { if (pf->vsi[v]) i40e_unquiesce_vsi(pf->vsi[v]); } }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
204,080,871,951,527,250,000,000,000,000,000,000,000
9
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName, const xmlChar *namespaceURI) { xmlAttrPtr prop; xmlNodePtr node; xmlNsPtr ns; xmlChar *prefix = NULL; if ((reader == NULL) || (localName == NULL) || (namespaceURI == NULL)) return(-1); if (reader->node == NULL) ...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
255,935,161,741,780,900,000,000,000,000,000,000,000
48
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
PackLinuxElf32::generateElfHdr( OutputFile *fo, void const *proto, unsigned const brka ) { cprElfHdr2 *const h2 = (cprElfHdr2 *)(void *)&elfout; cprElfHdr3 *const h3 = (cprElfHdr3 *)(void *)&elfout; memcpy(h3, proto, sizeof(*h3)); // reads beyond, but OK h3->ehdr.e_type = ehdri.e_type; // ...
0
[ "CWE-415" ]
upx
d9288213ec156dffc435566b9d393d23e87c6914
283,047,569,146,492,000,000,000,000,000,000,000,000
89
More checking of PT_DYNAMIC and its contents. https://github.com/upx/upx/issues/206 modified: p_lx_elf.cpp
*/ static int kex_method_diffie_hellman_group14_sha1_key_exchange(LIBSSH2_SESSION *session, key_exchange_state_low_t * key_state) { static const unsigned char p_value[256] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xF...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
227,807,072,919,039,300,000,000,000,000,000,000,000
69
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX* ctx, void* userdata) { ctx->SetUserData(userdata); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
2,442,980,927,581,990,400,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
int kvm_add_user_return_msr(u32 msr) { BUG_ON(kvm_nr_uret_msrs >= KVM_MAX_NR_USER_RETURN_MSRS); if (kvm_probe_user_return_msr(msr)) return -1; kvm_uret_msrs_list[kvm_nr_uret_msrs] = msr; return kvm_nr_uret_msrs++; }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
266,539,719,948,647,350,000,000,000,000,000,000,000
10
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 MonClient::init() { ldout(cct, 10) << __func__ << dendl; entity_name = cct->_conf->name; auth_registry.refresh_config(); std::lock_guard l(monc_lock); keyring.reset(new KeyRing); if (auth_registry.is_supported_method(messenger->get_mytype(), CEPH_AUTH_CEPHX)) { // this should succeed, becaus...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
234,683,005,355,761,060,000,000,000,000,000,000,000
38
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
void pjsua_parse_media_type( pj_pool_t *pool, const pj_str_t *mime, pjsip_media_type *media_type) { pj_str_t tmp; char *pos; pj_bzero(media_type, sizeof(*media_type)); pj_strdup_with_null(pool, &tmp, mime); pos = pj_strchr(&tmp, '/'); if (pos) { media_type->type.ptr = tmp.ptr...
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
109,637,783,527,749,690,000,000,000,000,000,000,000
21
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
parse_char_class(Node** np, PToken* tok, UChar** src, UChar* end, ScanEnv* env) { int r, neg, len, fetched, and_start; OnigCodePoint v, vs; UChar *p; Node* node; CClassNode *cc, *prev_cc; CClassNode work_cc; enum CCSTATE state; enum CCVALTYPE val_type, in_type; int val_israw, in_israw; *np = NULL_...
1
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
23,383,879,406,671,130,000,000,000,000,000,000,000
340
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
static CImg<T> get_load_cimg(std::FILE *const file, const char axis='z', const float align=0) { return CImg<T>().load_cimg(file,axis,align); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
105,581,279,140,323,940,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Lua::~Lua() { if(L) lua_close(L); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
98,661,094,097,519,830,000,000,000,000,000,000,000
3
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
bool Shortcut::operator < (const Shortcut &other) const { return (iIndex < other.iIndex); }
0
[ "CWE-310" ]
mumble
5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e
327,705,765,067,244,700,000,000,000,000,000,000,000
3
Explicitly remove file permissions for settings and DB
Http::FilterHeadersStatus decodeHeaders(Http::RequestHeaderMap& headers, bool) override { const auto entry = headers.get(header_); if (!entry.empty()) { decoder_callbacks_->streamInfo().filterState()->setData( state_, std::make_unique<Router::StringAccessorImpl>(entry[0]->value().getStringView...
0
[ "CWE-476", "CWE-703" ]
envoy
9371333230b1a6e1be2eccf4868771e11af6253a
37,502,597,718,993,300,000,000,000,000,000,000,000
10
CVE-2021-43824 jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter configured with regex match. Signed-off-by: Yan Avlasov <yavlasov@google.com>
TEST_CASE("String capture test3", "[general]") { parser pg(R"( ROOT <- _ TOKEN* TOKEN <- '[' < (!']' .)+ > ']' _ _ <- [ \t\r\n]* )"); std::vector<std::string> tags; pg["TOKEN"] = [&](const SemanticValues& sv) { tags.push_back(sv.token()); }; auto ret = pg...
1
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
295,527,743,965,110,200,000,000,000,000,000,000,000
23
Fix #122
compute_tag_length (size_t n) { int needed = 0; if (n < 128) needed += 2; /* tag and one length byte */ else if (n < 256) needed += 3; /* tag, number of length bytes, 1 length byte */ else if (n < 65536) needed += 4; /* tag, number of length bytes, 2 length bytes */ else { log_error ("o...
0
[]
gnupg
ed8383c618e124cfa708c9ee87563fcdf2f4649c
45,728,412,154,605,130,000,000,000,000,000,000,000
17
sm: Avoid double-free on iconv failure * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid double-free of pwbuf. -- Observed by Joshua Rogers <honey@internot.info>, who proposed a slightly different fix. Debian-Bug-Id: 773472 Added fix at a second place - wk.
void ssl2_return_error(SSL *s, int err) { if (!s->error) { s->error=3; s->error_code=err; ssl2_write_error(s); } }
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
269,239,358,378,958,270,000,000,000,000,000,000,000
10
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static void writer_print_integers(WriterContext *wctx, const char *name, uint8_t *data, int size, const char *format, int columns, int bytes, int offset_add) { AVBPrint bp; int offset = 0, l, i; av_bprint_init(&bp, 0, AV_BPRINT_SIZE_UNLIMI...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
189,592,083,791,588,950,000,000,000,000,000,000,000
25
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) { const char *auth_line = apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq) ? "Proxy-Authorization" :...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
261,343,331,578,994,230,000,000,000,000,000,000,000
43
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
bool shouldMergeSlashes() const override { return true; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
330,642,601,351,339,220,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
bool CTransaction::DisconnectInputs(CTxDB& txdb) { // Relinquish previous transactions' spent pointers if (!IsCoinBase()) { BOOST_FOREACH(const CTxIn& txin, vin) { COutPoint prevout = txin.prevout; // Get prev txindex from disk CTxIndex txindex; ...
1
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
267,662,430,972,864,220,000,000,000,000,000,000,000
32
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
static int tls_curve_allowed(SSL *s, const unsigned char *curve, int op) { const tls_curve_info *cinfo; if (curve[0]) return 1; if ((curve[1] < 1) || ((size_t)curve[1] > OSSL_NELEM(nid_list))) return 0; cinfo = &nid_list[curve[1] - 1]; # ifdef OPENSSL_NO_EC2M if (cinfo->flags & TLS_C...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
5,743,363,333,479,559,000,000,000,000,000,000,000
14
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...