func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int iwch_resume_tid(struct iwch_ep *ep)
{
struct cpl_set_tcb_field *req;
struct sk_buff *skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
if (!skb)
return -ENOMEM;
req = (struct cpl_set_tcb_field *) skb_put(skb, sizeof(*req));
req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
req->wr.wr_lo = htonl(V_WR_TID(ep... | 0 | [
"CWE-703"
] | linux | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | 283,612,546,708,575,880,000,000,000,000,000,000,000 | 20 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off... |
static const char* general_name_type_label(int general_name_type)
{
if ((0 <= general_name_type) &&
((size_t)general_name_type < ARRAYSIZE(general_name_type_labels)))
{
return general_name_type_labels[general_name_type];
}
else
{
static char buffer[80];
sprintf(buffer, "Unknown general name type (%d)", ... | 0 | [
"CWE-787"
] | FreeRDP | 8305349a943c68b1bc8c158f431dc607655aadea | 223,368,359,749,295,130,000,000,000,000,000,000,000 | 14 | Fixed GHSL-2020-102 heap overflow
(cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581) |
static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
{
struct btrfs_root *root = BTRFS_I(file_inode(file))->root;
struct btrfs_ioctl_vol_args *vol_args;
int ret;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
ret = mnt_want_write_file(file);
if (ret)
return ret;
vol_args = memdup_user(arg, siz... | 0 | [
"CWE-200"
] | linux | 8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9 | 87,801,029,783,910,680,000,000,000,000,000,000,000 | 41 | Btrfs: fix file corruption and data loss after cloning inline extents
Currently the clone ioctl allows to clone an inline extent from one file
to another that already has other (non-inlined) extents. This is a problem
because btrfs is not designed to deal with files having inline and regular
extents, if a file has an ... |
xmlValidDebugState(xmlValidStatePtr state) {
xmlGenericError(xmlGenericErrorContext, "(");
if (state->cont == NULL)
xmlGenericError(xmlGenericErrorContext, "null,");
else
switch (state->cont->type) {
case XML_ELEMENT_CONTENT_PCDATA:
xmlGenericError(xmlGenericErrorContext, "pcdata,");
break... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 189,226,261,662,281,530,000,000,000,000,000,000,000 | 24 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
//! Compute the sign of each pixel value \newinstance.
CImg<Tfloat> get_sign() const {
return CImg<Tfloat>(*this,false).sign(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 50,142,890,588,125,110,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
run_client_script_err_amcheck(
gpointer data,
gpointer user_data)
{
char *line = data;
script_output_t *so = user_data;
if (line && so->stream) {
g_fprintf(so->stream, "ERROR %s\n", line);
}
} | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 305,453,802,138,387,500,000,000,000,000,000,000,000 | 11 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
int cap_capable (struct task_struct *tsk, int cap)
{
/* Derived from include/linux/sched.h:capable. */
if (cap_raised(tsk->cap_effective, cap))
return 0;
return -EPERM;
} | 0 | [] | linux-2.6 | 3318a386e4ca68c76e0294363d29bdc46fcad670 | 141,148,148,919,151,500,000,000,000,000,000,000,000 | 7 | file caps: always start with clear bprm->caps_*
While Linux doesn't honor setuid on scripts. However, it mistakenly
behaves differently for file capabilities.
This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm->caps_*. That way when a script is loaded,
its bprm->caps_* may be ... |
static int ehci_get_pid(EHCIqtd *qtd)
{
switch (get_field(qtd->token, QTD_TOKEN_PID)) {
case 0:
return USB_TOKEN_OUT;
case 1:
return USB_TOKEN_IN;
case 2:
return USB_TOKEN_SETUP;
default:
fprintf(stderr, "bad token\n");
return 0;
}
} | 0 | [] | qemu | 791f97758e223de3290592d169f8e6339c281714 | 88,249,644,768,656,300,000,000,000,000,000,000,000 | 14 | usb: ehci: fix memory leak in ehci_init_transfer
In ehci_init_transfer function, if the 'cpage' is bigger than 4,
it doesn't free the 'p->sgl' once allocated previously thus leading
a memory leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog... |
int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
const unsigned char *limit)
{
/* This is used only by servers. */
SSL_SESSION *ret=NULL;
int fatal = 0;
#ifndef OPENSSL_NO_TLSEXT
int r;
#endif
if (len > SSL_MAX_SSL_SESSION_ID_LENGTH)
goto err;
#ifndef OPENSSL_NO_TLSEXT
r = tls1_process... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 191,715,185,642,964,860,000,000,000,000,000,000,000 | 161 | Add SRP support. |
TEST_F(HttpConnectionManagerImplTest, RequestTimeoutDisabledByDefault) {
setup(false, "");
EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status {
EXPECT_CALL(filter_callbacks_.connection_.dispatcher_, createTimer_).Times(0);
conn_manager_->newStream(response_encoder_);
... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 221,160,282,247,496,320,000,000,000,000,000,000,000 | 15 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void fast_forward_char_pair_sse2(compiler_common *common, sljit_s32 offs1,
PCRE2_UCHAR char1a, PCRE2_UCHAR char1b, sljit_s32 offs2, PCRE2_UCHAR char2a, PCRE2_UCHAR char2b)
{
DEFINE_COMPILER;
sljit_u32 bit1 = 0;
sljit_u32 bit2 = 0;
sljit_u32 diff = IN_UCHARS(offs1 - offs2);
sljit_s32 tmp1_ind = sljit_get_regist... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 123,954,729,504,290,720,000,000,000,000,000,000,000 | 325 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event)
{
struct kvm_lapic *apic = vcpu->arch.apic;
u64 msr_val;
int i;
if (!init_event) {
msr_val = APIC_DEFAULT_PHYS_BASE | MSR_IA32_APICBASE_ENABLE;
if (kvm_vcpu_is_reset_bsp(vcpu))
msr_val |= MSR_IA32_APICBASE_BSP;
kvm_lapic_set_base(vcpu, msr_val);... | 0 | [
"CWE-476"
] | linux | 00b5f37189d24ac3ed46cb7f11742094778c46ce | 32,228,387,501,109,160,000,000,000,000,000,000,000 | 70 | KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast()
When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF
shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON()
instead of crashing the host.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <... |
_SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl)
{
X509 *peer_cert;
EVP_PKEY *peer_pkey;
/* EVP_PKEY *ca_pkey; */
/* EVP_PKEY *tmp_pkey; */
char notBefore[64];
char notAfter[64];
int alg;
int sign_alg;
if (!(peer_cert = SSL_get_peer_certificate (ssl)))
return (1); /* FATAL? */
X509_NAME_o... | 0 | [
"CWE-310"
] | hexchat | c9b63f7f9be01692b03fa15275135a4910a7e02d | 25,816,480,296,279,410,000,000,000,000,000,000,000 | 61 | ssl: Validate hostnames
Closes #524 |
static void ocfs2_write_failure(struct inode *inode,
struct ocfs2_write_ctxt *wc,
loff_t user_pos, unsigned user_len)
{
int i;
unsigned from = user_pos & (PAGE_SIZE - 1),
to = user_pos + user_len;
struct page *tmppage;
if (wc->w_target_page)
ocfs2_zero_new_buffers(wc->w_target_page, from, to);
for(i ... | 0 | [
"CWE-362"
] | linux | 3e4c56d41eef5595035872a2ec5a483f42e8917f | 209,933,653,704,109,630,000,000,000,000,000,000,000 | 23 | ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io... |
static int decode_attr_files_avail(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res)
{
__be32 *p;
int status = 0;
*res = 0;
if (unlikely(bitmap[0] & (FATTR4_WORD0_FILES_AVAIL - 1U)))
return -EIO;
if (likely(bitmap[0] & FATTR4_WORD0_FILES_AVAIL)) {
READ_BUF(8);
READ64(*res);
bitmap[0] &= ~FATTR4_WOR... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 265,006,801,023,297,300,000,000,000,000,000,000,000 | 16 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
pk_transaction_finalize (GObject *object)
{
PkTransaction *transaction;
g_return_if_fail (PK_IS_TRANSACTION (object));
transaction = PK_TRANSACTION (object);
if (transaction->priv->subject != NULL)
g_object_unref (transaction->priv->subject);
if (transaction->priv->watch_id > 0)
g_bus_unwatch_name (transact... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 105,070,921,179,811,110,000,000,000,000,000,000,000 | 44 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
static bool tight_can_send_png_rect(VncState *vs, int w, int h)
{
if (vs->tight.type != VNC_ENCODING_TIGHT_PNG) {
return false;
}
if (ds_get_bytes_per_pixel(vs->ds) == 1 ||
vs->client_pf.bytes_per_pixel == 1) {
return false;
}
return true;
} | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 181,373,301,286,194,300,000,000,000,000,000,000,000 | 13 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
String *Item_func_last_value::val_str(String *str)
{
String *tmp;
evaluate_sideeffects();
tmp= last_value->val_str(str);
null_value= last_value->null_value;
return tmp;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 108,379,083,287,200,550,000,000,000,000,000,000,000 | 8 | 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... |
register_isdn(isdn_if *i)
{
isdn_driver_t *d;
int j;
ulong flags;
int drvidx;
if (dev->drivers >= ISDN_MAX_DRIVERS) {
printk(KERN_WARNING "register_isdn: Max. %d drivers supported\n",
ISDN_MAX_DRIVERS);
return 0;
}
if (!i->writebuf_skb) {
printk(KERN_WARNING "register_isdn: No write routine given... | 0 | [
"CWE-119"
] | linux | 9f5af546e6acc30f075828cb58c7f09665033967 | 287,717,419,434,599,500,000,000,000,000,000,000,000 | 53 | isdn/i4l: fix buffer overflow
This fixes a potential buffer overflow in isdn_net.c caused by an
unbounded strcpy.
[ ISDN seems to be effectively unmaintained, and the I4L driver in
particular is long deprecated, but in case somebody uses this..
- Linus ]
Signed-off-by: Jiten Thakkar <jitenmt@gmail.com>
Signed-... |
static void ucma_copy_ud_event(struct rdma_ucm_ud_param *dst,
struct rdma_ud_param *src)
{
if (src->private_data_len)
memcpy(dst->private_data, src->private_data,
src->private_data_len);
dst->private_data_len = src->private_data_len;
ib_copy_ah_attr_to_user(&dst->ah_attr, &src->ah_attr);
dst->q... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 118,964,915,969,898,090,000,000,000,000,000,000,000 | 11 | 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... |
__must_hold(wqe->lock)
{
struct io_wqe_acct *acct = io_wqe_get_acct(wqe, worker);
if (atomic_dec_and_test(&acct->nr_running) && io_wqe_run_queue(wqe))
io_wqe_wake_worker(wqe, acct);
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 99,907,927,729,889,100,000,000,000,000,000,000,000 | 7 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static int
signed_desc_digest_is_recognized(signed_descriptor_t *desc)
{
const routerstatus_t *rs;
networkstatus_t *consensus = networkstatus_get_latest_consensus();
if (consensus) {
rs = networkstatus_vote_find_entry(consensus, desc->identity_digest);
if (rs && tor_memeq(rs->descriptor_digest,
... | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 167,494,478,296,769,000,000,000,000,000,000,000,000 | 13 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
static const u8 *ieee80211_tdls_find_sw_timing_ie(struct sk_buff *skb)
{
struct ieee80211_tdls_data *tf;
const u8 *ie_start;
/*
* Get the offset for the new location of the switch timing IE.
* The SKB network header will now point to the "payload_type"
* element of the TDLS data frame struct.
*/
tf = conta... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 79,844,793,923,768,020,000,000,000,000,000,000,000 | 16 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
static int __init psi_proc_init(void)
{
if (psi_enable) {
proc_mkdir("pressure", NULL);
proc_create("pressure/io", 0666, NULL, &psi_io_proc_ops);
proc_create("pressure/memory", 0666, NULL, &psi_memory_proc_ops);
proc_create("pressure/cpu", 0666, NULL, &psi_cpu_proc_ops);
}
return 0;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 42,763,234,148,956,590,000,000,000,000,000,000,000 | 10 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
prepend_default_options (char const *options, int *pargc, char ***pargv)
{
if (options && *options)
{
char *buf = xmalloc (strlen (options) + 1);
size_t prepended = prepend_args (options, buf, NULL);
int argc = *pargc;
char *const *argv = *pargv;
char **pp;
enum { MAX_ARGS = MI... | 0 | [
"CWE-189"
] | grep | 8fcf61523644df42e1905c81bed26838e0b04f91 | 172,189,928,136,315,780,000,000,000,000,000,000,000 | 24 | grep: fix integer-overflow issues in main program
* NEWS: Document this.
* bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax.
Remove xstrtoumax.
* src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX.
(context_length_arg, prtext, grepbuf, grep, grepfile)
(get_nondigit_option, main):
Use intmax_t, not int,... |
fr_window_get_folder_tree_selection (FrWindow *window,
gboolean recursive,
gboolean *has_dirs)
{
GtkTreeSelection *tree_selection;
GList *selections, *list, *scan;
g_return_val_if_fail (window != NULL, NULL);
if (has_dirs != NULL)
*has_dirs = FALSE;
tree_selection = gtk_tree_view... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 317,149,299,972,580,540,000,000,000,000,000,000,000 | 35 | libarchive: sanitize filenames before extracting |
skip_attr_bytes (unsigned long form,
unsigned char *data,
unsigned char *end,
dwarf_vma pointer_size,
dwarf_vma offset_size,
int dwarf_version,
dwarf_vma *value_return)
{
dwarf_signed_vma svalue;
dwarf_vma uvalue = 0;
dwarf_vma inc = 0;
* value_return = 0;
switch (form)
{
case DW_F... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 202,339,238,382,145,100,000,000,000,000,000,000,000 | 140 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
struct json_tokener* json_tokener_new_ex(int depth)
{
struct json_tokener *tok;
tok = (struct json_tokener*)calloc(1, sizeof(struct json_tokener));
if (!tok) return NULL;
tok->stack = (struct json_tokener_srec *)calloc(depth, sizeof(struct json_tokener_srec));
if (!tok->stack) {
free(tok);
return NUL... | 0 | [
"CWE-119",
"CWE-310"
] | json-c | 64e36901a0614bf64a19bc3396469c66dcd0b015 | 178,614,028,298,796,840,000,000,000,000,000,000,000 | 16 | Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int |
rb_str_lstrip_bang(VALUE str)
{
rb_encoding *enc;
char *s, *t, *e;
str_modify_keep_cr(str);
enc = STR_ENC_GET(str);
s = RSTRING_PTR(str);
if (!s || RSTRING_LEN(str) == 0) return Qnil;
e = t = RSTRING_END(str);
/* remove spaces at head */
while (s < e) {
int n;
unsigned int cc = rb... | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 86,168,048,808,419,680,000,000,000,000,000,000,000 | 27 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_table)
{
int i, j, x;
int8_t max_temporal_offset = -128;
uint8_t *flags;
/* first compute how many entries we have */
for (i = 0; i < index_table->nb_segments; i++) {
MXFIndexTableSegment *s = index_table->segment... | 0 | [
"CWE-125"
] | FFmpeg | bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75 | 179,312,438,499,402,300,000,000,000,000,000,000,000 | 119 | avformat/mxfdec: Fix av_log context
Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void rfcomm_tty_flush_buffer(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
BT_DBG("tty %p dev %p", tty, dev);
if (!dev || !dev->dlc)
return;
skb_queue_purge(&dev->dlc->tx_queue);
tty_wakeup(tty);
} | 0 | [
"CWE-200"
] | linux | f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a | 182,891,574,437,855,950,000,000,000,000,000,000,000 | 12 | Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST)
The RFCOMM code fails to initialize the two padding bytes of struct
rfcomm_dev_list_req inserted for alignment before copying it to
userland. Additionally there are two padding bytes in each instance of
struct rfcomm_dev_info. The ioctl() that for disclosure... |
static int __net_init ip6_frags_ns_sysctl_register(struct net *net)
{
struct ctl_table *table;
struct ctl_table_header *hdr;
table = ip6_frags_ns_ctl_table;
if (!net_eq(net, &init_net)) {
table = kmemdup(table, sizeof(ip6_frags_ns_ctl_table), GFP_KERNEL);
if (table == NULL)
goto err_alloc;
table[0].data ... | 0 | [] | linux | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 | 245,092,949,129,028,760,000,000,000,000,000,000,000 | 33 | net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list,
required taking the hash writer lock. However, the LRU list isn't
tied to the hash at all, so we can use a separate lock for it.
Original-idea-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Je... |
static void test_bug36004()
{
int rc, warning_count= 0;
MYSQL_STMT *stmt;
DBUG_ENTER("test_bug36004");
myheader("test_bug36004");
rc= mysql_query(mysql, "drop table if exists inexistant");
myquery(rc);
DIE_UNLESS(mysql_warning_count(mysql) == 1);
query_int_variable(mysql, "@@warning_count", &warning_... | 0 | [
"CWE-416"
] | mysql-server | 4797ea0b772d5f4c5889bc552424132806f46e93 | 241,441,245,368,400,830,000,000,000,000,000,000,000 | 40 | BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST()
Analysis:
---------
Invalid memory access maybe observed when using prepared statements if:
a) The mysql client connection is lost after statement preparation
is complete and
b) There is at least one statement which is in initialized state but
not ... |
same_color(VTermColor *a, VTermColor *b)
{
return a->red == b->red
&& a->green == b->green
&& a->blue == b->blue
&& a->ansi_index == b->ansi_index;
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 146,379,849,244,422,260,000,000,000,000,000,000,000 | 7 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
static int map_create(union bpf_attr *attr)
{
int numa_node = bpf_map_attr_numa_node(attr);
struct bpf_map *map;
int f_flags;
int err;
err = CHECK_ATTR(BPF_MAP_CREATE);
if (err)
return -EINVAL;
if (attr->btf_vmlinux_value_type_id) {
if (attr->map_type != BPF_MAP_TYPE_STRUCT_OPS ||
attr->btf_key_type_... | 1 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 21,954,280,864,236,086,000,000,000,000,000,000,000 | 104 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
static const char *parse_scheme(struct parse_state *state)
{
size_t mb;
const char *tmp = state->ptr;
do {
switch (*state->ptr) {
case ':':
/* scheme delimiter */
state->url.scheme = &state->buffer[0];
state->buffer[state->offset++] = 0;
return ++state->ptr;
case '0': case '1': case '2': case '3'... | 1 | [
"CWE-119"
] | ext-http | 3724cd76a28be1d6049b5537232e97ac567ae1f5 | 65,945,928,244,741,000,000,000,000,000,000,000,000 | 43 | fix bug #71719 (Buffer overflow in HTTP url parsing functions)
The parser's offset was not reset when we softfail in scheme
parsing and continue to parse a path.
Thanks to hlt99 at blinkenshell dot org for the report. |
int uwsgi_num2str2n(int num, char *ptr, int size) {
return snprintf(ptr, size, "%d", num);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 164,540,586,384,802,500,000,000,000,000,000,000,000 | 3 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
static bool blit_is_unsafe(struct CirrusVGAState *s, bool dst_only)
{
/* should be the case, see cirrus_bitblt_start */
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) {
return true;
}
if (blit_region_is_unsafe(s, s->cirru... | 0 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 235,401,424,165,807,470,000,000,000,000,000,000,000 | 24 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
void reds_send_device_display_info(RedsState *reds)
{
if (!reds->agent_dev->priv->agent_attached) {
return;
}
if (!reds->agent_dev->priv->agent_supports_graphics_device_info) {
return;
}
g_debug("Sending device display info to the agent:");
SpiceMarshaller *m = spice_marshaller... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 101,430,973,450,072,300,000,000,000,000,000,000,000 | 40 | 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> |
bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
{
TABLE *table;
const char *key;
uint key_length;
char *alias= table_list->alias;
uint flags= ot_ctx->get_flags();
MDL_ticket *mdl_ticket;
TABLE_SHARE *share;
uint gts_flags;
DBUG_ENTER("open_table");
/*
The table mus... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 140,305,422,510,471,460,000,000,000,000,000,000,000 | 441 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
static void sisusb_bulk_completeout(struct urb *urb)
{
struct sisusb_urb_context *context = urb->context;
struct sisusb_usb_data *sisusb;
if (!context)
return;
sisusb = context->sisusb;
if (!sisusb || !sisusb->sisusb_dev || !sisusb->present)
return;
#ifndef SISUSB_DONTSYNC
if (context->actual_length)
*(... | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 141,764,134,321,066,200,000,000,000,000,000,000,000 | 21 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
long Segment::ParseCues(long long off, long long& pos, long& len) {
if (m_pCues)
return 0; // success
if (off < 0)
return -1;
long long total, avail;
const int status = m_pReader->Length(&total, &avail);
if (status < 0) // error
return status;
assert((total < 0) || (avail <= total));
p... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 162,562,182,105,436,350,000,000,000,000,000,000,000 | 115 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
bool ConvUseDefaultAlgorithm() {
static bool use_default = [] {
bool use_default = false;
TF_CHECK_OK(tensorflow::ReadBoolFromEnvVar("TF_USE_DEFAULT_CONV_ALGO",
/*default_val=*/false,
&use_default));
return use_d... | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 129,876,565,683,310,440,000,000,000,000,000,000,000 | 10 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
uint64_t Chapter::WriteAtom(IMkvWriter* writer) const {
uint64_t payload_size =
EbmlElementSize(libwebm::kMkvChapterStringUID, id_) +
EbmlElementSize(libwebm::kMkvChapterUID, static_cast<uint64>(uid_)) +
EbmlElementSize(libwebm::kMkvChapterTimeStart,
static_cast<uint64>(start_t... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 67,265,881,920,535,080,000,000,000,000,000,000,000 | 55 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static pj_status_t decode_msgint_attr(pj_pool_t *pool,
const pj_uint8_t *buf,
const pj_stun_msg_hdr *msghdr,
void **p_attr)
{
pj_stun_msgint_attr *attr;
PJ_UNUSED_ARG(msghdr);
/* Create attribute */
attr = PJ_POOL_ZALLOC_T(pool, pj_stun_msgint_attr);
GETATTRHDR(buf,... | 0 | [
"CWE-191"
] | pjproject | 15663e3f37091069b8c98a7fce680dc04bc8e865 | 68,857,261,792,522,670,000,000,000,000,000,000,000 | 24 | Merge pull request from GHSA-2qpg-f6wf-w984 |
static void FVMenuAddEncodingName(GWindow UNUSED(gw), struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
char *ret;
Encoding *enc;
/* Search the iconv database for the named encoding */
ret = gwwv_ask_string(_("Add Encoding Name..."),NULL,_("Please provide the name of an encoding in the iconv database ... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 14,536,271,780,003,950,000,000,000,000,000,000,000 | 13 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
xmlSchemaValidCtxtPtr ctxt,
int options)
{
return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options));
} | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 70,573,745,451,957,630,000,000,000,000,000,000,000 | 6 | 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. |
static void ftrace_filter_reset(struct ftrace_hash *hash)
{
mutex_lock(&ftrace_lock);
ftrace_hash_clear(hash);
mutex_unlock(&ftrace_lock);
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 180,049,681,825,231,900,000,000,000,000,000,000,000 | 6 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
intrusive_ptr<Expression> Expression::parseOperand(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
BSONElement exprElement,
const VariablesParseState& vps) {
BSONType type = exprElement.type();
if (type == String && exprElement.valuestr()[0] == '$') {
/* if we got here, this is a fi... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 17,712,811,115,811,166,000,000,000,000,000,000,000 | 17 | SERVER-38070 fix infinite loop in agg expression |
static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
struct fuse_copy_state *cs, size_t nbytes)
{
int err;
struct fuse_conn *fc = fud->fc;
struct fuse_pqueue *fpq = &fud->pq;
struct fuse_req *req;
struct fuse_out_header oh;
if (nbytes < sizeof(struct fuse_out_header))
return -EINVAL;
err = fuse_copy_o... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 226,270,005,048,540,140,000,000,000,000,000,000,000 | 95 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
static int gnutls_system_mutex_init(void **priv)
{
pthread_mutex_t *lock = malloc(sizeof(pthread_mutex_t));
int ret;
if (lock == NULL)
return GNUTLS_E_MEMORY_ERROR;
ret = pthread_mutex_init(lock, NULL);
if (ret) {
free(lock);
gnutls_assert();
return GNUTLS_E_LOCKING_ERROR;
}
*priv = lock;
return 0;
... | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 340,176,246,130,308,570,000,000,000,000,000,000,000 | 19 | env: use secure_getenv when reading environment variables |
void h2_task_rst(h2_task *task, int error)
{
task->rst_error = error;
if (task->input.beam) {
h2_beam_leave(task->input.beam);
}
if (!task->worker_done) {
h2_beam_abort(task->output.beam);
}
if (task->c) {
task->c->aborted = 1;
}
} | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 326,268,905,879,419,400,000,000,000,000,000,000,000 | 13 | * Fixed keepalives counter on slave connections. |
static struct dentry *mqueue_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data)
{
struct ipc_namespace *ns;
if (flags & MS_KERNMOUNT) {
ns = data;
data = NULL;
} else {
ns = current->nsproxy->ipc_ns;
}
return mount_ns(fs_type, flags, data, ns, ns->user_ns, mqueue_fil... | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 278,151,723,492,191,700,000,000,000,000,000,000,000 | 13 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
static struct sock *udp_get_first(struct seq_file *seq, int start)
{
struct sock *sk;
struct udp_iter_state *state = seq->private;
struct net *net = seq_file_net(seq);
for (state->bucket = start; state->bucket <= state->udp_table->mask;
++state->bucket) {
struct udp_hslot *hslot = &state->udp_table->hash[s... | 0 | [] | linux | a612769774a30e4fc143c4cb6395c12573415660 | 2,752,449,925,998,096,000,000,000,000,000,000,000 | 26 | udp: prevent bugcheck if filter truncates packet too much
If socket filter truncates an udp packet below the length of UDP header
in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a
BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if
kernel is configured that way) can be easily enfo... |
static int io_timeout_remove(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
struct io_ring_ctx *ctx = req->ctx;
unsigned flags;
int ret;
if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
return -EINVAL;
if (sqe->flags || sqe->ioprio || sqe->buf_index || sqe->len)
return -EINVAL;
flags = READ_O... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 24,603,075,917,676,760,000,000,000,000,000,000,000 | 27 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len,
int flags)
{
struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct scm_cookie scm;
struct sock *sk = sock->sk;
struct netlink_sock *nlk = nlk_sk(sk);
int noblock = flags&MSG_DONTWAIT;
size_t copied;
... | 1 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 20,058,703,269,259,220,000,000,000,000,000,000,000 | 88 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
_gnutls_dh_save_group(gnutls_session_t session, bigint_t gen,
bigint_t prime)
{
dh_info_st *dh;
int ret;
switch (gnutls_auth_get_type(session)) {
case GNUTLS_CRD_ANON:
{
anon_auth_info_t info;
info = _gnutls_get_auth_info(session, GNUTLS_CRD_ANON);
if (info == NULL)
return gnutls_assert_val(G... | 0 | [] | gnutls | 3d7fae761e65e9d0f16d7247ee8a464d4fe002da | 289,253,044,570,540,420,000,000,000,000,000,000,000 | 67 | valgrind: check if session ticket key is used without initialization
This adds a valgrind client request for
session->key.session_ticket_key to make sure that it is not used
without initialization.
Signed-off-by: Daiki Ueno <ueno@gnu.org> |
static int wait_on_pipe(struct trace_iterator *iter, int full)
{
/* Iterators are static, they should be filled or empty */
if (trace_buffer_iter(iter, iter->cpu_file))
return 0;
return ring_buffer_wait(iter->trace_buffer->buffer, iter->cpu_file,
full);
} | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 176,480,016,220,593,070,000,000,000,000,000,000,000 | 9 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
void PlayerGeneric::setRepeat(bool repeat)
{
this->repeat = repeat;
if (player)
player->setRepeat(repeat);
} | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 276,175,807,747,016,270,000,000,000,000,000,000,000 | 6 | Fix use-after-free in PlayerGeneric destructor |
m4_indir (struct obstack *obs, int argc, token_data **argv)
{
symbol *s;
const char *name;
if (bad_argc (argv[0], argc, 2, -1))
return;
if (TOKEN_DATA_TYPE (argv[1]) != TOKEN_TEXT)
{
M4ERROR ((warning_status, 0,
"Warning: %s: invalid macro name ignored", ARG (0)));
return;
}
name =... | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 76,236,406,035,919,150,000,000,000,000,000,000,000 | 32 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
void Context::onStart(absl::string_view root_id, absl::string_view vm_configuration) {
if (wasm_->onStart_) {
auto root_id_addr = wasm_->copyString(root_id);
auto config_addr = wasm_->copyString(vm_configuration);
wasm_->onStart_(this, id_, root_id_addr, root_id.size(), config_addr, vm_configuration.size(... | 1 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 295,341,673,198,802,400,000,000,000,000,000,000,000 | 7 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
void kvm_free_pit(struct kvm *kvm)
{
struct hrtimer *timer;
if (kvm->arch.vpit) {
kvm_unregister_irq_mask_notifier(kvm, 0,
&kvm->arch.vpit->mask_notifier);
kvm_unregister_irq_ack_notifier(kvm,
&kvm->arch.vpit->pit_state.irq_ack_notifier);
mutex_lock(&kvm->arch.vpit->pit_state.lock);
timer = &... | 0 | [
"CWE-119",
"CWE-787"
] | linux | ee73f656a604d5aa9df86a97102e4e462dd79924 | 43,403,351,258,078,680,000,000,000,000,000,000,000 | 17 | KVM: PIT: control word is write-only
PIT control word (address 0x43) is write-only, reads are undefined.
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> |
static struct inode *ext4_alloc_inode(struct super_block *sb)
{
struct ext4_inode_info *ei;
ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
inode_set_iversion(&ei->vfs_inode, 1);
spin_lock_init(&ei->i_raw_lock);
INIT_LIST_HEAD(&ei->i_prealloc_list);
spin_lock_init(&ei->i_prealloc_lo... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 204,839,390,186,548,630,000,000,000,000,000,000,000 | 36 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
g_utf8_to_ucs4_fast (const gchar * str, glong len, glong * items_written)
{
gunichar *result;
gsize n_chars, i;
const gchar *p;
g_return_val_if_fail (str != NULL, NULL);
p = str;
n_chars = 0;
if (len < 0)
{
while (*p)
{
p = g_utf8_next_char (p);
++n_chars;
}
}
else
{
wh... | 0 | [] | libidn | 2e97c2796581c27213962c77f5a8571a598f9a2e | 273,398,923,107,606,130,000,000,000,000,000,000,000 | 74 | libidn: stringprep_utf8_to_ucs4 now rejects invalid UTF-8. CVE-2015-2059 |
void Crypto::SetDH(const DH_Parms& dh)
{
if (dh.set_)
dh_ = NEW_YS DiffieHellman(dh.p_, dh.g_, random_);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 206,862,664,636,605,840,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
edit_deep_directories(struct archive_write_disk *a)
{
int ret;
char *tail = a->name;
/* If path is short, avoid the open() below. */
if (strlen(tail) <= PATH_MAX)
return;
/* Try to record our starting dir. */
a->restore_pwd = open(".", O_RDONLY | O_BINARY | O_CLOEXEC);
__archive_ensure_cloexec_flag(a->restor... | 0 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 151,657,468,272,370,490,000,000,000,000,000,000,000 | 38 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
TwoLevelHints* Binary::two_level_hints() {
return const_cast<TwoLevelHints*>(static_cast<const Binary*>(this)->two_level_hints());
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 166,400,242,882,243,370,000,000,000,000,000,000,000 | 3 | Resolve #764 |
TEST_F(ConnectionManagerUtilityTest, ViaEmpty) {
connection_.stream_info_.downstream_address_provider_->setRemoteAddress(
std::make_shared<Network::Address::Ipv4Instance>("10.0.0.1"));
ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(true));
TestRequestHeaderMapImpl request_headers;
EXPECT_EQ((M... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 322,470,390,230,963,260,000,000,000,000,000,000,000 | 15 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
test_simultaneous_sync (TestConnection *test,
gconstpointer data)
{
GIOStream *connection;
GTlsCertificateFlags flags;
GError *error = NULL;
GThread *read_thread, *write_thread;
connection = start_echo_server_and_connect_to_it (test);
test->client_connection = g_tls_client_connect... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 243,100,216,258,633,780,000,000,000,000,000,000,000 | 40 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
add_digit(int *target, int source)
{
*target = (*target * 10) + (source - '0');
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 50,511,562,070,908,460,000,000,000,000,000,000,000 | 4 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static int write_emulate(struct kvm_vcpu *vcpu, gpa_t gpa,
void *val, int bytes)
{
return emulator_write_phys(vcpu, gpa, val, bytes);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 190,948,778,962,052,630,000,000,000,000,000,000,000 | 5 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
int bdrv_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
return bdrv_rw_co(bs, sector_num, (uint8_t *)buf, nb_sectors, true, 0);
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 233,449,216,817,791,600,000,000,000,000,000,000,000 | 5 | 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... |
find_protocol_by_id(const int proto_id)
{
header_field_info *hfinfo;
if (proto_id < 0)
return NULL;
PROTO_REGISTRAR_GET_NTH(proto_id, hfinfo);
if (hfinfo->type != FT_PROTOCOL) {
DISSECTOR_ASSERT(hfinfo->display & BASE_PROTOCOL_INFO);
}
return (protocol_t *)hfinfo->strings;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 334,473,698,807,342,700,000,000,000,000,000,000,000 | 13 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
void low_hash_fault(struct pt_regs *regs, unsigned long address)
{
if (user_mode(regs)) {
siginfo_t info;
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_ADRERR;
info.si_addr = (void __user *)address;
force_sig_info(SIGBUS, &info, current);
return;
}
bad_page_fault(regs, address, SIGBUS)... | 0 | [
"CWE-200"
] | linux-2.6 | 721151d004dcf01a71b12bb6b893f9160284cf6e | 340,204,267,598,531,900,000,000,000,000,000,000,000 | 14 | [POWERPC] Allow drivers to map individual 4k pages to userspace
Some drivers have resources that they want to be able to map into
userspace that are 4k in size. On a kernel configured with 64k pages
we currently end up mapping the 4k we want plus another 60k of
physical address space, which could contain anything. T... |
TEST_F(RenameCollectionTest, RenameAcrossDatabasesDoesNotPreserveCatalogPointers) {
_createCollection(_opCtx.get(), _sourceNss);
Lock::GlobalWrite globalWrite(_opCtx.get());
// Get a pointer to the source collection, and ensure that it reports the expected namespace
// string.
Collection* sourceCol... | 0 | [
"CWE-20"
] | mongo | 35c1b1f588f04926a958ad2fe4d9c59d79f81e8b | 231,389,856,995,698,030,000,000,000,000,000,000,000 | 22 | SERVER-35636 renameCollectionForApplyOps checks for complete namespace |
static int hfs_file_read_zlib_attr(TSK_FS_FILE* fs_file,
char* buffer,
uint32_t attributeLength,
uint64_t uncSize)
{
return hfs_file_read_compressed_attr(
fs_file, DECMPFS_TYPE_ZLIB_ATTR,
buffer, attributeLength, unc... | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 172,153,260,090,307,420,000,000,000,000,000,000,000 | 11 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent,
struct kobject **hstate_kobjs,
const struct attribute_group *hstate_attr_group)
{
int retval;
int hi = hstate_index(h);
hstate_kobjs[hi] = kobject_create_and_add(h->name, parent);
if (!hstate_kobjs[hi])
return -ENOMEM;
... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 124,743,865,764,099,800,000,000,000,000,000,000,000 | 25 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
gdm_display_remove_user_authorization (GdmDisplay *self,
const char *username,
GError **error)
{
GdmDisplayPrivate *priv;
g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE);
priv = gdm_display_get_instance_privat... | 0 | [
"CWE-754"
] | gdm | 4e6e5335d29c039bed820c43bfd1c19cb62539ff | 135,474,270,086,334,760,000,000,000,000,000,000,000 | 16 | display: Use autoptr to handle errors in look for existing users
It will make things just cleaner |
void hscanCommand(client *c) {
robj *o;
unsigned long cursor;
if (parseScanCursorOrReply(c,c->argv[2],&cursor) == C_ERR) return;
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptyscan)) == NULL ||
checkType(c,o,OBJ_HASH)) return;
scanGenericCommand(c,o,cursor);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 304,169,919,113,361,730,000,000,000,000,000,000,000 | 9 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
ConnectionCallbacks& callbacks() override { return callbacks_; } | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 4,963,654,012,183,071,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void help(u_int long_help) {
printf("Welcome to nDPI %s\n\n", ndpi_revision());
printf("ndpiReader "
#ifndef USE_DPDK
"-i <file|device> "
#endif
"[-f <filter>][-s <duration>][-m <duration>]\n"
" [-p <protos>][-l <loops> [-q][-d][-J][-h][-e <len>][-t][-v <level>]\n"
" [-n <threads>]... | 0 | [
"CWE-125"
] | nDPI | b7e666e465f138ae48ab81976726e67deed12701 | 129,666,219,989,421,740,000,000,000,000,000,000,000 | 86 | Added fix to avoid potential heap buffer overflow in H.323 dissector
Modified HTTP report information to make it closer to the HTTP field names |
static void tsc210x_i2s_swallow(TSC210xState *s)
{
if (s->dac_voice[0])
tsc210x_out_flush(s, s->codec.out.len);
else
s->codec.out.len = 0;
} | 0 | [
"CWE-119"
] | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | 145,263,389,899,590,370,000,000,000,000,000,000,000 | 7 | tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst... |
static void handle_OPTS(ctrl_t *ctrl, char *arg)
{
/* OPTS MLST type;size;modify;perm; */
if (strstr(arg, "MLST")) {
size_t i = 0;
char *ptr;
char buf[42] = "200 MLST OPTS ";
char facts[10] = { 0 };
ptr = strtok(arg + 4, " \t;");
while (ptr && i < sizeof(facts) - 1) {
if (!strcmp(ptr, "modify") ||
... | 0 | [
"CWE-120",
"CWE-787"
] | uftpd | 0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd | 233,484,590,918,750,700,000,000,000,000,000,000,000 | 30 | FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
/* xsaves_enabled is recomputed in vmx_compute_secondary_exec_control(). */
vcpu->arch.xsaves_enabled = false;
if (cpu_has_secondary_exec_ctrls()) {
vmx_compute_secondary_exec_control(vmx);
vmcs_set_secondary_ex... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 43,778,880,197,155,270,000,000,000,000,000,000,000 | 44 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
BGD_DECLARE(void) gdImageAABlend (gdImagePtr im)
{
/* NO-OP, kept for library compatibility. */
(void)im;
} | 0 | [
"CWE-119",
"CWE-787"
] | libgd | 77f619d48259383628c3ec4654b1ad578e9eb40e | 121,571,074,223,054,650,000,000,000,000,000,000,000 | 5 | fix #215 gdImageFillToBorder stack-overflow when invalid color is used |
static void sctp_cmd_t1_timer_update(struct sctp_association *asoc,
sctp_event_timeout_t timer,
char *name)
{
struct sctp_transport *t;
t = asoc->init_last_sent_to;
asoc->init_err_counter++;
if (t->init_sent_count > (asoc->init_cycle + 1)) {
asoc->timeouts[timer] *= 2;
if (asoc->timeouts[timer... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 274,335,517,670,697,450,000,000,000,000,000,000,000 | 27 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
void crypto_unregister_rngs(struct rng_alg *algs, int count)
{
int i;
for (i = count - 1; i >= 0; --i)
crypto_unregister_rng(algs + i);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6 | 167,858,911,970,663,180,000,000,000,000,000,000,000 | 7 | crypto: rng - Remove old low-level rng interface
Now that all rng implementations have switched over to the new
interface, we can remove the old low-level interface.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column)
{
bool is_serial;
bool saw_nullable;
bool saw_default;
bool saw_identity;
bool saw_generated;
ListCell *clist;
cxt->columns = lappend(cxt->columns, column);
/* Check for SERIAL pseudo-types */
is_serial = false;
if (column->typeName... | 0 | [
"CWE-94"
] | postgres | 7e92f78abe80e4b30e648a40073abb59057e21f8 | 285,392,705,400,893,940,000,000,000,000,000,000,000 | 339 | 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... |
void DataReaderImpl::InnerDataReaderListener::on_requested_incompatible_qos(
RTPSReader* /*reader*/,
fastdds::dds::PolicyMask qos)
{
data_reader_->update_requested_incompatible_qos(qos);
DataReaderListener* listener = data_reader_->get_listener_for(StatusMask::requested_incompatible_qos());
... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 66,397,417,874,798,370,000,000,000,000,000,000,000 | 15 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static int parse_from(struct branch *b)
{
const char *from;
struct branch *s;
struct object_id oid;
if (!skip_prefix(command_buf.buf, "from ", &from))
return 0;
oidcpy(&oid, &b->branch_tree.versions[1].oid);
s = lookup_branch(from);
if (b == s)
die("Can't create a branch from itself: %s", b->name);
else ... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 13,868,236,484,494,430,000,000,000,000,000,000,000 | 50 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
static int bpf_task_fd_query(const union bpf_attr *attr,
union bpf_attr __user *uattr)
{
pid_t pid = attr->task_fd_query.pid;
u32 fd = attr->task_fd_query.fd;
const struct perf_event *event;
struct task_struct *task;
struct file *file;
int err;
if (CHECK_ATTR(BPF_TASK_FD_QUERY))
return -EINVAL;
if (... | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 146,216,028,216,422,250,000,000,000,000,000,000,000 | 69 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
static void disconn_handler(void *data, void *user_data)
{
struct att_disconn *disconn = data;
int err = PTR_TO_INT(user_data);
if (disconn->removed)
return;
if (disconn->callback)
disconn->callback(err, disconn->user_data);
} | 0 | [
"CWE-415"
] | bluez | 1cd644db8c23a2f530ddb93cebed7dacc5f5721a | 218,704,060,011,830,630,000,000,000,000,000,000,000 | 11 | shared/att: Fix possible crash on disconnect
If there are pending request while disconnecting they would be notified
but clients may endup being freed in the proccess which will then be
calling bt_att_cancel to cancal its requests causing the following
trace:
Invalid read of size 4
at 0x1D894C: enable_ccc_callback... |
bool wantsToWrite() override { return false; } | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 33,057,007,478,189,370,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int fwnet_broadcast_start(struct fwnet_device *dev)
{
struct fw_iso_context *context;
int retval;
unsigned num_packets;
unsigned max_receive;
struct fw_iso_packet packet;
unsigned long offset;
void **ptrptr;
unsigned u;
if (dev->broadcast_state != FWNET_BROADCAST_ERROR)
return 0;
max_receive = 1U <... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 193,205,260,319,304,950,000,000,000,000,000,000,000 | 85 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... |
decrypt_response(struct sc_card *card, unsigned char *in, unsigned char *out, size_t * out_len)
{
size_t in_len;
size_t i;
unsigned char iv[16] = { 0 };
unsigned char plaintext[4096] = { 0 };
epass2003_exdata *exdata = NULL;
if (!card->drv_data)
return SC_ERROR_INVALID_ARGUMENTS;
exdata = (epass2003_exdata ... | 1 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 120,579,196,793,216,060,000,000,000,000,000,000,000 | 52 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
Napi::Value Statement::Reset(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Statement* stmt = this;
OPTIONAL_ARGUMENT_FUNCTION(0, callback);
Baton* baton = new Baton(stmt, callback);
stmt->Schedule(Work_BeginReset, baton);
return info.This();
} | 0 | [] | node-sqlite3 | 593c9d498be2510d286349134537e3bf89401c4a | 86,167,900,479,893,130,000,000,000,000,000,000,000 | 11 | bug: fix segfault of invalid toString() object (#1450)
* bug: verify toString() returns valid data
* test: faulty toString test |
xmlParseCheckTransition(xmlParserCtxtPtr ctxt, const char *chunk, int size) {
if ((ctxt == NULL) || (chunk == NULL) || (size < 0))
return(-1);
if (ctxt->instate == XML_PARSER_START_TAG) {
if (memchr(chunk, '>', size) != NULL)
return(1);
return(0);
}
if (ctxt->progress... | 0 | [
"CWE-119"
] | libxml2 | 23f05e0c33987d6605387b300c4be5da2120a7ab | 260,638,229,088,834,340,000,000,000,000,000,000,000 | 36 | Detect excessive entities expansion upon replacement
If entities expansion in the XML parser is asked for,
it is possble to craft relatively small input document leading
to excessive on-the-fly content generation.
This patch accounts for those replacement and stop parsing
after a given threshold. it can be bypassed as... |
static inline void write_cr0(unsigned long x)
{
PVOP_VCALL1(cpu.write_cr0, x);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 106,622,797,619,899,500,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
_lou_getTranslationTable(const char *tableList) {
TranslationTableHeader *table;
getTable(tableList, NULL, &table, NULL);
if (table)
if (!finalizeTable(table)) table = NULL;
return table;
} | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 25,792,645,066,170,110,000,000,000,000,000,000,000 | 7 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
SemiFuture<std::vector<HostAndPort>> TopologyManager::executeWithLock(
std::function<SemiFuture<std::vector<HostAndPort>>(const TopologyDescriptionPtr&)> func) {
stdx::lock_guard<mongo::Mutex> lock(_mutex);
return func(_topologyDescription);
} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 273,156,839,822,157,300,000,000,000,000,000,000,000 | 5 | SERVER-50170 fix max staleness read preference parameter for server selection |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.