func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void svm_set_gdt(struct kvm_vcpu *vcpu, struct desc_ptr *dt) { struct vcpu_svm *svm = to_svm(vcpu); svm->vmcb->save.gdtr.limit = dt->size; svm->vmcb->save.gdtr.base = dt->address ; mark_dirty(svm->vmcb, VMCB_DT); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
81,241,460,372,212,460,000,000,000,000,000,000,000
8
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...
void Magick::Image::strokeColor(const Magick::Color &strokeColor_) { std::string value; modifyImage(); options()->strokeColor(strokeColor_); value=strokeColor_; artifact("stroke",value); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
277,358,003,239,578,850,000,000,000,000,000,000,000
10
Added missing return to avoid use after free.
void MonClient::handle_auth(MAuthReply *m) { ceph_assert(monc_lock.is_locked()); if (!_hunting()) { std::swap(active_con->get_auth(), auth); int ret = active_con->authenticate(m); m->put(); std::swap(auth, active_con->get_auth()); if (global_id != active_con->get_global_id()) { lderr(cct) ...
0
[ "CWE-294" ]
ceph
2927fd91d41e505237cc73f9700e5c6a63e5cb4f
67,643,791,099,111,520,000,000,000,000,000,000,000
44
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...
box_ar(BOX *box) { return box_wd(box) * box_ht(box); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
156,605,734,127,200,950,000,000,000,000,000,000,000
4
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 int piv_get_challenge(sc_card_t *card, u8 *rnd, size_t len) { /* Dynamic Authentication Template (Challenge) */ u8 sbuf[] = {0x7c, 0x02, 0x81, 0x00}; u8 *rbuf = NULL; const u8 *p; size_t rbuf_len = 0, out_len = 0; int r; unsigned int tag, cla; LOG_FUNC_CALLED(card->ctx); /* NIST 800-73-3 says use 9B, ...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
175,232,138,190,208,770,000,000,000,000,000,000,000
41
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
void perf_event_aux_event(struct perf_event *event, unsigned long head, unsigned long size, u64 flags) { struct perf_output_handle handle; struct perf_sample_data sample; struct perf_aux_event { struct perf_event_header header; u64 offset; u64 size; u64 flags; } rec = { .header = { .type ...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
262,205,318,475,180,750,000,000,000,000,000,000,000
33
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
int http_replace_hdrs(struct stream* s, struct htx *htx, struct ist name, const char *str, struct my_regex *re, int full) { struct http_hdr_ctx ctx; struct buffer *output = get_trash_chunk(); ctx.blk = NULL; while (http_find_header(htx, name, &ctx, full)) { if (!regex_exec_match2(re, ctx.value.ptr, ctx.va...
0
[ "CWE-703", "CWE-835" ]
haproxy
bfb15ab34ead85f64cd6da0e9fb418c9cd14cee8
16,892,537,706,428,255,000,000,000,000,000,000,000
19
BUG/MAJOR: http/htx: prevent unbounded loop in http_manage_server_side_cookies Ensure calls to http_find_header() terminate. If a "Set-Cookie2" header is found then the while(1) loop in http_manage_server_side_cookies() will never terminate, resulting in the watchdog firing and the process terminating via SIGABRT. Th...
print_line_header(Dwarf_Debug dbg, Dwarf_Bool is_single_tab, Dwarf_Bool is_actuals_tab) { if (!is_single_tab) { /* Ugly indenting follows, it makes lines shorter to see them better. Best to use a wider text window to really see how it looks.*/ if (is_actuals_tab) { _dwarf_printf(dbg...
0
[]
libdwarf-code
faf99408e3f9f706fc3809dd400e831f989778d3
248,615,818,655,608,920,000,000,000,000,000,000,000
38
modified: libdwarf/dwarf_print_lines.c * dwarf_print_lines.c: In case of corrupted DWARF5 line header the fi_file_name field for a file entry can be null. Now we print a <no file name> string in that case to avoid passing a null to dwarfstring_append. Dwarfbug DW202010-003. Als...
Lock_wait_timeout_handler:: handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */, Sql_condition::enum_warning_level* /* level */, const char *message, Sql_condition ** /* cond_hdl */) { if (sql_errno == ER_LOCK_WAIT_TIMEOUT) { ...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
248,938,073,557,925,700,000,000,000,000,000,000,000
17
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void mpvio_info(Vio *vio, MYSQL_PLUGIN_VIO_INFO *info) { bzero(info, sizeof(*info)); switch (vio->type) { case VIO_TYPE_TCPIP: info->protocol= MYSQL_VIO_TCP; info->socket= vio->sd; return; case VIO_TYPE_SOCKET: info->protocol= MYSQL_VIO_SOCKET; info->socket= vio->sd; return; case VIO_T...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
233,489,480,884,863,000,000,000,000,000,000,000,000
38
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
apply_autocmds( event_T event, char_u *fname, /* NULL or empty means use actual file name */ char_u *fname_io, /* fname to use for <afile> on cmdline */ int force, /* when TRUE, ignore autocmd_busy */ buf_T *buf) /* buffer for <abuf> */ { return apply_autocmds_group(event, fname, f...
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
183,049,901,932,303,900,000,000,000,000,000,000,000
10
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.
dp_packet_batch_init_packet_fields(struct dp_packet_batch *batch) { struct dp_packet *packet; DP_PACKET_BATCH_FOR_EACH (packet, batch) { dp_packet_reset_cutlen(packet); packet->packet_type = htonl(PT_ETH); } }
0
[ "CWE-400" ]
ovs
48ceca0446b1c2c2c03e7551048c5b19ed23cc97
337,041,082,715,439,640,000,000,000,000,000,000,000
9
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 void slist(int d, js_Ast *list) { pc('['); while (list) { assert(list->type == AST_LIST); snode(d, list->a); list = list->b; if (list) pc(' '); } pc(']'); }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
231,635,108,876,914,020,000,000,000,000,000,000,000
12
Issue #161: Cope with empty programs in mujs-pp.
GF_Err gf_isom_get_sidx_duration(GF_ISOFile *movie, u64 *sidx_dur, u32 *sidx_timescale) { u64 dur=0; u32 i; if (!movie || !movie->moov || !sidx_timescale || !sidx_dur) return GF_BAD_PARAM; if (!movie->main_sidx) return GF_NOT_SUPPORTED; *sidx_timescale = movie->main_sidx->timescale; for (i=0; i<movie->main_si...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
18,806,421,661,704,267,000,000,000,000,000,000,000
16
fixed #2120
const AST *ast_tag(const loc_t &loc, const std::string *n, bool h) { AST *ast = new AST(loc, AST::TAG); ast->tag.name = n; ast->tag.history = h; return ast; }
0
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
37,314,735,433,150,137,000,000,000,000,000,000,000
7
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat) { *p++ = htonl(nfs3_ftypes[(stat->mode & S_IFMT) >> 12]); *p++ = htonl((u32) (stat->mode & S_IALLUGO)); *p++ = htonl((u32) stat->nlink); *p++ = htonl((u32) from_kuid(&init_user_ns, stat->uid)); *p++ = htonl((u32) from_k...
0
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
318,294,556,160,197,030,000,000,000,000,000,000,000
24
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
void GetGhostNum(GF_StscEntry *ent, u32 EntryIndex, u32 count, GF_SampleTableBox *stbl) { GF_StscEntry *nextEnt; u32 ghostNum = 1; if (!ent) { stbl->SampleToChunk->ghostNumber = 0; return; } if (!ent->nextChunk) { if (EntryIndex+1 == count) { //not specified in the spec, what if the last sample to chunk...
0
[ "CWE-416", "CWE-401" ]
gpac
2da2f68bffd51d89b1d272d22aa8cc023c1c066e
337,413,207,045,705,340,000,000,000,000,000,000,000
30
fixed #1705
static ssize_t fuse_direct_write_iter(struct kiocb *iocb, struct iov_iter *from) { struct inode *inode = file_inode(iocb->ki_filp); struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb); ssize_t res; /* Don't allow parallel writes to the same file */ inode_lock(inode); res = generic_write_checks(iocb, from); if (res...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
249,709,024,595,273,750,000,000,000,000,000,000,000
24
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
scanner_malloc (parser_context_t *context_p, /**< context */ size_t size) /**< size of the memory block */ { void *result; JERRY_ASSERT (size > 0); result = jmem_heap_alloc_block_null_on_error (size); if (result == NULL) { scanner_cleanup (context_p); /* This is the only error which...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
309,428,287,034,402,870,000,000,000,000,000,000,000
18
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
u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr, __be16 sport, __be16 dport) { u32 secret[MD5_MESSAGE_BYTES / 4]; u32 hash[MD5_DIGEST_WORDS]; u64 seq; u32 i; memcpy(hash, saddr, 16); for (i = 0; i < 4; i++) secret[i] = net_secret[i] + daddr[i]; secret[4] = net_secret[4] + (((__force u16...
0
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
194,029,654,403,894,580,000,000,000,000,000,000,000
24
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
static int close_getadapter_fib(struct aac_dev * dev, void __user *arg) { struct aac_fib_context *fibctx; int status; unsigned long flags; struct list_head * entry; /* * Verify that the HANDLE passed in was a valid AdapterFibContext * * Search the list of AdapterFibContext addresses on the adapter * to be...
0
[ "CWE-362" ]
linux
fa00c437eef8dc2e7b25f8cd868cfa405fcc2bb3
133,889,089,438,413,330,000,000,000,000,000,000,000
39
aacraid: Check size values after double-fetch from user In aacraid's ioctl_send_fib() we do two fetches from userspace, one the get the fib header's size and one for the fib itself. Later we use the size field from the second fetch to further process the fib. If for some reason the size from the second fetch is differ...
int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a) { int i; long rd, gd, bd, ad; int ct = (-1); int first = 1; long mindist = 0; if (im->trueColor) { return gdTrueColorAlpha(r, g, b, a); } for (i = 0; i < im->colorsTotal; i++) { long dist; if (im->open[i]) { continue; } rd = ...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
324,055,378,228,120,200,000,000,000,000,000,000,000
30
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...
String *Item_in_subselect::val_str(String *str) { /* As far as Item_in_subselect called only from Item_in_optimizer this method should not be used */ DBUG_ASSERT(0); DBUG_ASSERT(fixed == 1); if (forced_const) goto value_is_ready; DBUG_ASSERT((engine->uncacheable() & ~UNCACHEABLE_EXPLAIN) || ...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
213,504,011,889,411,800,000,000,000,000,000,000,000
27
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) { struct regulator_dev *rdev = regulator->rdev; int ret = 0; int old_min_uV, old_max_uV; int current_uV; mutex_lock(&rdev->mutex); /* If we're setting the same range as last time the change * should be a noop (some cpufreq implemen...
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
58,654,797,543,307,580,000,000,000,000,000,000,000
64
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ast_for_async_stmt(struct compiling *c, const node *n) { /* async_stmt: ASYNC (funcdef | with_stmt | for_stmt) */ REQ(n, async_stmt); REQ(CHILD(n, 0), ASYNC); switch (TYPE(CHILD(n, 1))) { case funcdef: return ast_for_funcdef_impl(c, n, NULL, t...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
286,112,815,019,818,160,000,000,000,000,000,000,000
25
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
static u32 srpt_tpg_get_inst_index(struct se_portal_group *se_tpg) { return 1; }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
192,313,099,588,299,500,000,000,000,000,000,000,000
4
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 int udf_NLStoCS0(struct nls_table *nls, dstring *ocu, struct ustr *uni, int length) { int len; unsigned i, max_val; uint16_t uni_char; int u_len; memset(ocu, 0, sizeof(dstring) * length); ocu[0] = 8; max_val = 0xffU; try_again: u_len = 0U; for (i = 0U; i < uni->u_len; i++) { len = nls->char2uni(&...
0
[ "CWE-17" ]
linux
0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14
87,433,676,291,251,900,000,000,000,000,000,000,000
39
udf: Check path length when reading symlink Symlink reading code does not check whether the resulting path fits into the page provided by the generic code. This isn't as easy as just checking the symlink size because of various encoding conversions we perform on path. So we have to check whether there is still enough ...
static int eaptls_authenticate(void *arg, EAP_HANDLER *handler) { eaptls_status_t status; tls_session_t *tls_session = (tls_session_t *) handler->opaque; REQUEST *request = handler->request; eap_tls_t *inst = (eap_tls_t *) arg; RDEBUG2("Authenticate"); status = eaptls_process(handler); RDEBUG2("eaptls_process ...
0
[ "CWE-295" ]
freeradius-server
5e698b407dcac2bc45cf03484bac4398109d25c3
95,500,032,504,990,460,000,000,000,000,000,000,000
151
Set X509_V_FLAG_CRL_CHECK_ALL
g_socket_client_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GSocketClient *client = G_SOCKET_CLIENT (object); switch (prop_id) { case PROP_FAMILY: g_value_set_enum (value, client->priv->family); break; case PROP_TYPE: ...
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
117,912,272,387,908,450,000,000,000,000,000,000,000
49
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
psutil_per_cpu_times(PyObject *self, PyObject *args) { kstat_ctl_t *kc; kstat_t *ksp; cpu_stat_t cs; PyObject *py_retlist = PyList_New(0); PyObject *py_cputime = NULL; if (py_retlist == NULL) return NULL; kc = kstat_open(); if (kc == NULL) { PyErr_SetFromErrno(PyExc_OSE...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
191,862,278,731,824,600,000,000,000,000,000,000,000
45
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
static void OnRadioRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) { RxDoneParams.LastRxDone = TimerGetCurrentTime( ); RxDoneParams.Payload = payload; RxDoneParams.Size = size; RxDoneParams.Rssi = rssi; RxDoneParams.Snr = snr; LoRaMacRadioEvents.Events.RxDone = 1; ...
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
57,462,878,630,297,650,000,000,000,000,000,000,000
15
Added received buffer size checks.
static int pipe_to_sendpage(struct pipe_inode_info *pipe, struct pipe_buffer *buf, struct splice_desc *sd) { struct file *file = sd->u.file; loff_t pos = sd->pos; int ret, more; ret = buf->ops->confirm(pipe, buf); if (!ret) { more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len; ret = file->f...
0
[ "CWE-94" ]
linux-2.6
8811930dc74a503415b35c4a79d14fb0b408a361
266,624,522,231,128,270,000,000,000,000,000,000,000
17
splice: missing user pointer access verification vmsplice_to_user() must always check the user pointer and length with access_ok() before copying. Likewise, for the slow path of copy_from_user_mmap_sem() we need to check that we may read from the user region. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Cc: Wojc...
static int emulator_read_emulated(unsigned long addr, void *val, unsigned int bytes, struct kvm_vcpu *vcpu) { struct kvm_io_device *mmio_dev; gpa_t gpa; if (vcpu->mmio_read_completed) { memcpy(val, vcpu->mmio_data, bytes); vcpu->mmio_read_completed = 0; return X86EMUL_CONTINU...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
152,918,666,665,745,150,000,000,000,000,000,000,000
46
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
void Jp2Image::setComment(const std::string& /*comment*/) { // Todo: implement me! throw(Error(kerInvalidSettingForImage, "Image comment", "JP2")); } // Jp2Image::setComment
0
[ "CWE-125" ]
exiv2
f6ee71526eef5649a529ac6da3f2843e3b63e227
30,975,770,114,438,130,000,000,000,000,000,000,000
5
Add more bounds checks in Jp2Image::encodeJp2Header
QAction *MainWindow::actionProfileRemove() const { return ui->actionProfileRemove; }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
216,984,300,956,759,850,000,000,000,000,000,000,000
4
fix upgrade check is not using TLS correctly
sync_secure_journal(dns_zone_t *zone, dns_zone_t *raw, dns_journal_t *journal, uint32_t start, uint32_t end, dns_difftuple_t **soatuplep, dns_diff_t *diff) { isc_result_t result; dns_difftuple_t *tuple = NULL; dns_diffop_t op = DNS_DIFFOP_ADD; int n_soa = 0; REQUIRE(soatuplep != NULL); if (start == ...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
84,328,933,948,244,270,000,000,000,000,000,000,000
73
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static int __init nf_tables_module_init(void) { int err; err = register_pernet_subsys(&nf_tables_net_ops); if (err < 0) return err; err = nft_chain_filter_init(); if (err < 0) goto err_chain_filter; err = nf_tables_core_module_init(); if (err < 0) goto err_core_module; err = register_netdevice_notifie...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
300,786,418,527,272,500,000,000,000,000,000,000,000
57
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
export bool sql_mode_string_representation(THD *thd, ulong sql_mode, LEX_STRING *ls) { set_to_string(thd, ls, sql_mode, sql_mode_names); return ls->str == 0; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
110,092,413,751,037,000,000,000,000,000,000,000,000
6
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static int _php_filter_validate_ipv6(char *str, size_t str_len) /* {{{ */ { int compressed = 0; int blocks = 0; int n; char *ipv4; char *end; int ip4elm[4]; char *s = str; if (!memchr(str, ':', str_len)) { return 0; } /* check for bundled IPv4 */ ipv4 = memchr(str, '.', str_len); if (ipv4) { while (i...
0
[ "CWE-20" ]
php-src
4a89e726bd4d0571991dc22a9a1ad4509e8fe347
75,128,073,565,047,880,000,000,000,000,000,000,000
77
Alternative fix for bug 77423 That bug report originally was about `parse_url()` misbehaving, but the security aspect was actually only regarding `FILTER_VALIDATE_URL`. Since the changes to `parse_url_ex()` apparently affect userland code which is relying on the sloppy URL parsing[1], this alternative restores the old...
static int ip6_dst_lookup_tail(struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6) { struct net *net = sock_net(sk); #ifdef CONFIG_IPV6_OPTIMISTIC_DAD struct neighbour *n; #endif int err; if (*dst == NULL) *dst = ip6_route_output(net, sk, fl6); if ((err = (*dst)->error)) goto out_err_relea...
0
[ "CWE-703" ]
linux
87c48fa3b4630905f98268dde838ee43626a060c
100,239,723,848,318,130,000,000,000,000,000,000,000
70
ipv6: make fragment identifications less predictable IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, ...
void write_node_page(unsigned int nid, struct f2fs_io_info *fio) { struct f2fs_summary sum; set_summary(&sum, nid, 0, 0); do_write_page(&sum, fio); }
0
[ "CWE-200", "CWE-476" ]
linux
d4fdf8ba0e5808ba9ad6b44337783bd9935e0982
307,649,650,532,362,870,000,000,000,000,000,000,000
7
f2fs: fix a panic caused by NULL flush_cmd_control Mount fs with option noflush_merge, boot failed for illegal address fcc in function f2fs_issue_flush: if (!test_opt(sbi, FLUSH_MERGE)) { ret = submit_flush_wait(sbi); atomic_inc(&fcc->issued_flush); -> Here, fcc illegal ...
int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name; struct sk_buff *skb; unsigned int ulen, copied; int err; int is_udplite = IS_UDPLITE(...
0
[]
linux-2.6
32c1da70810017a98aa6c431a5494a302b6b9a30
139,208,936,075,757,210,000,000,000,000,000,000,000
86
[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>
pfm_unfreeze_pmu(void) { ia64_set_pmc(0,0UL); ia64_srlz_d(); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
76,091,336,723,070,670,000,000,000,000,000,000,000
5
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static gids_t *_gids_cache_lookup(char *user, gid_t gid) { size_t idx; gids_cache_t *p; bool found_but_old = false; time_t now = 0; int ngroups = NGROUPS_START; gid_t *groups; gids_t *ret_gids = NULL; idx = _gids_hashtbl_idx(user); slurm_mutex_lock(&gids_mutex); p = gids_hashtbl[idx]; while (p) { if (xstr...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
121,482,623,074,832,890,000,000,000,000,000,000,000
55
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
void fpm_scoreboard_child_use(struct fpm_child_s *child, pid_t pid) /* {{{ */ { struct fpm_scoreboard_proc_s *proc; fpm_scoreboard = child->wp->scoreboard; fpm_scoreboard_i = child->scoreboard_i; proc = fpm_scoreboard_proc_get_from_child(child); if (!proc) { return; } proc->pid = pid; proc->start_epoch = time...
0
[ "CWE-787" ]
php-src
fadb1f8c1d08ae62b4f0a16917040fde57a3b93b
10,944,349,085,803,270,000,000,000,000,000,000,000
12
Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation) The main change is to store scoreboard procs directly to the variable sized array rather than indirectly through the pointer. Signed-off-by: Stanislav Malyshev <stas@php.net>
static OPJ_BOOL opj_j2k_need_nb_tile_parts_correction(opj_stream_private_t *p_stream, OPJ_UINT32 tile_no, OPJ_BOOL* p_correction_needed, opj_event_mgr_t * p_manager ) { OPJ_BYTE l_header_data[10]; OPJ_OFF_T l_stream_pos_backup; OPJ_UINT32 l_current_marker; OPJ_UINT32 l_marker_size; OPJ_UINT32 l_tile_no, l_tot_l...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
59,926,443,802,301,650,000,000,000,000,000,000,000
97
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static int memory_failure_dev_pagemap(unsigned long pfn, int flags, struct dev_pagemap *pgmap) { struct page *page = pfn_to_page(pfn); const bool unmap_success = true; unsigned long size = 0; struct to_kill *tk; LIST_HEAD(tokill); int rc = -EBUSY; loff_t start; dax_entry_t cookie; /* * Prevent the inode f...
0
[]
linux
46612b751c4941c5c0472ddf04027e877ae5990f
273,394,681,075,570,360,000,000,000,000,000,000,000
78
mm: hwpoison: fix thp split handing in soft_offline_in_use_page() When soft_offline_in_use_page() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): Memory failure: 0x3755ff: non anonymous thp __get_any_page: 0x3755ff: unknown zero refcount page type 2fffff80000000 Soft offli...
njs_typed_array_compare_i8(const void *a, const void *b, void *c) { return *((const int8_t *) a) - *((const int8_t *) b); }
0
[ "CWE-703" ]
njs
5c6130a2a0b4c41ab415f6b8992aa323636338b9
225,686,345,034,948,840,000,000,000,000,000,000,000
4
Fixed Array.prototype.fill() for typed-arrays. This closes #478 issue on Github.
static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, unsigned int reqsize) { tfm->reqsize = reqsize; }
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
271,734,517,271,786,030,000,000,000,000,000,000,000
5
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
std::string help() const override { return "Revokes roles from a user."; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
205,159,532,772,964,370,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static void sas_resume_devices(struct work_struct *work) { struct sas_discovery_event *ev = to_sas_discovery_event(work); struct asd_sas_port *port = ev->port; clear_bit(DISCE_RESUME, &port->disc.pending); sas_resume_sata(port); }
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
78,977,265,835,482,280,000,000,000,000,000,000,000
9
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
static int guess_table_format(const char *line) { unsigned int a, b; DBG(TAB, ul_debug("trying to guess table type")); if (sscanf(line, "%u %u", &a, &b) == 2) return MNT_FMT_MOUNTINFO; if (strncmp(line, "Filename\t", 9) == 0) return MNT_FMT_SWAPS; return MNT_FMT_FSTAB; /* fstab, mtab or /proc/mounts */ }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
318,005,133,831,640,050,000,000,000,000,000,000,000
14
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
static int push_signature(uint8 **outbuf) { char *lanman; int result, tmp; result = 0; tmp = message_push_string(outbuf, "Unix", STR_TERMINATE); if (tmp == -1) return -1; result += tmp; if (asprintf(&lanman, "Samba %s", samba_version_string()) != -1) { tmp = message_push_string(outbuf, lanman, STR_TERMINAT...
0
[ "CWE-119" ]
samba
9280051bfba337458722fb157f3082f93cbd9f2b
192,396,827,818,214,900,000,000,000,000,000,000,000
30
s3: Fix an uninitialized variable read Found by Laurent Gaffie <laurent.gaffie@gmail.com> Thanks for that, Volker Fix bug #7254 (An uninitialized variable read could cause an smbd crash).
void ptrace_disable(struct task_struct *task) { memset(&task->thread.per_user, 0, sizeof(task->thread.per_user)); memset(&task->thread.per_event, 0, sizeof(task->thread.per_event)); clear_tsk_thread_flag(task, TIF_SINGLE_STEP); clear_pt_regs_flag(task_pt_regs(task), PIF_PER_TRAP); task->thread.per_flags = 0; }
0
[ "CWE-264", "CWE-269" ]
linux
dab6cf55f81a6e16b8147aed9a843e1691dcd318
84,661,196,871,927,660,000,000,000,000,000,000,000
8
s390/ptrace: fix PSW mask check The PSW mask check of the PTRACE_POKEUSR_AREA command is incorrect. The PSW_MASK_USER define contains the PSW_MASK_ASC bits, the ptrace interface accepts all combinations for the address-space-control bits. To protect the kernel space the PSW mask check in ptrace needs to reject the add...
static void copy_user_gigantic_page(struct page *dst, struct page *src, unsigned long addr, struct vm_area_struct *vma, unsigned int pages_per_huge_page) { int i; struct page *dst_base = dst; struct page *src_base = src; for (i = 0; i < pages_per_huge_page; ) { cond_resched(); copy_user...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
197,766,356,740,083,100,000,000,000,000,000,000,000
18
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void __tcf_chain_put(struct tcf_chain *chain, bool by_act, bool explicitly_created) { struct tcf_block *block = chain->block; const struct tcf_proto_ops *tmplt_ops; bool free_block = false; unsigned int refcnt; void *tmplt_priv; mutex_lock(&block->lock); if (explicitly_created) { if (!chain->exp...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
275,624,052,287,572,560,000,000,000,000,000,000,000
46
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
SocketBackend(StringInfo inBuf) { int qtype; /* * Get message type code from the frontend. */ HOLD_CANCEL_INTERRUPTS(); pq_startmsgread(); qtype = pq_getbyte(); if (qtype == EOF) /* frontend disconnected */ { if (IsTransactionState()) ereport(COMMERROR, (errcode(ERRCODE_CONNECTION_FAILURE), ...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
203,852,828,464,375,500,000,000,000,000,000,000,000
168
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static void perftools_addtrace(GCtrace *T) { static FILE *fp; GCproto *pt = &gcref(T->startpt)->pt; const BCIns *startpc = mref(T->startpc, const BCIns); const char *name = proto_chunknamestr(pt); BCLine lineno; if (name[0] == '@' || name[0] == '=') name++; else name = "(string)"; lua_assert(sta...
0
[ "CWE-125" ]
LuaJIT
12ab596997b9cb27846a5b254d11230c3f9c50c8
281,218,515,340,651,850,000,000,000,000,000,000,000
22
Fix handling of errors during snapshot restore.
unmatched_exit(os_ptr op, op_proc_t opproc) { make_oper(op - 1, 0, opproc); make_int(op, gs_error_invalidexit); return_error(gs_error_Quit); }
0
[ "CWE-200" ]
ghostpdl
34cc326eb2c5695833361887fe0b32e8d987741c
337,222,258,260,772,270,000,000,000,000,000,000,000
6
Bug 699927: don't include operator arrays in execstack output When we transfer the contents of the execution stack into the array, take the extra step of replacing any operator arrays on the stack with the operator that reference them. This prevents the contents of Postscript defined, internal only operators (those c...
static int ccp_copy_from_sb(struct ccp_cmd_queue *cmd_q, struct ccp_dm_workarea *wa, u32 jobid, u32 sb, u32 byte_swap) { return ccp_copy_to_from_sb(cmd_q, wa, jobid, sb, byte_swap, true); }
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
211,992,716,188,835,570,000,000,000,000,000,000,000
6
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
bool GetAllocatedBytes(size_t* out_bytes) const override { if (alloc_->TracksAllocationSizes()) { *out_bytes = alloc_->AllocatedSize(data()); return *out_bytes > 0; } else { return false; } }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
307,095,265,957,125,550,000,000,000,000,000,000,000
8
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
makeHealthCheckConfig(const uint32_t port_value) { envoy::config::endpoint::v3::Endpoint::HealthCheckConfig config; config.set_port_value(port_value); return config; }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
46,352,377,739,931,790,000,000,000,000,000,000,000
5
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static napi_value TestMemoryCorruption(napi_env env, napi_callback_info info) { size_t argc = 1; napi_value args[1]; NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); NAPI_ASSERT(env, argc == 1, "Wrong number of arguments"); char buf[10] = { 0 }; NAPI_CALL(env, napi_get_value_string_ut...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
50,875,256,177,576,800,000,000,000,000,000,000,000
17
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
void reds_on_main_migrate_connected(RedsState *reds, int seamless) { reds->src_do_seamless_migrate = seamless; if (reds->mig_wait_connect) { reds_mig_cleanup(reds); } }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
132,305,071,484,757,130,000,000,000,000,000,000,000
7
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>
MagickExport void XAnimateBackgroundImage(Display *display, XResourceInfo *resource_info,Image *images,ExceptionInfo *exception) { char geometry[MagickPathExtent], visual_type[MagickPathExtent]; Image *coalesce_image, *display_image, **image_list; int scene; MagickStatusType sta...
0
[ "CWE-772" ]
ImageMagick
4ab4849d667e26df0e63ece9d63ae23bc7ab0fa1
117,174,937,351,806,080,000,000,000,000,000,000,000
441
https://github.com/ImageMagick/ImageMagick/issues/1195
TEST(QuantizedUInt8PoolingOpTest, MaxPoolPaddingSameStride1) { // Choose the input ranges carefully so that the dequantized output matches // the results of the float model above. // Input Range[0, 15.9375] --> [Scale{0.0625}, zero_point{0}] QuantizedPoolingOpModel m( BuiltinOperator_MAX_POOL_2D, /*...
0
[ "CWE-369" ]
tensorflow
5f7975d09eac0f10ed8a17dbb6f5964977725adc
183,485,394,342,042,800,000,000,000,000,000,000,000
20
Prevent another div by 0 in optimized pooling implementations TFLite PiperOrigin-RevId: 370800091 Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b
void Perl_pregfree2(pTHX_ REGEXP *rx) { struct regexp *const r = ReANY(rx); GET_RE_DEBUG_FLAGS_DECL; PERL_ARGS_ASSERT_PREGFREE2; if (! r) return; if (r->mother_re) { ReREFCNT_dec(r->mother_re); } else { CALLREGFREE_PVT(rx); /* free the private data */ SvREFCNT_...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
4,374,057,079,605,796,400,000,000,000,000,000,000
33
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
write_uint32 (Header *header, guint8 *ptr, guint32 val) { if (header->big_endian) *(guint32 *) ptr = GUINT32_TO_BE (val); else *(guint32 *) ptr = GUINT32_TO_LE (val); }
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
80,046,242,288,115,140,000,000,000,000,000,000,000
7
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
static int loop_sysfs_init(struct loop_device *lo) { return sysfs_create_group(&disk_to_dev(lo->lo_disk)->kobj, &loop_attribute_group); }
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
126,568,605,634,334,830,000,000,000,000,000,000,000
5
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
int enc_untrusted_getifaddrs(struct ifaddrs **ifap) { MessageWriter input; MessageReader output; const auto status = NonSystemCallDispatcher( ::asylo::host_call::kGetIfAddrsHandler, &input, &output); CheckStatusAndParamCount(status, output, "enc_untrusted_getifaddrs", 3, /*matc...
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
241,464,850,070,099,970,000,000,000,000,000,000,000
24
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
_dbus_auth_bytes_sent (DBusAuth *auth, int bytes_sent) { _dbus_verbose ("%s: Sent %d bytes of: %s\n", DBUS_AUTH_NAME (auth), bytes_sent, _dbus_string_get_const_data (&auth->outgoing)); _dbus_string_delete (&auth->outgoing, ...
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
22,288,826,088,624,220,000,000,000,000,000,000,000
11
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
int tcf_qevent_validate_change(struct tcf_qevent *qe, struct nlattr *block_index_attr, struct netlink_ext_ack *extack) { u32 block_index; int err; if (!block_index_attr) return 0; err = tcf_qevent_parse_block_index(block_index_attr, &block_index, extack); if (err) return err; /* Bounce newly-conf...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
95,530,076,820,764,850,000,000,000,000,000,000,000
21
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static const char *wsgi_set_python_hash_seed(cmd_parms *cmd, void *mconfig, const char *f) { const char *error = NULL; WSGIServerConfig *sconfig = NULL; error = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (error != NULL) return error; /* * M...
0
[ "CWE-254" ]
mod_wsgi
545354a80b9cc20d8b6916ca30542eab36c3b8bd
256,591,143,166,362,800,000,000,000,000,000,000,000
34
When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state.
static int match_revfn(int af, const char *name, u8 revision, int *bestp) { struct xt_match *m; int have_rev = 0; list_for_each_entry(m, &xt[af].match, list) { if (strcmp(m->name, name) == 0) { if (m->revision > *bestp) *bestp = m->revision; if (m->revision == revision) have_rev = 1; } } return ...
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
35,959,134,698,035,244,000,000,000,000,000,000,000
15
[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...
static void draw_fill_color_rgb( wmfAPI* API, const wmfRGB* rgb ) { PixelWand *fill_color; fill_color=NewPixelWand(); PixelSetRedQuantum(fill_color,ScaleCharToQuantum(rgb->r)); PixelSetGreenQuantum(fill_color,ScaleCharToQuantum(rgb->g)); PixelSetBlueQuantum(fill_color,ScaleCharToQuantum(rgb->b)); Pixel...
0
[ "CWE-772" ]
ImageMagick
b2b48d50300a9fbcd0aa0d9230fd6d7a08f7671e
140,161,527,499,532,650,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/544
cifs_iovec_write(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *poffset) { unsigned long nr_pages, i; size_t copied, len, cur_len; ssize_t total_written = 0; loff_t offset; struct iov_iter it; struct cifsFileInfo *open_file; struct cifs_tcon *tcon; struct cifs_sb_info *cifs_sb; s...
1
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
121,350,963,407,496,030,000,000,000,000,000,000,000
129
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
int hpack_dht_insert(struct hpack_dht *dht, struct ist name, struct ist value) { unsigned int used; unsigned int head; unsigned int prev; unsigned int wrap; unsigned int tail; uint32_t headroom, tailroom; if (!hpack_dht_make_room(dht, name.len + value.len)) return 0; /* Now there is enough room in the table...
0
[ "CWE-787" ]
haproxy
5dfc5d5cd0d2128d77253ead3acf03a421ab5b88
34,603,735,474,607,712,000,000,000,000,000,000,000
129
BUG/CRITICAL: hpack: never index a header into the headroom after wrapping The HPACK header table is implemented as a wrapping list inside a contigous area. Headers names and values are stored from right to left while indexes are stored from left to right. When there's no more room to store a new one, we wrap to the r...
static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list, bool *changed) { if (expr->argument_count()) { Name_resolution_context *context= &thd->lex->current_select->context; Item **arg,**arg_end; bool arg_changed= FALSE; for (arg= expr->arguments(), ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
7,636,540,035,984,972,000,000,000,000,000,000,000
45
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *file = iocb->ki_filp; struct socket *sock = file->private_data; struct msghdr msg = {.msg_iter = *to}; ssize_t res; if (file->f_flags & O_NONBLOCK) msg.msg_flags = MSG_DONTWAIT; if (iocb->ki_pos != 0) return -ESPIPE; if ...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
108,613,564,682,285,760,000,000,000,000,000,000,000
21
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
testcase_repoid2str(Pool *pool, Id repoid) { Repo *repo = pool_id2repo(pool, repoid); if (repo->name) { char *r = pool_tmpjoin(pool, repo->name, 0, 0); char *rp; for (rp = r; *rp; rp++) if (*rp == ' ' || *rp == '\t') *rp = '_'; return r; } else { char buf[20]; s...
0
[ "CWE-120" ]
libsolv
0077ef29eb46d2e1df2f230fc95a1d9748d49dec
276,254,783,824,945,600,000,000,000,000,000,000,000
19
testcase_read: error out if repos are added or the system is changed too late We must not add new solvables after the considered map was created, the solver was created, or jobs were added. We may not changed the system after jobs have been added. (Jobs may point inside the whatproviedes array, so we must not invalid...
static inline bool blk_do_io_stat(struct request *rq) { return rq->rq_disk && (rq->rq_flags & RQF_IO_STAT) && !blk_rq_is_passthrough(rq); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
158,387,689,842,560,700,000,000,000,000,000,000,000
6
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
char **fill_out_embedded_options(char *options, int options_type, int slen, int cnt) { int ind, len; char c; char *ptr; char **options_list= NULL; if (!(options_list= (char **) calloc(cnt, sizeof(char *)))) { PerlIO_printf(DBILOGFP, ...
0
[ "CWE-416" ]
DBD-mysql
a56ae87a4c1c1fead7d09c3653905841ccccf1cc
214,836,243,933,245,700,000,000,000,000,000,000,000
52
fix use-after-free crash in RT #97625
virtual bool change_context_processor(uchar *context) { return 0; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
157,735,017,944,738,320,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
robj *dsGet(redisDb *db, robj *key) { }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
315,928,143,976,345,200,000,000,000,000,000,000,000
2
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
lys_restr_free(struct ly_ctx *ctx, struct lys_restr *restr, void (*private_destructor)(const struct lys_node *node, void *priv)) { assert(ctx); if (!restr) { return; } lys_extension_instances_free(ctx, restr->ext, restr->ext_size, private_destructor); lydict_remove(ctx, restr...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
256,638,999,049,468,200,000,000,000,000,000,000,000
15
schema tree BUGFIX do not check features while still resolving schema Fixes #723
static void bcm_can_tx(struct bcm_op *op) { struct sk_buff *skb; struct net_device *dev; struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe; /* no target device? => exit */ if (!op->ifindex) return; dev = dev_get_by_index(sock_net(op->sk), op->ifindex); if (!dev) { /* RFC: should this bcm_op r...
0
[ "CWE-362" ]
linux
d5f9023fa61ee8b94f37a93f08e94b136cf1e463
68,986,377,003,800,210,000,000,000,000,000,000,000
41
can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, mean...
mm_hostbased_key_allowed(struct passwd *pw, char *user, char *host, Key *key) { return (mm_key_allowed(MM_HOSTKEY, user, host, key, 0)); }
0
[ "CWE-20", "CWE-200" ]
openssh-portable
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
204,797,590,779,650,270,000,000,000,000,000,000,000
5
Don't resend username to PAM; it already has it. Pointed out by Moritz Jodeit; ok dtucker@
static int acl_allowedAttributes(struct ldb_module *module, const struct dsdb_schema *schema, struct ldb_message *sd_msg, struct ldb_message *msg, struct acl_context *ac) { struct ldb_message_element *oc_el; struct ldb_context *ldb = ldb_module_get_ctx(module); TALLOC_CTX *mem_ctx; const char **...
0
[ "CWE-20" ]
samba
b95431ab2303eb258e37e88d8841f2fb79fc4af5
297,151,923,302,092,560,000,000,000,000,000,000,000
105
CVE-2022-32743 dsdb: Implement validated dNSHostName write BUG: https://bugzilla.samba.org/show_bug.cgi?id=14833 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
njs_typed_array_get_f32(const void *a) { return *(const float *) a; }
0
[ "CWE-703" ]
njs
5c6130a2a0b4c41ab415f6b8992aa323636338b9
95,300,460,389,651,240,000,000,000,000,000,000,000
4
Fixed Array.prototype.fill() for typed-arrays. This closes #478 issue on Github.
static char *line_from_stdmac(void) { unsigned char c; const unsigned char *p = stdmacpos; char *line, *q; size_t len = 0; if (!stdmacpos) return NULL; while ((c = *p++)) { if (c >= 0x80) len += pp_directives_len[c - 0x80] + 1; else len++; } ...
0
[ "CWE-125" ]
nasm
3144e84add8b152cc7a71e44617ce6f21daa4ba3
333,765,499,223,521,600,000,000,000,000,000,000,000
68
preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c) { struct xfrm_aevent_id *id; struct nlmsghdr *nlh; int err; nlh = nlmsg_put(skb, c->portid, c->seq, XFRM_MSG_NEWAE, sizeof(*id), 0); if (nlh == NULL) return -EMSGSIZE; id = nlmsg_data(nlh); memcpy(&id->sa_id.daddr, &...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
184,532,001,714,815,700,000,000,000,000,000,000,000
54
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
int CLASS phase_one_correct() { unsigned entries, tag, data, save, col, row, type; int len, i, j, k, cip, val[4], dev[4], sum, max; int head[9], diff, mindiff = INT_MAX, off_412 = 0; /* static */ const signed char dir[12][2] = {{-1, -1}, {-1, 1}, {1, -1}, {1, 1}, {-2, 0}, {0, -2}, ...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
169,419,307,814,088,060,000,000,000,000,000,000,000
305
parse_qt: possible integer overflow
static void avic_invalidate_logical_id_entry(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); bool flat = svm->dfr_reg == APIC_DFR_FLAT; u32 *entry = avic_get_logical_id_entry(vcpu, svm->ldr_reg, flat); if (entry) clear_bit(AVIC_LOGICAL_ID_ENTRY_VALID_BIT, (unsigned long *)entry); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
114,357,630,180,845,000,000,000,000,000,000,000,000
9
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
static void zend_extension_activator(zend_extension *extension) /* {{{ */ { if (extension->activate) { extension->activate(); } }
0
[ "CWE-134" ]
php-src
b101a6bbd4f2181c360bd38e7683df4a03cba83e
321,476,682,605,402,350,000,000,000,000,000,000,000
6
Use format string
static inline int getPixelOverflowColorTC(gdImagePtr im, const int x, const int y, const int color) { if (gdImageBoundsSafe(im, x, y)) { const int c = im->tpixels[y][x]; if (c == im->transparent) { return gdTrueColorAlpha(0, 0, 0, 127); } return c; } else { register int border = 0; if (y < im->cy1) { ...
0
[ "CWE-119" ]
php-src
4bb422343f29f06b7081323844d9b52e1a71e4a5
14,702,433,912,194,900,000,000,000,000,000,000,000
47
Fix bug #70976: fix boundary check on gdImageRotateInterpolated
imap_bodystructure_params_parse(const struct imap_arg *arg, pool_t pool, const struct message_part_param **params_r, unsigned int *count_r) { struct message_part_param *params; const struct imap_arg *list_args; unsigned int list_count, params_count, i; if (arg->type == IMAP_ARG_NIL) { *params_r = NULL; retur...
0
[ "CWE-20" ]
core
266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19
36,338,357,123,123,754,000,000,000,000,000,000,000
33
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.
pullf_create(PullFilter **pf_p, const PullFilterOps *op, void *init_arg, PullFilter *src) { PullFilter *pf; void *priv; int res; if (op->init != NULL) { res = op->init(&priv, init_arg, src); if (res < 0) return res; } else { priv = init_arg; res = 0; } pf = px_alloc(sizeof(*pf)); memset(pf,...
0
[ "CWE-120" ]
postgres
1dc75515868454c645ded22d38054ec693e23ec6
25,699,386,740,748,790,000,000,000,000,000,000,000
37
Fix buffer overrun after incomplete read in pullf_read_max(). Most callers pass a stack buffer. The ensuing stack smash can crash the server, and we have not ruled out the viability of attacks that lead to privilege escalation. Back-patch to 9.0 (all supported versions). Marko Tiikkaja Security: CVE-2015-0243
cifs_parse_devname(const char *devname, struct smb_vol *vol) { char *pos; const char *delims = "/\\"; size_t len; /* make sure we have a valid UNC double delimiter prefix */ len = strspn(devname, delims); if (len != 2) return -EINVAL; /* find delimiter between host and sharename */ pos = strpbrk(devname + 2...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
226,663,196,261,781,200,000,000,000,000,000,000,000
40
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
void io_start_multiplex_in(int fd) { if (msgs2stderr == 1 && DEBUG_GTE(IO, 2)) rprintf(FINFO, "[%s] io_start_multiplex_in(%d)\n", who_am_i(), fd); iobuf.in_multiplexed = 1; /* See also IN_MULTIPLEXED */ io_start_buffering_in(fd); }
0
[]
rsync
b7231c7d02cfb65d291af74ff66e7d8c507ee871
331,564,114,167,704,100,000,000,000,000,000,000,000
8
Some extra file-list safety checks.
static struct ldb_parse_tree *ldap_decode_filter_tree(TALLOC_CTX *mem_ctx, struct asn1_data *data) { uint8_t filter_tag; struct ldb_parse_tree *ret; if (!asn1_peek_uint8(data, &filter_tag)) { return NULL; } filter_tag &= 0x1f; /* strip off the asn1 stuff */ ret = talloc(mem_ctx, struct ldb_parse...
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
36,758,326,664,824,023,000,000,000,000,000,000,000
332
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...