func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static PyObject *wsgi_load_source(apr_pool_t *pool, request_rec *r,
const char *name, int exists,
const char* filename,
const char *process_group,
const char *application_group)
{
... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 170,020,134,048,183,150,000,000,000,000,000,000,000 | 303 | When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state. |
void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd,
uint32_t id, qxl_async_io async)
{
if (async != QXL_SYNC) {
#if SPICE_INTERFACE_QXL_MINOR >= 1
spice_qxl_destroy_primary_surface_async(&ssd->qxl, id, 0);
#else
abort();
#endif
} else {
... | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 1,213,281,453,551,175,300,000,000,000,000,000,000 | 13 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
bool checkreturn pb_decode_varint32(pb_istream_t *stream, uint32_t *dest)
{
return pb_decode_varint32_eof(stream, dest, NULL);
} | 0 | [
"CWE-20",
"CWE-119"
] | nanopb | 4fe23595732b6f1254cfc11a9b8d6da900b55b0c | 293,804,533,277,066,360,000,000,000,000,000,000,000 | 4 | Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)
Nanopb would leak memory when all of the following conditions were true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definitions contains an oneof field,
the oneof contains a static submessage, and
the static submessage contains a pointer fiel... |
static int am_handle_post_reply(request_rec *r)
{
int rc;
char *post_data;
char *saml_response;
LassoServer *server;
LassoLogin *login;
char *relay_state;
am_dir_cfg_rec *dir_cfg = am_get_dir_cfg(r);
int i, err;
/* Make sure that this is a POST request. */
if(r->method_number !=... | 0 | [] | mod_auth_mellon | 6bdda9170a8f1757dabc5b109958657417728018 | 210,804,446,154,142,020,000,000,000,000,000,000,000 | 100 | Fix segmentation fault when receiving badly formed logout message.
If the logout message is badly formed, we won't get the entityID in
`logout->parent.remote_providerID`. If we call `apr_hash_get()` with a
null pointer, it will cause a segmentation fault.
Add a check to validate that the entityID is correctly set. |
GF_Err afra_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_AdobeFragRandomAccessBox *p = (GF_AdobeFragRandomAccessBox*)a;
gf_isom_box_dump_start(a, "AdobeFragmentRandomAccessBox", trace);
fprintf(trace, "LongIDs=\"%u\" LongOffsets=\"%u\" TimeScale=\"%u\">\n", p->long_ids, p->long_offsets, p->time_scale);
for (i=0; i<... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 62,688,749,011,913,520,000,000,000,000,000,000,000 | 22 | fixed 2 possible heap overflows (inc. #1088) |
//! Dilate image by a rectangular structuring element of specified size \newinstance.
CImg<T> get_dilate(const unsigned int sx, const unsigned int sy, const unsigned int sz=1) const {
return (+*this).dilate(sx,sy,sz); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 126,084,396,584,245,820,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
p11_index_size (p11_index *index)
{
return_val_if_fail (index != NULL, -1);
return p11_dict_size (index->objects);
} | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 331,432,359,509,286,800,000,000,000,000,000,000,000 | 5 | Check for arithmetic overflows before allocating |
static void virgl_resource_detach_backing(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_resource_detach_backing detach_rb;
struct iovec *res_iovs = NULL;
int num_iovs = 0;
VIRTIO_GPU_FILL_CMD(detach_rb);
trace_virtio_gpu_cmd_res_bac... | 0 | [] | qemu | 2fe760554eb3769d70f608a158474f728ba45ba6 | 20,490,020,112,063,038,000,000,000,000,000,000,000 | 18 | virtio-gpu: check max_outputs only
The scanout id should not be above the configured num_scanouts.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
gpk_set_filekey(const u8 *key, const u8 *challenge,
const u8 *r_rn, u8 *kats)
{
int r = SC_SUCCESS, outl;
EVP_CIPHER_CTX * ctx = NULL;
u8 out[16];
memcpy(out, key+8, 8);
memcpy(out+8, key, 8);
ctx = EVP_CIPHER_CTX_new();
if (ctx == NULL)
return SC_ERROR_INTERNAL;
EVP_EncryptInit_e... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 93,207,275,579,402,160,000,000,000,000,000,000,000 | 49 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
do_free_special (gpointer key, gpointer value, gpointer data)
{
MonoClassField *field = key;
guint32 offset = GPOINTER_TO_UINT (value);
gint32 align;
guint32 size;
size = mono_type_size (field->type, &align);
do_free_special_slot (offset, size);
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 325,157,352,508,934,230,000,000,000,000,000,000,000 | 9 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
size_t mutt_b64_encode(char *out, const char *cin, size_t len, size_t olen)
{
unsigned char *begin = (unsigned char *) out;
const unsigned char *in = (const unsigned char *) cin;
while ((len >= 3) && (olen > 10))
{
*out++ = B64Chars[in[0] >> 2];
*out++ = B64Chars[((in[0] << 4) & 0x30) | (in[1] >> 4)];
... | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | neomutt | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | 183,145,393,492,457,720,000,000,000,000,000,000,000 | 32 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. |
line_terminator (const char *start _GL_UNUSED, const char *peeked, int peeklen)
{
const char *p = memchr (peeked, '\n', peeklen);
if (p)
/* p+1 because the line must include '\n' */
return p + 1;
return NULL;
} | 0 | [
"CWE-119"
] | wget | ba6b44f6745b14dce414761a8e4b35d31b176bba | 127,821,713,146,116,170,000,000,000,000,000,000,000 | 8 | Fix heap overflow in HTTP protocol handling (CVE-2017-13090)
* src/retr.c (fd_read_body): Stop processing on negative chunk size
Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint
Reported-by: Juhani Eronen from Finnish National Cyber Security Centre |
static inline bool hugetlb_register_node(struct node *node)
{
if (__hugetlb_register_node &&
node_state(node->dev.id, N_MEMORY)) {
__hugetlb_register_node(node);
return true;
}
return false;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 332,364,945,258,805,050,000,000,000,000,000,000,000 | 9 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
cudnnActivationDescriptor_t handle() const { return handle_.get(); } | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 108,667,462,736,793,930,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
am_get_idp_list(const LassoServer *server, LassoMdProtocolType protocol_type, LassoHttpMethod http_method)
{
GList *idp_entity_ids = NULL;
GList *entity_id = NULL;
GList *idp_entries = NULL;
LassoSamlp2IDPList *idp_list;
LassoSamlp2IDPEntry *idp_entry;
idp_list = LASSO_SAMLP2_IDP_LIST(lasso_sam... | 0 | [] | mod_auth_mellon | 6bdda9170a8f1757dabc5b109958657417728018 | 197,687,919,957,573,550,000,000,000,000,000,000,000 | 31 | Fix segmentation fault when receiving badly formed logout message.
If the logout message is badly formed, we won't get the entityID in
`logout->parent.remote_providerID`. If we call `apr_hash_get()` with a
null pointer, it will cause a segmentation fault.
Add a check to validate that the entityID is correctly set. |
authentic_sm_acl_init (struct sc_card *card, struct sm_info *sm_info, int cmd,
unsigned char *resp, size_t *resp_len)
{
struct sc_context *ctx;
struct sm_type_params_gp *params_gp;
struct sc_remote_data rdata;
int rv;
if (!card || !sm_info || !resp || !resp_len)
return SC_ERROR_INVALID_ARGUMENTS;
ctx = card... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 11,005,904,968,343,977,000,000,000,000,000,000,000 | 50 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
void crypt_drop_keyring_key(struct crypt_device *cd, struct volume_key *vks)
{
struct volume_key *vk = vks;
while (vk) {
crypt_drop_keyring_key_by_description(cd, vk->key_description, LOGON_KEY);
vk = crypt_volume_key_next(vk);
}
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 224,449,568,542,065,940,000,000,000,000,000,000,000 | 9 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
readconf_print(uschar *name, uschar *type, BOOL no_labels)
{
BOOL names_only = FALSE;
optionlist *ol;
optionlist *ol2 = NULL;
driver_instance *d = NULL;
macro_item *m;
int size = 0;
if (type == NULL)
{
if (*name == '+')
{
int i;
tree_node *t;
BOOL found = FALSE;
static uschar *types[] = { US"ad... | 1 | [
"CWE-264"
] | exim | 43ba2742c700d625dcdcdaf7bbadc2f72776854a | 191,108,854,519,601,140,000,000,000,000,000,000,000 | 216 | Fix CVE-2016-1531
Add keep_environment, add_environment.
Change the working directory to "/" during the early startup
phase.
(cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0)
(cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832)
(cherry picked from commit 14b82c8b736c8ed24eda... |
const TfLiteTensor* GetOptionalInputTensor(const TfLiteContext* context,
const TfLiteNode* node, int index) {
return GetInput(context, node, index);
} | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 5b048e87e4e55990dae6b547add4dae59f4e1c76 | 33,101,457,640,945,355,000,000,000,000,000,000,000 | 4 | Fix a null pointer exception in SVDF
This is due to not checking that `GetVariableInput` returns non-null tensor.
Also fix a potential null pointer exception in `GetVariableInput`.
PiperOrigin-RevId: 385160147
Change-Id: Iadf3f0705b036a9014d27caa5a8bbd91f4c4c401 |
int set_unit_path(const char *p) {
_cleanup_free_ char *c = NULL;
/* This is mostly for debug purposes */
c = path_make_absolute_cwd(p);
if (setenv("SYSTEMD_UNIT_PATH", c, 0) < 0)
return -errno;
return 0;
} | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 197,501,584,743,029,720,000,000,000,000,000,000,000 | 10 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
hook_search_type (const char *type)
{
int i;
if (!type)
return -1;
for (i = 0; i < HOOK_NUM_TYPES; i++)
{
if (strcmp (hook_type_string[i], type) == 0)
return i;
}
/* type not found */
return -1;
} | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 314,162,243,258,799,130,000,000,000,000,000,000,000 | 16 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
**/
CImg<T>& operator|=(const char *const expression) {
return *this|=(+*this)._fill(expression,true,1,0,0,"operator|=",this); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 269,303,104,388,463,460,000,000,000,000,000,000,000 | 3 | . |
static int kvm_try_get_pfn(kvm_pfn_t pfn)
{
if (kvm_is_reserved_pfn(pfn))
return 1;
return get_page_unless_zero(pfn_to_page(pfn)); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 154,791,793,747,038,950,000,000,000,000,000,000,000 | 6 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
g_markup_parse_boolean (const char *string,
gboolean *value)
{
char const * const falses[] = { "false", "f", "no", "n", "0" };
char const * const trues[] = { "true", "t", "yes", "y", "1" };
int i;
for (i = 0; i < G_N_ELEMENTS (falses); i++)
{
if (g_ascii_strcasecmp (string... | 0 | [
"CWE-476"
] | glib | fccef3cc822af74699cca84cd202719ae61ca3b9 | 95,394,793,507,128,880,000,000,000,000,000,000,000 | 31 | gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.
Inclu... |
void Item_param::reset()
{
DBUG_ENTER("Item_param::reset");
/* Shrink string buffer if it's bigger than max possible CHAR column */
if (str_value.alloced_length() > MAX_CHAR_WIDTH)
str_value.free();
else
str_value.length(0);
str_value_ptr.length(0);
/*
We must prevent all charset conversions unt... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 214,389,398,452,940,100,000,000,000,000,000,000,000 | 29 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
main(int argc, char *argv[])
{
int ch;
int fg, bg;
double r;
double c;
#if HAVE_USE_DEFAULT_COLORS
bool d_option = FALSE;
#endif
int m_option = 2;
int r_option = 0;
int s_option = 1;
size_t need;
char *my_env;
while ((ch = getopt(argc, argv, "T:dem:r:s:")) != -1) {
switch (... | 1 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 99,627,535,988,985,170,000,000,000,000,000,000,000 | 111 | 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 void launch(OpKernelContext* context, const Tensor& tensor_in,
const std::array<int64, 3>& window,
const std::array<int64, 3>& stride,
const std::array<int64, 3>& padding,
TensorFormat data_format, Padding padding_type,
... | 0 | [
"CWE-369",
"CWE-787"
] | tensorflow | 63c6a29d0f2d692b247f7bf81f8732d6442fad09 | 263,528,236,404,279,040,000,000,000,000,000,000,000 | 11 | Add missing validation, prevent heap OOB
PiperOrigin-RevId: 372246723
Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf |
static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
{
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct socket *sock = sk->sk_socket;
struct inode_security_struct *isec = SOCK_INODE(sock)->i_security;
if (skb->len < NLMSG_SPACE(0)) {
err = -EINVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err ... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 114,959,111,339,200,000,000,000,000,000,000,000,000 | 35 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
mptctl_eventquery (unsigned long arg)
{
struct mpt_ioctl_eventquery __user *uarg = (void __user *) arg;
struct mpt_ioctl_eventquery karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - "
"Unable to read ... | 1 | [
"CWE-362",
"CWE-369"
] | linux | 28d76df18f0ad5bcf5fa48510b225f0ed262a99b | 170,404,848,797,193,100,000,000,000,000,000,000,000 | 36 | scsi: mptfusion: Fix double fetch bug in ioctl
Tom Hatskevich reported that we look up "iocp" then, in the called
functions we do a second copy_from_user() and look it up again.
The problem that could cause is:
drivers/message/fusion/mptctl.c
674 /* All of these commands require an interrupt or
675 ... |
dns_local_removehost(const char *hostname, const ip_addr_t *addr)
{
int removed = 0;
struct local_hostlist_entry *entry = local_hostlist_dynamic;
struct local_hostlist_entry *last_entry = NULL;
while (entry != NULL) {
if (((hostname == NULL) || !strcmp(entry->name, hostname)) &&
((addr == NULL) || i... | 1 | [] | lwip | 9fb46e120655ac481b2af8f865d5ae56c39b831a | 288,781,249,379,503,340,000,000,000,000,000,000,000 | 25 | added source port randomization to make the DNS client more robust (see bug #43144) |
TEST(ArrayOpsTest, PadD_ShapeFn) {
for (const char* op_name : {"Pad", "MirrorPad"}) {
ShapeInferenceTestOp op(op_name);
op.input_tensors.resize(2);
// Inputs are input and paddings.
INFER_OK(op, "?;?", "?");
// Check shape of paddings.
INFER_ERROR("Shape must be rank 2 but is rank 3", op, "... | 0 | [
"CWE-125"
] | tensorflow | 7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d | 7,944,783,378,840,876,000,000,000,000,000,000,000 | 31 | Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute.
PiperOrigin-RevId: 402446942
Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9 |
void ComputeAsync(OpKernelContext* c, DoneCallback done) override {
auto group_key_t = c->input(0);
auto rank_t = c->input(1);
auto group_size_t = c->input(2);
OP_REQUIRES_OK_ASYNC(c, CheckInputs(group_size_t, group_key_t), done);
auto group_size = group_size_t.unaligned_flat<int32>()(0);
au... | 0 | [
"CWE-416"
] | tensorflow | ca38dab9d3ee66c5de06f11af9a4b1200da5ef75 | 157,508,967,495,450,520,000,000,000,000,000,000,000 | 54 | Fix undefined behavior in CollectiveReduceV2 and others
We should not call done after it's moved.
PiperOrigin-RevId: 400838185
Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1 |
static enum try_read_result try_read_network(conn *c) {
enum try_read_result gotdata = READ_NO_DATA_RECEIVED;
int res;
int num_allocs = 0;
assert(c != NULL);
if (c->rcurr != c->rbuf) {
if (c->rbytes != 0) /* otherwise there's nothing to copy */
memmove(c->rbuf, c->rcurr, c->rbyt... | 0 | [
"CWE-189"
] | memcached | 6695ccbc525c36d693aaa3e8337b36aa0c784424 | 21,426,351,449,260,320,000,000,000,000,000,000,000 | 57 | Fix segfault on specially crafted packet. |
static int kvm_dev_ioctl_create_vm(unsigned long type)
{
int r;
struct kvm *kvm;
struct file *file;
kvm = kvm_create_vm(type);
if (IS_ERR(kvm))
return PTR_ERR(kvm);
#ifdef CONFIG_KVM_MMIO
r = kvm_coalesced_mmio_init(kvm);
if (r < 0)
goto put_kvm;
#endif
r = get_unused_fd_flags(O_CLOEXEC);
if (r < 0)
go... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 123,004,787,673,188,370,000,000,000,000,000,000,000 | 48 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_disassoc_request *req)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
u8 bssid[ETH_ALEN];
u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
/*
* cfg80211 should catch this ... but it's racy since
* we can receive a disassoc fr... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 99,127,195,756,569,050,000,000,000,000,000,000,000 | 30 | 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... |
GenFingerprintStr(char *pFingerprint, int sizeFingerprint, char *fpBuf)
{
int iSrc, iDst;
fpBuf[0] = 'S', fpBuf[1] = 'H', fpBuf[2] = 'A'; fpBuf[3] = '1';
// TODO: length check fo fpBuf (but far from being urgent...)
for(iSrc = 0, iDst = 4 ; iSrc < sizeFingerprint ; ++iSrc, iDst += 3) {
sprintf(fpBuf+iDst, ":%2.2... | 0 | [
"CWE-787"
] | librelp | 2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf | 271,723,909,771,717,400,000,000,000,000,000,000,000 | 10 | unify error message generation |
const char *nntp_format_str(char *buf, size_t buflen, size_t col, int cols, char op,
const char *src, const char *prec, const char *if_str,
const char *else_str, unsigned long data, enum FormatFlag flags)
{
struct NntpServer *nserv = (struct NntpServer *) data;
... | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | 222,000,847,977,800,400,000,000,000,000,000,000,000 | 54 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. |
check_method_noarg(mrb_state *mrb, const mrb_callinfo *ci)
{
int argc = ci->n == CALL_MAXARGS ? RARRAY_LEN(ci->stack[1]) : ci->n;
if (ci->nk > 0) {
mrb_value kdict = ci->stack[mrb_ci_kidx(ci)];
if (!(mrb_hash_p(kdict) && mrb_hash_empty_p(mrb, kdict))) {
argc++;
}
}
if (argc > 0) {
mrb_argn... | 0 | [
"CWE-122",
"CWE-787"
] | mruby | 47068ae07a5fa3aa9a1879cdfe98a9ce0f339299 | 46,918,067,815,495,590,000,000,000,000,000,000,000 | 13 | vm.c: packed arguments length may be zero for `send` method. |
static int h2c_send_rst_stream(struct h2c *h2c, struct h2s *h2s)
{
struct buffer *res;
char str[13];
int ret;
/* RFC7540#5.4.2: To avoid looping, an endpoint MUST NOT send a
* RST_STREAM in response to a RST_STREAM frame.
*/
if (h2c->dft == H2_FT_RST_STREAM) {
ret = 1;
goto ignore;
}
if (h2c_mux_busy(h... | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 191,227,929,447,310,250,000,000,000,000,000,000,000 | 54 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
ut64 MACH0_(get_baddr)(struct MACH0_(obj_t)* bin) {
int i;
if (bin->hdr.filetype != MH_EXECUTE && bin->hdr.filetype != MH_DYLINKER) {
return 0;
}
for (i = 0; i < bin->nsegs; ++i) {
if (bin->segs[i].fileoff == 0 && bin->segs[i].filesize != 0) {
return bin->segs[i].vmaddr;
}
}
return 0;
} | 0 | [
"CWE-415",
"CWE-125"
] | radare2 | 60208765887f5f008b3b9a883f3addc8bdb9c134 | 327,037,551,471,447,750,000,000,000,000,000,000,000 | 13 | Fix #9970 - heap oobread in mach0 parser (#10026) |
NodePersistentFromJsDeferred(napi_deferred local) {
return reinterpret_cast<v8impl::Persistent<v8::Value>*>(local);
} | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 85,254,293,573,977,920,000,000,000,000,000,000,000 | 3 | 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... |
static void remove_all_translation_tables(exporter_ipfix_domain_t *exporter) {
input_translation_t *table, *next;
syslog(LOG_INFO, "Process_ipfix: Withdraw all templates from observation domain %u\n",
exporter->info.id);
table = exporter->input_translation_table;
while ( table ) {
next = table->next;
dbg_p... | 1 | [] | nfdump | ff0e855bd1f51bed9fc5d8559c64d3cfb475a5d8 | 67,314,404,480,234,180,000,000,000,000,000,000,000 | 24 | Fix security issues in netflow_v9.c and ipfix.c |
PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) {
int tok;
const char *target = ptr;
REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
default:
*nextTokPtr = ptr;
return XML_TOK_IN... | 0 | [
"CWE-116"
] | libexpat | 3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6 | 43,484,072,014,134,410,000,000,000,000,000,000,000 | 58 | lib: Add missing validation of encoding (CVE-2022-25235) |
static void print_submodule_summary(struct rev_info *rev, FILE *f,
const char *line_prefix,
const char *del, const char *add, const char *reset)
{
static const char format[] = " %m %s";
struct strbuf sb = STRBUF_INIT;
struct commit *commit;
while ((commit = get_revision(rev))) {
struct pretty_print_context ... | 0 | [] | git | a8dee3ca610f5a1d403634492136c887f83b59d2 | 23,185,454,747,221,637,000,000,000,000,000,000,000 | 28 | Disallow dubiously-nested submodule git directories
Currently it is technically possible to let a submodule's git
directory point right into the git dir of a sibling submodule.
Example: the git directories of two submodules with the names `hippo`
and `hippo/hooks` would be `.git/modules/hippo/` and
`.git/modules/hipp... |
flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
{
int i;
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
match_init_catchall(flow_metadata);
if (flow->tunnel.tun_id != htonll(0)) {
match_set_tun_id(flow_metadata, flow->tunnel.tun_id);
}
if (flow->tunnel.flags & FLOW_TNL_P... | 0 | [
"CWE-400"
] | ovs | ad0d22f6435b43ecfc30c0e877d490d36721f200 | 19,173,274,628,459,235,000,000,000,000,000,000,000 | 61 | 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... |
Error HeifContext::decode_overlay_image(heif_item_id ID,
std::shared_ptr<HeifPixelImage>& img,
const std::vector<uint8_t>& overlay_data) const
{
// find the IDs this image is composed of
auto iref_box = m_heif_file->get_iref_box();
... | 0 | [
"CWE-125"
] | libheif | f7399b62d7fbc596f1b2871578c1d2053bedf1dd | 328,842,277,904,496,700,000,000,000,000,000,000,000 | 100 | Handle case where referenced "iref" box doesn't exist (fixes #138). |
static ssize_t wdm_write
(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
{
u8 *buf;
int rv = -EMSGSIZE, r, we;
struct wdm_device *desc = file->private_data;
struct usb_ctrlrequest *req;
if (count > desc->wMaxCommand)
count = desc->wMaxCommand;
spin_lock_irq(&desc->iuspin);
we = des... | 0 | [
"CWE-119",
"CWE-269"
] | linux | c0f5ecee4e741667b2493c742b60b6218d40b3aa | 87,106,278,937,347,710,000,000,000,000,000,000,000 | 108 | USB: cdc-wdm: fix buffer overflow
The buffer for responses must not overflow.
If this would happen, set a flag, drop the data and return
an error after user space has read all remaining data.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
CC: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundati... |
static void launch(OpKernelContext* context, const Tensor& tensor_in,
const std::array<int64, 3>& window,
const std::array<int64, 3>& stride,
const std::array<int64, 3>& padding,
TensorFormat data_format, Padding padding_type,
... | 0 | [
"CWE-369",
"CWE-787"
] | tensorflow | 63c6a29d0f2d692b247f7bf81f8732d6442fad09 | 126,583,157,135,581,170,000,000,000,000,000,000,000 | 9 | Add missing validation, prevent heap OOB
PiperOrigin-RevId: 372246723
Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf |
ex_abbreviate(exarg_T *eap)
{
do_exmap(eap, TRUE); /* almost the same as mapping */
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 36,725,470,873,997,434,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
int MYSQL_BIN_LOG::set_purge_index_file_name(const char *base_file_name)
{
int error= 0;
DBUG_ENTER("MYSQL_BIN_LOG::set_purge_index_file_name");
if (fn_format(purge_index_file_name, base_file_name, mysql_data_home,
".~rec~", MYF(MY_UNPACK_FILENAME | MY_SAFE_PATH |
MY_... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 79,358,728,918,357,520,000,000,000,000,000,000,000 | 14 | 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... |
void userDefinedId(
uint16_t userDefinedId)
{
m_userDefinedId = userDefinedId;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 84,936,130,015,078,640,000,000,000,000,000,000,000 | 5 | 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 Image *ReadPALMImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
IndexPacket
index;
MagickBooleanType
status;
MagickOffsetType
totalOffset,
seekNextDepth;
MagickPixelPacket
transpix;
register IndexPacket
*indexes;
register ssize_t
i... | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 105,877,957,170,096,560,000,000,000,000,000,000,000 | 375 | Fix ultra rare but potential memory-leak |
static void cmd_anal_class_method(RCore *core, const char *input) {
RAnalClassErr err = R_ANAL_CLASS_ERR_SUCCESS;
char c = input[0];
switch (c) {
case ' ': // "acm"
case '-': // "acm-"
case 'n': { // "acmn"
const char *str = r_str_trim_head_ro (input + 1);
if (!*str) {
eprintf ("No class name given.\n");
... | 0 | [
"CWE-703",
"CWE-908"
] | radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | 27,556,360,530,380,063,000,000,000,000,000,000,000 | 85 | Fix segfault in adf (#16230) |
static void gen_vector_table15(TrueMotion1Context *s, const uint8_t *sel_vector_table)
{
int len, i, j;
unsigned char delta_pair;
for (i = 0; i < 1024; i += 4)
{
len = *sel_vector_table++ / 2;
for (j = 0; j < len; j++)
{
delta_pair = *sel_vector_table++;
... | 0 | [
"CWE-703"
] | FFmpeg | 2240e2078d53d3cfce8ff1dda64e58fa72038602 | 148,692,331,243,763,080,000,000,000,000,000,000,000 | 20 | truemotion1: check the header size
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
static int packet_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
struct packet_sock *po;
__be16 proto = (__force __be16)protocol; /* weird, but documented */
int err;
if (!capable(CAP_NET_RAW))
return -EPERM;
if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&... | 0 | [
"CWE-909"
] | linux-2.6 | 67286640f638f5ad41a946b9a3dc75327950248f | 71,234,430,905,547,160,000,000,000,000,000,000,000 | 63 | net: packet: fix information leak to userland
packet_getname_spkt() doesn't initialize all members of sa_data field of
sockaddr struct if strlen(dev->name) < 13. This structure is then copied
to userland. It leads to leaking of contents of kernel stack memory.
We have to fully fill sa_data with strncpy() instead of ... |
OJPEGPreDecodeSkipRaw(TIFF* tif)
{
OJPEGState* sp=(OJPEGState*)tif->tif_data;
uint32 m;
m=sp->lines_per_strile;
if (sp->subsampling_convert_state!=0)
{
if (sp->subsampling_convert_clines-sp->subsampling_convert_state>=m)
{
sp->subsampling_convert_state+=m;
if (sp->subsampling_convert_state==sp->subsampli... | 0 | [
"CWE-369"
] | libtiff | 43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec | 192,631,561,092,331,850,000,000,000,000,000,000,000 | 31 | * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 |
u32 parse_senc_param(char *arg_val, u32 opt)
{
switch (opt) {
case 0: //-sync
smenc_opts.flags |= GF_SM_ENCODE_RAP_INBAND;
smenc_opts.rap_freq = atoi(arg_val);
break;
case 1: //-shadow
smenc_opts.flags &= ~GF_SM_ENCODE_RAP_INBAND;
smenc_opts.flags |= GF_SM_ENCODE_RAP_SHADOW;
smenc_opts.rap_freq = atoi(ar... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 256,495,993,724,664,360,000,000,000,000,000,000,000 | 30 | fixed #1734 |
int ff_jpeg2000_init_component(Jpeg2000Component *comp,
Jpeg2000CodingStyle *codsty,
Jpeg2000QuantStyle *qntsty,
int cbps, int dx, int dy,
AVCodecContext *avctx)
{
uint8_t log2_band_prec_width... | 1 | [
"CWE-703"
] | FFmpeg | 912ce9dd2080c5837285a471d750fa311e09b555 | 221,904,829,234,595,700,000,000,000,000,000,000,000 | 286 | jpeg2000: fix dereferencing invalid pointers
Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
e_ews_calendar_to_new (void)
{
return g_new0 (EEwsCalendarTo, 1);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 91,660,506,881,162,760,000,000,000,000,000,000,000 | 4 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
double get_dispatch_queue_max_age(utime_t now) override {
return dispatch_queue.get_max_age(now);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 25,830,598,597,453,790,000,000,000,000,000,000,000 | 3 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static void avic_init_vmcb(struct vcpu_svm *svm)
{
struct vmcb *vmcb = svm->vmcb;
struct kvm_svm *kvm_svm = to_kvm_svm(svm->vcpu.kvm);
phys_addr_t bpa = __sme_set(page_to_phys(svm->avic_backing_page));
phys_addr_t lpa = __sme_set(page_to_phys(kvm_svm->avic_logical_id_table_page));
phys_addr_t ppa = __sme_set(page_... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 3,968,571,370,449,955,400,000,000,000,000,000,000 | 17 | 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... |
int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
const uint8_t *name, uint8_t *dst, int dst_size)
{
int namelen = strlen(name);
int len;
while (*data != AMF_DATA_TYPE_OBJECT && data < data_end) {
len = ff_amf_tag_size(data, data_end);
if (l... | 1 | [
"CWE-20"
] | FFmpeg | ffcc82219cef0928bed2d558b19ef6ea35634130 | 280,732,613,775,770,420,000,000,000,000,000,000,000 | 46 | avformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2
Fixes: out of array accesses
Found-by: JunDong Xie of Ant-financial Light-Year Security Lab
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
int rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original,
const char *secret)
{
uint32_t lvalue;
uint32_t vendorcode;
VALUE_PAIR **tail;
VALUE_PAIR *pair;
uint8_t *ptr;
int packet_length;
int attribute;
int attrlen;
int vendorlen;
radius_packet_t *hdr;
int vsa_tlen, vsa_llen;
D... | 1 | [] | freeradius-server | 860cad9e02ba344edb0038419e415fe05a9a01f4 | 290,339,025,545,489,540,000,000,000,000,000,000,000 | 274 | Fix crash on Tunnel-Password attributes with zero length |
static int cac_set_security_env(sc_card_t *card, const sc_security_env_t *env, int se_num)
{
int r = SC_SUCCESS;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL,
"flags=%08lx op=%d alg=%d algf=%08x algr=%08x kr0=%02x, krfl=%"SC_FORMAT_LEN_SIZE_T"u\n",
env->flags, env-... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 301,274,216,384,680,600,000,000,000,000,000,000,000 | 19 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
int openssl_get_fork_id(void)
{
return 0;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 235,658,314,113,985,360,000,000,000,000,000,000,000 | 4 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC)
{
zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev,
*stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks;
struct stat *stat_sb;
php_stream_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 241,406,064,953,805,340,000,000,000,000,000,000,000 | 246 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void SplashOutputDev::updateStrokeOverprint(GfxState *state) {
splash->setStrokeOverprint(state->getStrokeOverprint());
} | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 121,442,664,277,809,390,000,000,000,000,000,000,000 | 3 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
GF_Err ipro_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_ItemProtectionBox *ptr = (GF_ItemProtectionBox *)s;
if (a->type == GF_ISOM_BOX_TYPE_SINF) {
BOX_FIELD_LIST_ASSIGN(protection_information)
return GF_OK;
}
return GF_OK;
} | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 61,617,747,726,064,340,000,000,000,000,000,000,000 | 9 | fixed #1786 (fuzz) |
static void nfs_zap_caches_locked(struct inode *inode)
{
struct nfs_inode *nfsi = NFS_I(inode);
int mode = inode->i_mode;
nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE);
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
nfsi->attrtimeo_timestamp = jiffies;
memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 155,645,802,019,289,680,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> |
STATIC ptr_t GC_least_described_address(ptr_t start)
{
MEMORY_BASIC_INFORMATION buf;
size_t result;
LPVOID limit;
ptr_t p;
LPVOID q;
limit = GC_sysinfo.lpMinimumApplicationAddress;
p = (ptr_t)((word)start & ~(GC_page_size - 1));
for (;;) {
q = (LPVOID)(p - GC_page_size);
... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 338,567,296,388,192,440,000,000,000,000,000,000,000 | 19 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
void hugetlb_show_meminfo(void)
{
struct hstate *h;
int nid;
if (!hugepages_supported())
return;
for_each_node_state(nid, N_MEMORY)
for_each_hstate(h)
pr_info("Node %d hugepages_total=%u hugepages_free=%u hugepages_surp=%u hugepages_size=%lukB\n",
nid,
h->nr_huge_pages_node[nid],
h->free_huge_p... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 162,225,422,154,935,570,000,000,000,000,000,000,000 | 17 | 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... |
static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
int family)
{
struct sock *sk;
struct kmem_cache *slab;
slab = prot->slab;
if (slab != NULL)
sk = kmem_cache_alloc(slab, priority);
else
sk = kmalloc(prot->obj_size, priority);
if (sk != NULL) {
if (security_sk_alloc(sk, family, prior... | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 20,433,823,350,827,348,000,000,000,000,000,000,000 | 31 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
virtual ~ActualThreadPacketReader(){} | 0 | [
"CWE-1187"
] | lepton | 82167c144a322cc956da45407f6dce8d4303d346 | 72,940,178,692,264,740,000,000,000,000,000,000,000 | 1 | fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency |
e_mail_part_id_has_suffix (EMailPart *part,
const gchar *suffix)
{
g_return_val_if_fail (E_IS_MAIL_PART (part), FALSE);
g_return_val_if_fail (suffix != NULL, FALSE);
return g_str_has_suffix (part->priv->id, suffix);
} | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 251,589,564,744,577,330,000,000,000,000,000,000,000 | 8 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
void Pack(int dim, const Scalar* const* input_data,
const Dims<4>* const* input_dims, const int32* input_zeropoint,
const float* input_scale, int inputs_count, Scalar* output_data,
const Dims<4>& output_dims, const int32 output_zeropoint,
const float output_scale) {
std::vector... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 67,185,878,027,344,310,000,000,000,000,000,000,000 | 22 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
DECLAREwriteFunc(writeBufferToContigTiles)
{
uint32 imagew = TIFFScanlineSize(out);
uint32 tilew = TIFFTileRowSize(out);
int iskew = imagew - tilew;
tsize_t tilesize = TIFFTileSize(out);
tdata_t obuf;
uint8* bufp = (uint8*) buf;
uint32 tl, tw;
uint32 row;
(void) spp;
obuf = _TIFFmalloc(TIFFTileSize(out));
... | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 5ad9d8016fbb60109302d558f7edb2cb2a3bb8e3 | 212,509,767,789,958,400,000,000,000,000,000,000,000 | 52 | * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
tile width vs image width. Reported as MSVR 35103
by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
Mitigations team. |
static int kvm_suspend(void)
{
if (kvm_usage_count)
hardware_disable_nolock(NULL);
return 0; | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 126,126,618,199,132,530,000,000,000,000,000,000,000 | 6 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
virtual int reset(void) { bzero(ptr,pack_length()); return 0; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 150,440,682,977,559,790,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
int width, int pad, int height, int flags)
{
unsigned char *dstPlanes[3];
int pw0, ph0, strides[3], retval=-1, jpegSubsamp=-1;
int i, jpegwidth, jpegheight, scaledw, scaledh;
get... | 0 | [] | libjpeg-turbo | dab6be4cfb2f9307b5378d2d1dc74d9080383dc2 | 207,300,770,970,394,380,000,000,000,000,000,000,000 | 66 | tjDecompressToYUV*(): Fix OOB write/double free
... when attempting to decompress grayscale JPEG images with sampling
factors != 1.
Fixes #387 |
static bool search_nested_keyrings(struct key *keyring,
struct keyring_search_context *ctx)
{
struct {
struct key *keyring;
struct assoc_array_node *node;
int slot;
} stack[KEYRING_SEARCH_MAX_DEPTH];
struct assoc_array_shortcut *shortcut;
struct assoc_array_node *node;
struct assoc_array_ptr *ptr;
s... | 0 | [
"CWE-310"
] | linux | 979e0d74651ba5aa533277f2a6423d0f982fb6f6 | 237,501,954,266,775,740,000,000,000,000,000,000,000 | 204 | KEYS: Make the keyring cycle detector ignore other keyrings of the same name
This fixes CVE-2014-0102.
The following command sequence produces an oops:
keyctl new_session
i=`keyctl newring _ses @s`
keyctl link @s $i
The problem is that search_nested_keyrings() sees two keyrings that have
matching type and descri... |
static void parse_object_id(std::string const& objspec,
bool& trailer, int& obj, int& gen)
{
if (objspec == "trailer")
{
trailer = true;
}
else
{
trailer = false;
obj = QUtil::string_to_int(objspec.c_str());
size_t comma = objspec.find(',')... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 303,452,637,172,661,140,000,000,000,000,000,000,000 | 19 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int nfnl_err_add(struct list_head *list, struct nlmsghdr *nlh, int err)
{
struct nfnl_err *nfnl_err;
nfnl_err = kmalloc(sizeof(struct nfnl_err), GFP_KERNEL);
if (nfnl_err == NULL)
return -ENOMEM;
nfnl_err->nlh = nlh;
nfnl_err->err = err;
list_add_tail(&nfnl_err->head, list);
return 0;
} | 0 | [
"CWE-200",
"CWE-125"
] | linux | c58d6c93680f28ac58984af61d0a7ebf4319c241 | 190,575,277,077,699,500,000,000,000,000,000,000,000 | 14 | netfilter: nfnetlink: correctly validate length of batch messages
If nlh->nlmsg_len is zero then an infinite loop is triggered because
'skb_pull(skb, msglen);' pulls zero bytes.
The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len <
NLMSG_HDRLEN' which bypasses the length validation and will later
trigger an ... |
static void call_nt_transact_set_user_quota(connection_struct *conn,
struct smb_request *req,
uint16 **ppsetup,
uint32 setup_count,
char **ppparams,
uint32 parameter_count,
char **ppdata,
uint32 data_count,
uint32 max_data_count)
{
char *params = ... | 0 | [
"CWE-189"
] | samba | efdbcabbe97a594572d71d714d258a5854c5d8ce | 53,163,983,754,532,770,000,000,000,000,000,000,000 | 97 | Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.
Ensure we never wrap whilst adding client provided input.
CVE-2013-4124
Signed-off-by: Jeremy Allison <jra@samba.org> |
void Utility::DisplayStdWarningDialog(const QString &warning_message, const QString &detailed_text)
{
SigilMessageBox message_box(QApplication::activeWindow());
message_box.setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
message_box.setModal(true);
message_box.setIcon(QMessageBox::Warning);
m... | 0 | [
"CWE-22"
] | Sigil | 0979ba8d10c96ebca330715bfd4494ea0e019a8f | 250,693,224,584,157,070,000,000,000,000,000,000,000 | 16 | harden plugin unzipping to zip-slip attacks |
static void show_regs_if_on_stack(struct stack_info *info, struct pt_regs *regs,
bool partial)
{
/*
* These on_stack() checks aren't strictly necessary: the unwind code
* has already validated the 'regs' pointer. The checks are done for
* ordering reasons: if the registers are on the next stack, we don't
... | 0 | [
"CWE-20"
] | linux | 342db04ae71273322f0011384a9ed414df8bdae4 | 113,798,147,759,521,710,000,000,000,000,000,000,000 | 25 | x86/dumpstack: Don't dump kernel memory based on usermode RIP
show_opcodes() is used both for dumping kernel instructions and for dumping
user instructions. If userspace causes #PF by jumping to a kernel address,
show_opcodes() can be reached with regs->ip controlled by the user,
pointing to kernel code. Make sure th... |
Item_case_expr::Item_case_expr(THD *thd, uint case_expr_id):
Item_sp_variable(thd, C_STRING_WITH_LEN("case_expr")),
m_case_expr_id(case_expr_id)
{
} | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 187,495,039,947,002,400,000,000,000,000,000,000,000 | 5 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
static unsigned long __next_timer_interrupt(struct timer_base *base)
{
unsigned long clk, next, adj;
unsigned lvl, offset = 0;
next = base->clk + NEXT_TIMER_MAX_DELTA;
clk = base->clk;
for (lvl = 0; lvl < LVL_DEPTH; lvl++, offset += LVL_SIZE) {
int pos = next_pending_bucket(base, offset, clk & LVL_MASK);
if ... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 301,990,521,579,786,850,000,000,000,000,000,000,000 | 59 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static void __perf_event_read(void *info)
{
struct perf_read_data *data = info;
struct perf_event *sub, *event = data->event;
struct perf_event_context *ctx = event->ctx;
struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
struct pmu *pmu = event->pmu;
/*
* If this is a task context, we need to check whe... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 311,672,203,009,049,080,000,000,000,000,000,000,000 | 54 | 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... |
static BSONObj toBsonArray(const intrusive_ptr<Expression>& expression) {
BSONArrayBuilder bab;
bab << expression->serialize(false);
return bab.obj();
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 307,784,247,018,287,800,000,000,000,000,000,000,000 | 5 | SERVER-38070 fix infinite loop in agg expression |
char *xmlrpc_double(char *buf, double value)
{
*buf = '\0';
snprintf(buf, XMLRPC_BUFSIZE, "<double>%g</double>", value);
return buf;
} | 0 | [
"CWE-119",
"CWE-787"
] | atheme | 87580d767868360d2fed503980129504da84b63e | 233,675,793,912,752,450,000,000,000,000,000,000,000 | 6 | Do not copy more bytes than were allocated |
static void test_bug11754979()
{
MYSQL* conn;
DBUG_ENTER("test_bug11754979");
myheader("test_bug11754979");
DIE_UNLESS((conn= mysql_client_init(NULL)));
DIE_UNLESS(mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db:"test", opt_port,
opt_unix_socket, CLIENT_F... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 149,569,192,463,138,600,000,000,000,000,000,000,000 | 21 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
rad_put_string(struct rad_handle *h, int type, const char *str)
{
return rad_put_attr(h, type, str, strlen(str));
} | 0 | [
"CWE-119",
"CWE-787"
] | php-radius | 13c149b051f82b709e8d7cc32111e84b49d57234 | 134,639,694,187,499,730,000,000,000,000,000,000,000 | 4 | Fix a security issue in radius_get_vendor_attr().
The underlying rad_get_vendor_attr() function assumed that it would always be
given valid VSA data. Indeed, the buffer length wasn't even passed in; the
assumption was that the length field within the VSA structure would be valid.
This could result in denial of servic... |
libxlDomainDeviceDefPostParse(virDomainDeviceDef *dev,
const virDomainDef *def,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
if (dev->type ... | 0 | [
"CWE-667"
] | libvirt | 23b51d7b8ec885e97a9277cf0a6c2833db4636e8 | 109,322,987,277,401,030,000,000,000,000,000,000,000 | 98 | libxl: Disable death events after receiving a shutdown event
The libxl driver will handle all domain destruction and cleanup
when receiving a domain shutdown event from libxl. Commit fa30ee04a2a
introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct
to ignore subsequent death events from libxl. But lib... |
void qpdf_set_deterministic_ID(qpdf_data qpdf, QPDF_BOOL value)
{
QTC::TC("qpdf", "qpdf-c called qpdf_set_deterministic_ID");
qpdf->qpdf_writer->setDeterministicID(value);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 139,792,669,765,641,280,000,000,000,000,000,000,000 | 5 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static void doDie(int sig)
{
# define MSG1 "DoDie called.\n"
# define MSG2 "DoDie called 5 times - unconditional exit\n"
static int iRetries = 0; /* debug aid */
if(Debug)
write(1, MSG1, sizeof(MSG1) - 1);
if(iRetries++ == 4) {
if(Debug)
write(1, MSG2, sizeof(MSG2) - 1);
abort();
}
bFinished = sig;
# unde... | 0 | [
"CWE-119"
] | rsyslog | 1ca6cc236d1dabf1633238b873fb1c057e52f95e | 41,360,283,990,816,180,000,000,000,000,000,000,000 | 16 | bugfix: off-by-one(two) bug in legacy syslog parser |
HandleFileDownload(rfbClientPtr cl, rfbTightClientPtr rtcp)
{
pthread_t fileDownloadThread;
FileTransferMsg fileDownloadMsg;
memset(&fileDownloadMsg, 0, sizeof(FileTransferMsg));
fileDownloadMsg = ChkFileDownloadErr(cl, rtcp);
if((fileDownloadMsg.data != NULL) && (fileDownloadMsg.length != 0)) {
rfbWriteExact(... | 0 | [
"CWE-416"
] | libvncserver | ca2a5ac02fbbadd0a21fabba779c1ea69173d10b | 267,348,179,515,608,460,000,000,000,000,000,000,000 | 31 | tightvnc-filetransfer: fix heap use-after-free
One can only guess what the intended semantics were here, but as every
other rfbCloseClient() call in this file is followed by an immediate
return, let's assume this was forgotton in this case.
Anyway, don't forget to clean up to not leak memory.
Closes #241 |
ms_escher_read_SpgrContainer (MSEscherState *state, MSEscherHeader *h)
{
return ms_escher_read_container (state, h, 0, FALSE);
} | 0 | [
"CWE-119"
] | gnumeric | b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc | 127,530,167,113,713,570,000,000,000,000,000,000,000 | 4 | xls: fuzzed file crash. |
static int icmpv6_rcv(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct inet6_dev *idev = __in6_dev_get(dev);
const struct in6_addr *saddr, *daddr;
struct icmp6hdr *hdr;
u8 type;
bool success = false;
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
struct sec_path *sp = skb_sec_path(skb);... | 0 | [] | linux | 1d2f7b2d956e242179aaf4a08f3545f99c81f9a3 | 10,706,385,924,370,942,000,000,000,000,000,000,000 | 138 | net: ipv6: tcp reset, icmp need to consider L3 domain
Responses for packets to unused ports are getting lost with L3 domains.
IPv4 has ip_send_unicast_reply for sending TCP responses which accounts
for L3 domains; update the IPv6 counterpart tcp_v6_send_response.
For icmp the L3 master check needs to be moved up in i... |
save_previous_kprobe(struct kprobe_ctlblk *kcb)
{
kcb->prev_kprobe.kp = kprobe_running();
kcb->prev_kprobe.status = kcb->kprobe_status;
kcb->prev_kprobe.old_flags = kcb->kprobe_old_flags;
kcb->prev_kprobe.saved_flags = kcb->kprobe_saved_flags;
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 119,818,044,821,545,190,000,000,000,000,000,000,000 | 7 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other)
{
struct unix_sock *ousk = unix_sk(other);
struct sk_buff *skb;
int err = 0;
skb = sock_alloc_send_skb(sock->sk, 1, msg->msg_flags & MSG_DONTWAIT, &err);
if (!skb)
return err;
skb_put(skb, 1);
err = skb_copy_datagram_from_iter... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 70,383,438,270,901,680,000,000,000,000,000,000,000 | 44 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.