func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb cb)
{
ctx->SetPasswordCb(cb);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 258,780,734,124,697,900,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
sds sdscpylen(sds s, const char *t, size_t len) {
if (sdsalloc(s) < len) {
s = sdsMakeRoomFor(s,len-sdslen(s));
if (s == NULL) return NULL;
}
memcpy(s, t, len);
s[len] = '\0';
sdssetlen(s, len);
return s;
} | 0 | [
"CWE-190"
] | redis | d32f2e9999ce003bad0bd2c3bca29f64dcce4433 | 119,933,246,021,783,570,000,000,000,000,000,000,000 | 10 | Fix integer overflow (CVE-2021-21309). (#8522)
On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309).
This fix has two parts:
Set a reasonable limit to the config parameter.
A... |
ioat_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie,
struct dma_tx_state *txstate)
{
struct ioat_chan_common *chan = to_chan_common(c);
struct ioatdma_device *device = chan->device;
enum dma_status ret;
ret = dma_cookie_status(c, cookie, txstate);
if (ret == DMA_COMPLETE)
return ret;
device->clean... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 147,551,893,751,263,340,000,000,000,000,000,000,000 | 15 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
GetCipherPtr(VALUE obj)
{
EVP_CIPHER_CTX *ctx;
SafeGetCipher(obj, ctx);
return EVP_CIPHER_CTX_cipher(ctx);
} | 0 | [
"CWE-326"
] | ruby | 739782e37a6662fea379e7ef3ec89e851b04b46c | 234,760,043,525,518,330,000,000,000,000,000,000,000 | 8 | * ext/openssl/ossl_cipher.c: remove the encryption key initialization
from Cipher#initialize. This is effectively a revert of r32723
("Avoid possible SEGV from AES encryption/decryption", 2011-07-28).
the patch is derived from https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062,
writ... |
archive_write_get_bytes_in_last_block(struct archive *_a)
{
struct archive_write *a = (struct archive_write *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
ARCHIVE_STATE_ANY, "archive_write_get_bytes_in_last_block");
return (a->bytes_in_last_block);
} | 0 | [
"CWE-703",
"CWE-189"
] | libarchive | 22531545514043e04633e1c015c7540b9de9dbe4 | 261,685,578,720,710,520,000,000,000,000,000,000,000 | 7 | Limit write requests to at most INT_MAX.
This prevents a certain common programming error (passing -1 to write)
from leading to other problems deeper in the library. |
static int readOHDRHeaderMessageDataFill1or2(struct READER *reader) {
int spaceAllocationTime = fgetc(reader->fhd);
int fillValueWriteTime = fgetc(reader->fhd);
int fillValueDefined = fgetc(reader->fhd);
if (spaceAllocationTime < 0 || fillValueWriteTime < 0 || fillValueDefined < 0)
return MYSOFA_READ_ERROR... | 0 | [
"CWE-787"
] | libmysofa | 890400ebd092c574707d0c132124f8ff047e20e1 | 130,488,941,134,424,830,000,000,000,000,000,000,000 | 22 | Fix for issue 163 |
bool Match(IMkvReader* pReader, long long& pos, unsigned long expected_id,
unsigned char*& buf, size_t& buflen) {
if (!pReader || pos < 0)
return false;
long long total = 0;
long long available = 0;
long status = pReader->Length(&total, &available);
if (status < 0 || (total >= 0 && available ... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 203,140,366,357,750,500,000,000,000,000,000,000,000 | 58 | 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 |
to_pixman_image (cairo_surface_t *s)
{
return ((cairo_image_surface_t *)s)->pixman_image;
} | 0 | [
"CWE-787"
] | cairo | c986a7310bb06582b7d8a566d5f007ba4e5e75bf | 55,343,601,728,149,740,000,000,000,000,000,000,000 | 4 | image: Enable inplace compositing with opacities for general routines
On a SNB i5-2500:
Speedups
========
firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup
swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup
ocitysmap 485.64 -> 431.94: 1.12x speedup
Slowdowns
===... |
static struct ldb_val ldb_dn_convert_local(struct ldb_module *module, void *mem_ctx, const struct ldb_val *val)
{
struct ldb_context *ldb;
struct ldb_dn *dn, *newdn;
struct ldb_val newval;
ldb = ldb_module_get_ctx(module);
dn = ldb_dn_from_ldb_val(mem_ctx, ldb, val);
if (! ldb_dn_validate(dn)) {
newval.length... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 293,994,864,736,971,230,000,000,000,000,000,000,000 | 27 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
apr_byte_t oidc_util_jwt_verify(request_rec *r, const char *secret, const char *compact_encoded_jwt,
json_t **result, apr_byte_t stripped_header) {
oidc_debug(r, "enter: JWT header=%s", oidc_proto_peek_jwt_header(r, compact_encoded_jwt, NULL));
apr_byte_t rv = FALSE;
oidc_jose_error_t err;
oidc_jwk_t *jwk = NU... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 213,165,911,450,463,030,000,000,000,000,000,000,000 | 44 | Add a function to escape Javascript characters |
static int do_move_mount(struct path *path, const char *old_name)
{
struct path old_path, parent_path;
struct mount *p;
struct mount *old;
struct mountpoint *mp;
int err;
if (!old_name || !*old_name)
return -EINVAL;
err = kern_path(old_name, LOOKUP_FOLLOW, &old_path);
if (err)
return err;
mp = lock_mount(... | 0 | [
"CWE-703"
] | linux | cd4a40174b71acd021877341684d8bb1dc8ea4ae | 199,697,165,402,149,600,000,000,000,000,000,000,000 | 69 | mnt: Fail collect_mounts when applied to unmounted mounts
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_... |
static void ext4_mb_pa_callback(struct rcu_head *head)
{
struct ext4_prealloc_space *pa;
pa = container_of(head, struct ext4_prealloc_space, u.pa_rcu);
BUG_ON(atomic_read(&pa->pa_count));
BUG_ON(pa->pa_deleted == 0);
kmem_cache_free(ext4_pspace_cachep, pa);
} | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 108,801,731,321,232,000,000,000,000,000,000,000,000 | 9 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
int gnutls_x509_ext_import_private_key_usage_period(const gnutls_datum_t * ext,
time_t * activation,
time_t * expiration)
{
int result, ret;
ASN1_TYPE c2 = ASN1_TYPE_EMPTY;
result = asn1_create_element
(_gnutls_get_pkix(), "PKIX1.PrivateKeyUsagePeriod", &c2);
if (result != ASN1_SUCCESS) {
gnut... | 0 | [] | gnutls | d6972be33264ecc49a86cd0958209cd7363af1e9 | 143,742,744,600,662,320,000,000,000,000,000,000,000 | 35 | eliminated double-free in the parsing of dist points
Reported by Robert Święcki. |
handleURI(const char *str, const char *base, FILE *o) {
int ret;
xmlURIPtr uri;
xmlChar *res = NULL;
uri = xmlCreateURI();
if (base == NULL) {
ret = xmlParseURIReference(uri, str);
if (ret != 0)
fprintf(o, "%s : error %d\n", str, ret);
else {
xmlNormalizeURIPath(uri->path);
xmlPr... | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 233,386,981,009,027,370,000,000,000,000,000,000,000 | 28 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
void MACH0_(kv_loadlibs)(struct MACH0_(obj_t) * bin) {
int i;
for (i = 0; i < bin->nlibs; i++) {
sdb_set(bin->kv, sdb_fmt("libs.%d.name", i), bin->libs[i], 0);
}
} | 0 | [
"CWE-787"
] | rizin | 348b1447d1452f978b69631d6de5b08dd3bdf79d | 51,916,680,485,372,970,000,000,000,000,000,000,000 | 6 | fix #2956 - oob write in mach0.c |
merge_keys_and_selfsig (KBNODE keyblock)
{
if (!keyblock)
;
else if (keyblock->pkt->pkttype == PKT_PUBLIC_KEY)
merge_selfsigs (keyblock);
else
log_debug ("FIXME: merging secret key blocks is not anymore available\n");
} | 0 | [
"CWE-310"
] | gnupg | 4bde12206c5bf199dc6e12a74af8da4558ba41bf | 231,385,246,840,796,500,000,000,000,000,000,000,000 | 9 | gpg: Distinguish between missing and cleared key flags.
* include/cipher.h (PUBKEY_USAGE_NONE): New.
* g10/getkey.c (parse_key_usage): Set new flag.
--
We do not want to use the default capabilities (derived from the
algorithm) if any key flags are given in a signature. Thus if key
flags are used in any way, the def... |
static struct uvc_entity *uvc_entity_by_reference(struct uvc_device *dev,
int id, struct uvc_entity *entity)
{
unsigned int i;
if (entity == NULL)
entity = list_entry(&dev->entities, struct uvc_entity, list);
list_for_each_entry_continue(entity, &dev->entities, list) {
for (i = 0; i < entity->bNrInPins; ++i)
... | 0 | [
"CWE-269"
] | linux | 68035c80e129c4cfec659aac4180354530b26527 | 194,070,061,358,313,130,000,000,000,000,000,000,000 | 16 | media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors
Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked
up the following WARNING from the UVC chain scanning code:
| list_add double add: new=ffff880069084010, prev=ffff880069084010,
| next=ffff880067d22298.
| ----------... |
static int snd_pcm_free(struct snd_pcm *pcm)
{
if (!pcm)
return 0;
if (!pcm->internal)
pcm_call_notify(pcm, n_unregister);
if (pcm->private_free)
pcm->private_free(pcm);
snd_pcm_lib_preallocate_free_for_all(pcm);
snd_pcm_free_stream(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK]);
snd_pcm_free_stream(&pcm->stream... | 0 | [
"CWE-416"
] | linux | 362bca57f5d78220f8b5907b875961af9436e229 | 178,297,068,078,881,970,000,000,000,000,000,000,000 | 14 | ALSA: pcm: prevent UAF in snd_pcm_info
When the device descriptor is closed, the `substream->runtime` pointer
is freed. But another thread may be in the ioctl handler, case
SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
calls snd_pcm_info() which accesses the now freed `substream->runtime`.
Note:... |
static void usage(void) {
printf(PACKAGE " " VERSION "\n");
printf("-p <num> TCP port number to listen on (default: 11211)\n"
"-U <num> UDP port number to listen on (default: 11211, 0 is off)\n"
"-s <file> UNIX socket path to listen on (disables network support)\n"
... | 0 | [
"CWE-20"
] | memcached | d9cd01ede97f4145af9781d448c62a3318952719 | 93,397,198,303,447,680,000,000,000,000,000,000,000 | 51 | Use strncmp when checking for large ascii multigets. |
htp_status_t htp_tx_state_response_headers(htp_tx_t *tx) {
if (tx == NULL) return HTP_ERROR;
// Check for compression.
// Determine content encoding.
tx->response_content_encoding = HTP_COMPRESSION_NONE;
htp_header_t *ce = htp_table_get_c(tx->response_headers, "content-encoding");
if (ce != ... | 0 | [] | libhtp | c7c03843cd6b1cbf44eb435d160ba53aec948828 | 274,269,601,792,147,330,000,000,000,000,000,000,000 | 62 | Harden decompress code against memory stress
Under severe memory pressure the decompress code can fail to setup
properly. Add checks before dereferencing pointers. |
GF_Err csgp_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i, bits, gidx_mask;
Bool index_msb_indicates_fragment_local_description, grouping_type_parameter_present;
u32 pattern_size, scount_size, index_size;
GF_CompactSampleGroupBox *ptr = (GF_CompactSampleGroupBox *)s;
ISOM_DECREASE_SIZE(ptr, 8);
ptr->version = gf... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 260,800,820,163,561,730,000,000,000,000,000,000,000 | 94 | fixed #2255 |
GF_Err gf_sm_load_init_svg(GF_SceneLoader *load)
{
load->process = load_svg_run;
load->done = load_svg_done;
load->parse_string = load_svg_parse_string;
load->suspend = load_svg_suspend;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 129,844,112,795,458,140,000,000,000,000,000,000,000 | 10 | fixed #2138 |
HCURSOR CBINDInstallDlg::OnQueryDragIcon() {
return((HCURSOR)m_hIcon);
} | 0 | [
"CWE-284"
] | bind9 | 967a3b9419a3c12b8c0870c86d1ee3840bcbbad7 | 160,182,358,437,171,060,000,000,000,000,000,000,000 | 3 | [master] quote service registry paths
4532. [security] The BIND installer on Windows used an unquoted
service path, which can enable privilege escalation.
(CVE-2017-3141) [RT #45229] |
TEST_P(JSITest, PreparedJavaScriptSourceTest) {
rt.evaluateJavaScript(std::make_unique<StringBuffer>("var q = 0;"), "");
auto prep = rt.prepareJavaScript(std::make_unique<StringBuffer>("q++;"), "");
EXPECT_EQ(rt.global().getProperty(rt, "q").getNumber(), 0);
rt.evaluatePreparedJavaScript(prep);
EXPECT_EQ(rt.g... | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 261,810,362,154,030,430,000,000,000,000,000,000,000 | 9 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
template<typename tc>
CImg<T>& draw_circle(const int x0, const int y0, int radius,
const tc *const color, const float opacity,
const unsigned int pattern) {
if (pattern!=~0U) return draw_ellipse(x0,y0,radius,radius,0,color,opacity,pattern);
if (is_em... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 88,246,814,846,948,040,000,000,000,000,000,000,000 | 30 | . |
int shmem_lock(struct file *file, int lock, struct user_struct *user)
{
return 0;
} | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 241,457,370,814,717,800,000,000,000,000,000,000,000 | 4 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
scroll_start(void)
{
if (*T_VS != NUL && *T_CVS != NUL)
{
MAY_WANT_TO_LOG_THIS;
out_str(T_VS);
out_str(T_CVS);
screen_start(); // don't know where cursor is now
}
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 172,887,244,647,583,700,000,000,000,000,000,000,000 | 10 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
int socket_create(uint16_t port)
{
int sfd = -1;
int yes = 1;
#ifdef WIN32
WSADATA wsa_data;
if (!wsa_init) {
if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) {
fprintf(stderr, "WSAStartup failed!\n");
ExitProcess(-1);
}
wsa_init = 1;
}
#endif
struct sockaddr_in saddr;
if (0 > (sfd = socke... | 1 | [
"CWE-284"
] | libimobiledevice | df1f5c4d70d0c19ad40072f5246ca457e7f9849e | 911,592,361,452,309,300,000,000,000,000,000,000 | 46 | common: [security fix] Make sure sockets only listen locally |
static inline void free_arg_pages(struct linux_binprm *bprm)
{
int i;
for (i = 0; i < MAX_ARG_PAGES; i++) {
if (bprm->page[i])
__free_page(bprm->page[i]);
bprm->page[i] = NULL;
}
} | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 111,973,301,259,186,610,000,000,000,000,000,000,000 | 10 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
inValidate(
Syntax *syntax,
struct berval *in )
{
/* no value allowed */
return LDAP_INVALID_SYNTAX;
} | 0 | [
"CWE-617"
] | openldap | 67670f4544e28fb09eb7319c39f404e1d3229e65 | 27,731,114,008,995,680,000,000,000,000,000,000,000 | 7 | ITS#9383 remove assert in certificateListValidate |
_copyDefineStmt(const DefineStmt *from)
{
DefineStmt *newnode = makeNode(DefineStmt);
COPY_SCALAR_FIELD(kind);
COPY_SCALAR_FIELD(oldstyle);
COPY_NODE_FIELD(defnames);
COPY_NODE_FIELD(args);
COPY_NODE_FIELD(definition);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 41,854,590,432,164,730,000,000,000,000,000,000,000 | 12 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void dynstr_append_checked(DYNAMIC_STRING* dest, const char* src)
{
if (dynstr_append(dest, src))
die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 173,582,452,133,006,180,000,000,000,000,000,000,000 | 5 | 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... |
gdk_pixbuf__ico_image_stop_load(gpointer data,
GError **error)
{
struct ico_progressive_state *context =
(struct ico_progressive_state *) data;
/* FIXME this thing needs to report errors if
* we have unused image data
*/
g_return_val_if_fail(context != NULL, TRUE);
context_free ... | 0 | [
"CWE-787"
] | gdk-pixbuf | 88af50a864195da1a4f7bda5f02539704fbda599 | 3,002,555,398,843,795,700,000,000,000,000,000,000 | 15 | ico: Be more careful when parsing headers
There is some redundancy between the ico directory and the
bitmap image header. If the two disagree on the icon dimensions,
just toss the image, instead of risking crashes or OOM later. Also
add some more debug spew that helped in tracking this down, and
make error messages mo... |
static void binder_transaction_buffer_release(struct binder_proc *proc,
struct binder_buffer *buffer,
binder_size_t *failed_at)
{
binder_size_t *offp, *off_start, *off_end;
int debug_id = buffer->debug_id;
binder_debug(BINDER_DEBUG_TRANSACTION,
"%d buffer release %d, size %zd-%zd, faile... | 0 | [
"CWE-362"
] | linux | 5eeb2ca02a2f6084fc57ae5c244a38baab07033a | 107,722,742,760,986,260,000,000,000,000,000,000,000 | 134 | ANDROID: binder: synchronize_rcu() when using POLLFREE.
To prevent races with ep_remove_waitqueue() removing the
waitqueue at the same time.
Reported-by: syzbot+a2a3c4909716e271487e@syzkaller.appspotmail.com
Signed-off-by: Martijn Coenen <maco@android.com>
Cc: stable <stable@vger.kernel.org> # 4.14+
Signed-off-by: Gr... |
doit (struct query *z, int state)
{
char key[257];
char misc[20], header[12];
char *buf = 0, *cached = 0;
const char *whichserver = 0;
unsigned int rcode = 0;
unsigned int posanswers = 0;
unsigned int len = 0, cachedlen = 0;
uint16 numanswers = 0;
uint16 numauthority = 0;
unsig... | 0 | [
"CWE-362"
] | ndjbdns | 847523271f3966cf4618c5689b905703c41dec1c | 73,096,909,867,660,750,000,000,000,000,000,000,000 | 1,034 | Merge identical outgoing requests.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. This fixes one of the cache poisoning vulnerability
reported by Mr Mark Johnson
-> https://bugzilla.redhat.com/show_bug.cgi?id... |
test_bson_copy (void)
{
bson_t b;
bson_t *c;
bson_init (&b);
BSON_ASSERT (bson_append_int32 (&b, "foobar", -1, 1234));
c = bson_copy (&b);
BSON_ASSERT_BSON_EQUAL (&b, c);
bson_destroy (c);
bson_destroy (&b);
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 116,321,789,140,376,870,000,000,000,000,000,000,000 | 12 | CDRIVER-2269 Check for zero string length in codewscope |
PHP_MINIT_FUNCTION(spl_observer)
{
REGISTER_SPL_INTERFACE(SplObserver);
REGISTER_SPL_INTERFACE(SplSubject);
REGISTER_SPL_STD_CLASS_EX(SplObjectStorage, spl_SplObjectStorage_new, spl_funcs_SplObjectStorage);
memcpy(&spl_handler_SplObjectStorage, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
spl_h... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 61cdd1255d5b9c8453be71aacbbf682796ac77d4 | 296,983,288,870,856,600,000,000,000,000,000,000,000 | 31 | Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key |
void CalendarRegressionTest::test4071385()
{
UErrorCode status = U_ZERO_ERROR;
Calendar *cal = Calendar::createInstance(status);
if(U_FAILURE(status)) {
dataerrln("Error creating Calendar: %s", u_errorName(status));
delete cal;
return;
}
cal->setTime(makeDate(1998, UCAL_JUNE, 24),s... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 32,307,301,571,184,070,000,000,000,000,000,000,000 | 17 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
{
u_int i;
const struct aodv_rrep6_draft_01 *ap = (const struct aodv_rrep6_draft_01 *)dat;
ND_TCHECK(*ap);
if (length < sizeof(*ap))
goto trunc;
ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
"\tdst %s dseq %lu src %s %lu ms"... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | cbddb98484ea8ec1deece351abd56e063d775b38 | 45,826,645,465,078,960,000,000,000,000,000,000,000 | 26 | CVE-2017-13002/AODV: Add some missing bounds checks.
In aodv_extension() do a bounds check on the extension header before we
look at it.
This fixes a buffer over-read discovered by Kamil Frankowicz.
Add a test using the capture file supplied by the reporter(s).
While we're at it, add the RFC number, and check the v... |
static int test_invalid_template(void)
{
const unsigned char *p = t_invalid_template;
INVALIDTEMPLATE *tmp = d2i_INVALIDTEMPLATE(NULL, &p,
sizeof(t_invalid_template));
/* We expect a NULL pointer return */
if (TEST_ptr_null(tmp))
return 1;
INV... | 0 | [
"CWE-476"
] | openssl | 22b88fc9c0e22545401c0b34d24843883ea73fec | 248,327,048,162,946,030,000,000,000,000,000,000,000 | 13 | Add a test for encoding/decoding using an invalid ASN.1 Template
If you have a CHOICE type that it must use explicit tagging - otherwise
the template is invalid. We add tests for this.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> |
static int perf_event_set_clock(struct perf_event *event, clockid_t clk_id)
{
bool nmi_safe = false;
switch (clk_id) {
case CLOCK_MONOTONIC:
event->clock = &ktime_get_mono_fast_ns;
nmi_safe = true;
break;
case CLOCK_MONOTONIC_RAW:
event->clock = &ktime_get_raw_fast_ns;
nmi_safe = true;
break;
case C... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 308,721,811,286,666,900,000,000,000,000,000,000,000 | 36 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
md_is_entity(MD_CTX* ctx, OFF beg, OFF max_end, OFF* p_end)
{
return md_is_entity_str(ctx, ctx->text, beg, max_end, p_end);
} | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 119,804,623,993,085,600,000,000,000,000,000,000,000 | 4 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
avifResult avifDecoderSetSource(avifDecoder * decoder, avifDecoderSource source)
{
decoder->requestedSource = source;
return avifDecoderReset(decoder);
} | 0 | [
"CWE-703",
"CWE-787"
] | libavif | 0a8e7244d494ae98e9756355dfbfb6697ded2ff9 | 248,833,785,985,180,950,000,000,000,000,000,000,000 | 5 | Set max image size to 16384 * 16384
Fix https://crbug.com/oss-fuzz/24728 and
https://crbug.com/oss-fuzz/24734. |
load_counted_binunicode(UnpicklerObject *self, int nbytes)
{
PyObject *str;
Py_ssize_t size;
char *s;
if (_Unpickler_Read(self, &s, nbytes) < 0)
return -1;
size = calc_binsize(s, nbytes);
if (size < 0) {
PyErr_Format(PyExc_OverflowError,
"BINUNICODE exceeds... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 320,653,254,705,997,820,000,000,000,000,000,000,000 | 27 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static void cpuacct_update_stats(struct task_struct *tsk,
enum cpuacct_stat_index idx, cputime_t val)
{
struct cpuacct *ca;
int batch = CPUACCT_BATCH;
if (unlikely(!cpuacct_subsys.active))
return;
rcu_read_lock();
ca = task_ca(tsk);
do {
__percpu_counter_add(&ca->cpustat[idx], val, batch);
ca = ca->par... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 14,871,438,229,888,060,000,000,000,000,000,000,000 | 18 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
check_topfill(
win_T *wp,
int down) // when TRUE scroll down when not enough space
{
int n;
if (wp->w_topfill > 0)
{
n = plines_win_nofill(wp, wp->w_topline, TRUE);
if (wp->w_topfill + n > wp->w_height)
{
if (down && wp->w_topline > 1)
{
--wp->w_topline;
wp->w_topfill = 0;
}... | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 108,629,706,838,915,060,000,000,000,000,000,000,000 | 25 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
TEST_P(Http2FloodMitigationTest, RST_STREAM) {
// Use invalid HTTP headers to trigger sending RST_STREAM frames.
config_helper_.addConfigModifier(
[](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager&
hcm) -> void {
hcm.mutable_http2_protocol_options(... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 177,869,710,484,618,260,000,000,000,000,000,000,000 | 30 | 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... |
GF_Err xml_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_XMLBox *ptr = (GF_XMLBox *)s;
return gf_isom_read_null_terminated_string(s, bs, s->size, &ptr->xml);
} | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 100,463,319,012,021,570,000,000,000,000,000,000,000 | 5 | fixed #1786 (fuzz) |
static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
if (sk_rcvqueues_full(sk, skb))
return -ENOBUFS;
__sk_add_backlog(sk, skb);
sk->sk_backlog.len += skb->truesize;
return 0;
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 324,977,283,226,684,470,000,000,000,000,000,000,000 | 9 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
find_help_tags(
char_u *arg,
int *num_matches,
char_u ***matches,
int keep_lang)
{
char_u *s, *d;
int i;
// Specific tags that either have a specific replacement or won't go
// through the generic rules.
static char *(except_tbl[][2]) = {
{"*", "star"},
{"g*", "gstar"},
{"[*"... | 1 | [
"CWE-122",
"CWE-787"
] | vim | bd228fd097b41a798f90944b5d1245eddd484142 | 206,239,926,352,612,340,000,000,000,000,000,000,000 | 258 | patch 8.2.3669: buffer overflow with long help argument
Problem: Buffer overflow with long help argument.
Solution: Use snprintf(). |
void CLASS kodak_radc_load_raw()
{
static const char src[] = {
1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,
1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,
2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,
2,0, 2,1, 2,3, 3,2, 4,4, 5,6, 6,7, 7,5, 7,8,
2,1, 2,4, 3,0, 3,2, 3,3, 4,7, 5,5, 6,6, 6,8,
2,3, 3,1, 3... | 0 | [] | LibRaw | 9ae25d8c3a6bfb40c582538193264f74c9b93bc0 | 159,497,467,789,836,530,000,000,000,000,000,000,000 | 99 | backported 0.15.4 datachecks |
void ssl3_clear(SSL *s)
{
unsigned char *rp,*wp;
size_t rlen, wlen;
#ifdef TLSEXT_TYPE_opaque_prf_input
if (s->s3->client_opaque_prf_input != NULL)
OPENSSL_free(s->s3->client_opaque_prf_input);
s->s3->client_opaque_prf_input = NULL;
if (s->s3->server_opaque_prf_input != NULL)
OPENSSL_free(s->s3->server_opaqu... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 88,000,316,815,532,480,000,000,000,000,000,000,000 | 67 | Add Next Protocol Negotiation. |
static s32 SVC_ReadNal_header_extension(GF_BitStream *bs, SVC_NALUHeader *NalHeader)
{
gf_bs_read_int_log(bs, 1, "reserved_one_bit");
NalHeader->idr_pic_flag = gf_bs_read_int_log(bs, 1, "idr_flag");
NalHeader->priority_id = gf_bs_read_int_log(bs, 6, "priority_id");
gf_bs_read_int_log(bs, 1, "no_inter_layer_pred_fla... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 295,619,186,094,668,350,000,000,000,000,000,000,000 | 15 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
trunc_string(
char_u *s,
char_u *buf,
int room_in,
int buflen)
{
size_t room = room_in - 3; // "..." takes 3 chars
size_t half;
size_t len = 0;
int e;
int i;
int n;
if (*s == NUL)
{
if (buflen > 0)
*buf = NUL;
return;
}
if (room_in < 3)
room = 0;
... | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 4,788,569,192,332,829,300,000,000,000,000,000,000 | 116 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
int move_y(DviContext *dvi, int opcode)
{
int v, vv;
if(opcode != DVI_Y0)
dvi->pos.y = dsgetn(dvi, opcode - DVI_Y0);
v = dvi->pos.v;
vv = move_vertical(dvi, dvi->pos.y);
SHOWCMD((dvi, "y", opcode - DVI_Y0,
"%d h:=%d%c%d=%d, hh:=%d\n",
dvi->pos.y, DBGSUM(v, dvi->pos.y, dvi->pos.v), vv));
dvi->pos.vv = vv;... | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 205,545,961,604,304,030,000,000,000,000,000,000,000 | 14 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
QPDFWriter::calculateXrefStreamPadding(int xref_bytes)
{
// This routine is called right after a linearization first pass
// xref stream has been written without compression. Calculate
// the amount of padding that would be required in the worst case,
// assuming the number of uncompressed bytes remain... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 147,483,079,657,515,570,000,000,000,000,000,000,000 | 12 | 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 signed char cut(const double val) {
return val<(double)min()?min():val>(double)max()?max():(signed char)val; } | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 157,274,835,906,382,670,000,000,000,000,000,000,000 | 2 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; } | 0 | [
"CWE-703",
"CWE-189"
] | linux | fc9bbca8f650e5f738af8806317c0a041a48ae4a | 150,312,894,149,578,270,000,000,000,000,000,000,000 | 1 | vm: convert fb_mmap to vm_iomap_memory() helper
This is my example conversion of a few existing mmap users. The
fb_mmap() case is a good example because it is a bit more complicated
than some: fb_mmap() mmaps one of two different memory areas depending
on the page offset of the mmap (but happily there is never any mi... |
int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
int f1, f2;
int combined_flags;
f1 = pMem1->flags;
f2 = pMem2->flags;
combined_flags = f1|f2;
assert( !sqlite3VdbeMemIsRowSet(pMem1) && !sqlite3VdbeMemIsRowSet(pMem2) );
/* If one value is NULL, it is less than the other. ... | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 50,454,202,702,686,460,000,000,000,000,000,000,000 | 90 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
void ElectronApiIPCHandlerImpl::Invoke(bool internal,
const std::string& channel,
blink::CloneableMessage arguments,
InvokeCallback callback) {
api::WebContents* api_web_contents = api::WebContents::Fr... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 190,836,731,042,876,230,000,000,000,000,000,000,000 | 10 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static void ql_petbi_reset_ex(struct ql3_adapter *qdev)
{
ql_mii_write_reg_ex(qdev, PETBI_CONTROL_REG, PETBI_CTRL_SOFT_RESET,
PHYAddr[qdev->mac_index]);
} | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 295,931,946,721,869,540,000,000,000,000,000,000,000 | 5 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
static coroutine_fn int nbd_negotiate(NBDClient *client, Error **errp)
{
char buf[8 + 8 + 8 + 128];
int ret;
const uint16_t myflags = (NBD_FLAG_HAS_FLAGS | NBD_FLAG_SEND_TRIM |
NBD_FLAG_SEND_FLUSH | NBD_FLAG_SEND_FUA |
NBD_FLAG_SEND_WRITE_ZEROES);
... | 1 | [] | qemu | f37708f6b8e0bef0dd85c6aad7fc2062071f8227 | 22,362,860,261,008,885,000,000,000,000,000,000,000 | 63 | nbd: Implement NBD_OPT_GO on server
NBD_OPT_EXPORT_NAME is lousy: per the NBD protocol, any failure
requires us to close the connection rather than report an error.
Therefore, upstream NBD recently added NBD_OPT_GO as the improved
version of the option that does what we want [1], along with
NBD_OPT_INFO that returns t... |
virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml,
unsigned int flags)
{
VIR_DEBUG("conn=%p, from=%s, dxml=%s, flags=%x",
conn, NULLSTR(from), NULLSTR(dxml), flags);
virResetLastError();
virCheckConnectReturn(conn, -1);
virCheckReadOnlyGot... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 200,622,014,522,411,700,000,000,000,000,000,000,000 | 43 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static int tun_chr_fasync(int fd, struct file *file, int on)
{
struct tun_file *tfile = file->private_data;
int ret;
if ((ret = fasync_helper(fd, file, on, &tfile->fasync)) < 0)
goto out;
if (on) {
__f_setown(file, task_pid(current), PIDTYPE_PID, 0);
tfile->flags |= TUN_FASYNC;
} else
tfile->flags &= ~TU... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 322,746,226,457,985,800,000,000,000,000,000,000,000 | 17 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
forward_callback(isc_task_t *task, isc_event_t *event) {
const char me[] = "forward_callback";
dns_requestevent_t *revent = (dns_requestevent_t *)event;
dns_message_t *msg = NULL;
char master[ISC_SOCKADDR_FORMATSIZE];
isc_result_t result;
dns_forward_t *forward;
dns_zone_t *zone;
UNUSED(task);
forward = reve... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 45,883,741,603,305,090,000,000,000,000,000,000,000 | 106 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
inline void getrf(int &N, float *lapA, int *IPIV, int &INFO) {
sgetrf_(&N,&N,lapA,&N,IPIV,&INFO); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 148,012,534,932,729,350,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void *nfs_volume_list_next(struct seq_file *p, void *v, loff_t *pos)
{
return seq_list_next(v, &nfs_volume_list, pos);
} | 0 | [
"CWE-20"
] | linux-2.6 | 54af3bb543c071769141387a42deaaab5074da55 | 186,643,566,939,542,830,000,000,000,000,000,000,000 | 4 | NFS: Fix an Oops in encode_lookup()
It doesn't look as if the NFS file name limit is being initialised correctly
in the struct nfs_server. Make sure that we limit whatever is being set in
nfs_probe_fsinfo() and nfs_init_server().
Also ensure that readdirplus and nfs4_path_walk respect our file name
limits.
Signed-of... |
generate_a_aaaa_check(struct module_qstate* qstate, struct iter_qstate* iq,
int id)
{
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
struct module_qstate* subq;
size_t i;
struct reply_info* rep = iq->response->rep;
struct ub_packed_rrset_key* s;
log_assert(iq->dp);
if(iq->depth == ie->max_d... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 311,481,591,450,962,100,000,000,000,000,000,000,000 | 45 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
CImg<T>& load_pdf_external(const char *const filename, const unsigned int resolution=400) {
if (!filename)
throw CImgArgumentException(_cimg_instance
"load_pdf_external(): Specified filename is (null).",
cimg_instance);
CImg... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 37,322,987,410,487,743,000,000,000,000,000,000,000 | 46 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int fib6_new_sernum(struct net *net)
{
int new, old;
do {
old = atomic_read(&net->ipv6.fib6_sernum);
new = old < INT_MAX ? old + 1 : 1;
} while (atomic_cmpxchg(&net->ipv6.fib6_sernum,
old, new) != old);
return new;
} | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 118,589,271,333,220,300,000,000,000,000,000,000,000 | 11 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
ip_rbTkWaitCommand(clientData, interp, objc, objv)
ClientData clientData;
Tcl_Interp *interp;
int objc;
char *objv[];
#endif
{
Tk_Window tkwin = (Tk_Window) clientData;
Tk_Window window;
int done, index;
static CONST char *optionStrings[] = { "variable", "visibility", "window",
... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 70,013,302,892,625,240,000,000,000,000,000,000,000 | 358 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
void set(DTCollation &dt)
{
collation= dt.collation;
derivation= dt.derivation;
repertoire= dt.repertoire;
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 263,050,188,522,964,700,000,000,000,000,000,000,000 | 6 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
_archive_read (struct archive *archive,
void *data,
const void **buffer)
{
ZipArchive *zip = (ZipArchive *)data;
gssize read_bytes;
*buffer = zip->buffer;
read_bytes = g_input_stream_read (G_INPUT_STREAM (zip->stream),
zip->buffer,
sizeof (zip->buffer),
NULL,
... | 0 | [
"CWE-125"
] | libgxps | b458226e162fe1ffe7acb4230c114a52ada5131b | 149,993,062,557,401,080,000,000,000,000,000,000,000 | 15 | gxps-archive: Ensure gxps_archive_read_entry() fills the GError in case of failure
And fix the callers to not overwrite the GError. |
static int usb_host_handle_control(USBHostDevice *s, USBPacket *p)
{
struct usbdevfs_urb *urb;
AsyncURB *aurb;
int ret, value, index;
/*
* Process certain standard device requests.
* These are infrequent and are processed synchronously.
*/
value = le16_to_cpu(s->ctrl.req.wValue);
... | 1 | [
"CWE-119"
] | qemu | babd03fde68093482528010a5435c14ce9128e3f | 312,416,163,750,000,940,000,000,000,000,000,000,000 | 73 | usb-linux.c: fix buffer overflow
In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and
length to the kernel. However, the length was provided by the caller
of dev->handle_packet, and is not checked, so the kernel might provide
too much data and overflow our buffer.
For example, hw/usb-uhci.c could s... |
TEST_F(QueryPlannerTest, NegationEqArray) {
addIndex(BSON("i" << 1));
runQuery(fromjson("{i: {$not: {$eq: [1, 2]}}}"));
assertHasOnlyCollscan();
} | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 176,044,595,574,816,800,000,000,000,000,000,000,000 | 6 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
lys_parse_mem_(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, const char *revision, int internal, int implement)
{
char *enlarged_data = NULL;
struct lys_module *mod = NULL;
unsigned int len;
if (!ctx || !data) {
LOGARG;
return NULL;
}
if (!internal && format == LYS... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 278,199,465,421,652,860,000,000,000,000,000,000,000 | 49 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static int rtreeQueryStat1(sqlite3 *db, Rtree *pRtree){
const char *zFmt = "SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'";
char *zSql;
sqlite3_stmt *p;
int rc;
i64 nRow = 0;
rc = sqlite3_table_column_metadata(
db, pRtree->zDb, "sqlite_stat1",0,0,0,0,0,0
);
if( rc!=SQLITE_OK ){
pRtr... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 329,911,000,246,831,800,000,000,000,000,000,000,000 | 38 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
static bool tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *next_skb = skb_rb_next(skb);
int skb_size, next_skb_size;
skb_size = skb->len;
next_skb_size = next_skb->len;
BUG_ON(tcp_skb_pcount(skb) != 1 || tcp_skb_pcount(next_skb) != 1);
if (next_s... | 0 | [
"CWE-416"
] | linux | 7f582b248d0a86bae5788c548d7bb5bca6f7691a | 250,642,223,092,554,150,000,000,000,000,000,000,000 | 44 | tcp: purge write queue in tcp_connect_init()
syzkaller found a reliable way to crash the host, hitting a BUG()
in __tcp_retransmit_skb()
Malicous MSG_FASTOPEN is the root cause. We need to purge write queue
in tcp_connect_init() at the point we init snd_una/write_seq.
This patch also replaces the BUG() by a less int... |
apply_autocmds_group(
event_T event,
char_u *fname, /* NULL or empty means use actual file name */
char_u *fname_io, /* fname to use for <afile> on cmdline, NULL means
use fname */
int force, /* when TRUE, ignore autocmd_busy */
int group, /* group ID, or AUGROUP_ALL */
... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 131,882,964,562,116,880,000,000,000,000,000,000,000 | 394 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
STATIC regnode_offset
S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_size, const char* const name)
{
/* Allocate a regnode for 'op', with 'extra_size' extra space. It aligns
* and increments RExC_size and RExC_emit
*
* It returns the regnode's offset into the regex e... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 283,954,622,368,218,600,000,000,000,000,000,000,000 | 37 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
xfs_attr_shortform_list(xfs_attr_list_context_t *context)
{
attrlist_cursor_kern_t *cursor;
xfs_attr_sf_sort_t *sbuf, *sbp;
xfs_attr_shortform_t *sf;
xfs_attr_sf_entry_t *sfe;
xfs_inode_t *dp;
int sbsize, nsbuf, count, i;
int error;
ASSERT(context != NULL);
dp = context->dp;
ASSERT(dp != NULL);
ASSERT(dp->i... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 2e83b79b2d6c78bf1b4aa227938a214dcbddc83f | 304,119,451,401,702,100,000,000,000,000,000,000,000 | 148 | xfs: fix two memory leaks in xfs_attr_list.c error paths
This plugs 2 trivial leaks in xfs_attr_shortform_list and
xfs_attr3_leaf_list_int.
Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com> |
explicit HeartbeatSession(int p) : peer(p) {} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 165,756,387,741,792,260,000,000,000,000,000,000,000 | 1 | 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 ... |
ins_compl_del_pum(void)
{
if (compl_match_array == NULL)
return;
pum_undisplay();
VIM_CLEAR(compl_match_array);
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 73,312,351,910,750,230,000,000,000,000,000,000,000 | 8 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
port_name_needs_quotes(const char *port_name)
{
if (!isalpha((unsigned char) port_name[0])) {
return true;
}
for (const char *p = port_name + 1; *p; p++) {
if (!isalnum((unsigned char) *p)) {
return true;
}
}
return false;
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 264,729,311,680,850,440,000,000,000,000,000,000,000 | 13 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
AllowedOnSecondary secondaryAllowed(ServiceContext*) const override {
return AllowedOnSecondary::kNever;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 62,111,641,490,205,990,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
void setFilterChainName(absl::string_view filter_chain_name) override {
filter_chain_name_ = std::string(filter_chain_name);
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 81,327,496,823,727,740,000,000,000,000,000,000,000 | 3 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
int netns_identify_pid(const char *pidstr, char *name, int len)
{
char net_path[PATH_MAX];
int netns;
struct stat netst;
DIR *dir;
struct dirent *entry;
name[0] = '\0';
snprintf(net_path, sizeof(net_path), "/proc/%s/ns/net", pidstr);
netns = open(net_path, O_RDONLY);
if (netns < 0) {
fprintf(stderr, "Canno... | 0 | [
"CWE-416"
] | iproute2 | 9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10 | 21,609,782,636,877,407,000,000,000,000,000,000,000 | 57 | ipnetns: use-after-free problem in get_netnsid_from_name func
Follow the following steps:
# ip netns add net1
# export MALLOC_MMAP_THRESHOLD_=0
# ip netns list
then Segmentation fault (core dumped) will occur.
In get_netnsid_from_name func, answer is freed before
rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers... |
PHP_MINIT_FUNCTION(xml)
{
le_xml_parser = zend_register_list_destructors_ex(xml_parser_dtor, NULL, "xml", module_number);
REGISTER_LONG_CONSTANT("XML_ERROR_NONE", XML_ERROR_NONE, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XML_ERROR_NO_MEMORY", XML_ERROR_NO_MEMORY, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG... | 1 | [
"CWE-119"
] | php-src | 1248079be837808da4c97364fb3b4c96c8015fbf | 132,570,834,273,027,740,000,000,000,000,000,000,000 | 47 | Fix bug #72099: xml_parse_into_struct segmentation fault |
SecureRandomDataProvider::~SecureRandomDataProvider()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 32,266,484,743,026,854,000,000,000,000,000,000,000 | 3 | 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 ... |
void clear_binlog_table_maps() {
binlog_table_maps= 0;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 307,088,764,706,398,670,000,000,000,000,000,000,000 | 3 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
int main(int argc, char *argv[]) {
struct mschm_decompressor *chmd;
struct mschmd_header *chm;
struct mschmd_file *file, **f;
unsigned int numf, i;
setbuf(stdout, NULL);
setbuf(stderr, NULL);
user_umask = umask(0); umask(user_umask);
MSPACK_SYS_SELFTEST(i);
if (i) return 0;
if ((chmd = mspack_cre... | 0 | [
"CWE-22"
] | libmspack | 7cadd489698be117c47efcadd742651594429e6d | 131,554,311,186,808,100,000,000,000,000,000,000,000 | 46 | add anti "../" and leading slash protection to chmextract |
EIGEN_STRONG_INLINE bool operator==(const QUInt16 a, const QUInt16 b) {
return a.value == b.value;
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 76,097,394,122,719,090,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
virtual GBool useDrawForm() { return gFalse; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 198,916,050,141,505,380,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static inline int skipthis(struct SISTREAM *s) {
return skip(s, ALIGN4(s->fsize[s->level]));
} | 0 | [
"CWE-189"
] | clamav-devel | c6870a6c857dd722dffaf6d37ae52ec259d12492 | 188,280,382,783,459,000,000,000,000,000,000,000,000 | 3 | bb #6808 |
static size_t push_pipe(struct iov_iter *i, size_t size,
int *idxp, size_t *offp)
{
struct pipe_inode_info *pipe = i->pipe;
size_t off;
int idx;
ssize_t left;
if (unlikely(size > i->count))
size = i->count;
if (unlikely(!size))
return 0;
left = size;
data_start(i, &idx, &off);
*idxp = idx;
*offp = of... | 0 | [
"CWE-200"
] | linux | b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb | 339,488,904,149,965,430,000,000,000,000,000,000,000 | 44 | fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up ... |
static const char *wsgi_add_import_script(cmd_parms *cmd, void *mconfig,
const char *args)
{
WSGIScriptFile *object = NULL;
const char *option = NULL;
const char *value = NULL;
if (!wsgi_import_list) {
wsgi_import_list = apr_array_make(cmd->pool, 20,
... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 83,096,530,187,157,170,000,000,000,000,000,000,000 | 94 | 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 net_configure_sandbox_ip(Bridge *br) {
assert(br);
if (br->configured == 0)
return;
if (br->arg_ip_none)
br->ipsandbox = 0;
else if (br->ipsandbox) {
// check network range
char *rv = in_netrange(br->ipsandbox, br->ip, br->mask);
if (rv) {
fprintf(stderr, "%s\n", rv);
exit(1);
}
// send an... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 293,041,628,548,668,340,000,000,000,000,000,000,000 | 24 | fixing CVE-2022-31214 |
static vpx_codec_err_t ctrl_set_row_mt(vpx_codec_alg_priv_t *ctx,
va_list args) {
ctx->row_mt = va_arg(args, int);
return VPX_CODEC_OK;
} | 0 | [
"CWE-125"
] | libvpx | 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 | 149,239,433,667,042,100,000,000,000,000,000,000,000 | 6 | vp9: fix OOB read in decoder_peek_si_internal
Profile 1 or 3 bitstreams may require 11 bytes for the header in the
intra-only case.
Additionally add a check on the bit reader's error handler callback to
ensure it's non-NULL before calling to avoid future regressions.
This has existed since at least (pre-1.4.0):
09bf... |
e_named_parameters_unref (ENamedParameters *params)
{
g_ptr_array_unref ((GPtrArray *) params);
} | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 282,592,086,213,745,800,000,000,000,000,000,000,000 | 4 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
void fatal(const char* s, int code)
{
static int recurse_code = 0;
if (recurse_code) {
/* We were called recursively. Just give up */
proc_cleanup();
exit(recurse_code);
}
recurse_code = code;
if (nntp_out) {
prot_printf(nntp_out, "400 Fatal error: %s\r\n", s);
prot_flush(nntp_out);
}
... | 0 | [
"CWE-119"
] | cyrus-imapd | 0f8f026699829b65733c3081657b24e2174f4f4d | 290,624,578,265,429,360,000,000,000,000,000,000,000 | 18 | CVE-2011-3208 - fix buffer overflow in nntpd |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.