func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRML... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 164,913,136,982,196,660,000,000,000,000,000,000,000 | 12 | - 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 |
reflection_methodbuilder_from_method_builder (ReflectionMethodBuilder *rmb, MonoReflectionMethodBuilder *mb)
{
memset (rmb, 0, sizeof (ReflectionMethodBuilder));
rmb->ilgen = mb->ilgen;
rmb->rtype = mono_reflection_type_resolve_user_types ((MonoReflectionType*)mb->rtype);
rmb->parameters = mb->parameters;
rmb->ge... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 109,949,627,949,925,720,000,000,000,000,000,000,000 | 37 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
int BlackPreservingSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
{
int i;
cmsFloat32Number Inf[4], Outf[4];
cmsFloat32Number LabK[4];
cmsFloat64Number SumCMY, SumCMYK, Error, Ratio;
cmsCIELab ColorimetricLab, BlackPreservingLab;
PreserveKPlane... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 243,445,666,386,402,040,000,000,000,000,000,000,000 | 82 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
s32 vvc_parse_picture_header(GF_BitStream *bs, VVCState *vvc, VVCSliceInfo *si)
{
u32 pps_id;
si->irap_or_gdr_pic = gf_bs_read_int_log(bs, 1, "irap_or_gdr_pic");
si->non_ref_pic = gf_bs_read_int_log(bs, 1, "non_ref_pic");
if (si->irap_or_gdr_pic)
si->gdr_pic = gf_bs_read_int_log(bs, 1, "gdr_pic");
if ((si->inte... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 212,492,591,979,064,320,000,000,000,000,000,000,000 | 34 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
av_cold int ff_h264_decode_init(AVCodecContext *avctx)
{
H264Context *h = avctx->priv_data;
int i;
int ret;
h->avctx = avctx;
h->bit_depth_luma = 8;
h->chroma_format_idc = 1;
h->avctx->bits_per_raw_sample = 8;
h->cur_chroma_format_idc = 1;
ff_h264dsp_init(&h->h264dsp, 8, 1);
... | 0 | [
"CWE-703"
] | FFmpeg | 29ffeef5e73b8f41ff3a3f2242d356759c66f91f | 82,897,459,780,937,910,000,000,000,000,000,000,000 | 89 | avcodec/h264: do not trust last_pic_droppable when marking pictures as done
This simplifies the code and fixes a deadlock
Fixes Ticket2927
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
{
HashTable *props;
zval *zv;
php_interval_obj *intervalobj;
intervalobj = (php_interval_obj *) zend_object_store_get_object(object TSRMLS_CC);
props = zend_std_get_properties(object TSRMLS_CC);
if (!intervalobj->initialized) {
... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 124,171,659,797,776,270,000,000,000,000,000,000,000 | 43 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
void bdrv_iterate(void (*it)(void *opaque, BlockDriverState *bs), void *opaque)
{
BlockDriverState *bs;
QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
it(opaque, bs);
}
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 85,487,548,677,737,590,000,000,000,000,000,000,000 | 8 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
char * r_jwe_get_full_unprotected_header_str(jwe_t * jwe) {
char * to_return = NULL;
if (jwe != NULL) {
to_return = json_dumps(jwe->j_unprotected_header, JSON_COMPACT);
}
return to_return;
} | 0 | [
"CWE-787"
] | rhonabwy | b4c2923a1ba4fabf9b55a89244127e153a3e549b | 131,501,328,857,347,540,000,000,000,000,000,000,000 | 7 | Fix buffer overflow on r_jwe_aesgcm_key_unwrap |
libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener)
{
int rc;
if(!listener)
return LIBSSH2_ERROR_BAD_USE;
BLOCK_ADJUST(rc, listener->session,
_libssh2_channel_forward_cancel(listener));
return rc;
} | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 304,761,484,639,728,530,000,000,000,000,000,000,000 | 11 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
static void krb5_save_ccname_done(struct tevent_req *req)
{
struct krb5_auth_state *state = tevent_req_data(req, struct krb5_auth_state);
struct krb5child_req *kr = state->kr;
struct pam_data *pd = state->pd;
int ret;
char *password = NULL;
if (kr->is_offline) {
if (dp_opt_get_bool(kr->... | 1 | [
"CWE-287"
] | sssd | fffdae81651b460f3d2c119c56d5caa09b4de42a | 293,438,735,683,713,700,000,000,000,000,000,000,000 | 77 | Fix bad password caching when using automatic TGT renewal
Fixes CVE-2011-1758, https://fedorahosted.org/sssd/ticket/856 |
vg_send_msg(VuGpu *vg, const VhostUserGpuMsg *msg, int fd)
{
if (vg_sock_fd_write(vg->sock_fd, msg,
VHOST_USER_GPU_HDR_SIZE + msg->size, fd) < 0) {
vg_sock_fd_close(vg);
}
} | 0 | [] | qemu | 86dd8fac2acc366930a5dc08d3fb1b1e816f4e1e | 33,019,676,979,710,997,000,000,000,000,000,000,000 | 7 | vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' (CVE-2021-3544)
Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
Fixes: CVE-2021-3544
Reported-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Marc-And... |
static struct nl_mmap_hdr *netlink_mmap_hdr(struct sk_buff *skb)
{
return (struct nl_mmap_hdr *)(skb->head - NL_MMAP_HDRLEN);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 292,171,837,461,570,960,000,000,000,000,000,000,000 | 4 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void object_err(struct kmem_cache *s, struct page *page,
u8 *object, char *reason)
{
slab_bug(s, "%s", reason);
print_trailer(s, page, object);
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 109,499,223,945,684,470,000,000,000,000,000,000,000 | 6 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
R_API bool r_cmd_parsed_args_setcmd(RCmdParsedArgs *a, const char *cmd) {
r_return_val_if_fail (a && a->argv && a->argv[0], false);
char *tmp = strdup (cmd);
if (!tmp) {
return false;
}
free (a->argv[0]);
a->argv[0] = tmp;
return true;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 202,820,954,588,494,840,000,000,000,000,000,000,000 | 10 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
static void snd_rawmidi_free_substreams(struct snd_rawmidi_str *stream)
{
struct snd_rawmidi_substream *substream;
while (!list_empty(&stream->substreams)) {
substream = list_entry(stream->substreams.next, struct snd_rawmidi_substream, list);
list_del(&substream->list);
kfree(substream);
}
} | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 158,586,739,436,383,630,000,000,000,000,000,000,000 | 10 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... |
load_env_file (GdmSessionWorker *worker,
GFile *file)
{
gchar *contents;
gchar **lines;
gchar *line, *p;
gchar *var, *var_end;
gchar *expanded;
char *filename;
int i;
filename = g_file_get_path (file);
g_debug ("Loading env vars f... | 0 | [
"CWE-362"
] | gdm | dcdbaaa04012541ad2813cf83559d91d52f208b9 | 120,550,573,806,597,540,000,000,000,000,000,000,000 | 48 | session-worker: Don't switch back VTs until session is fully exited
There's a race condition on shutdown where the session worker is
switching VTs back to the initial VT at the same time as the session
exit is being processed.
This means that manager may try to start a login screen (because of
the VT switch) when aut... |
pdf14_push_parent_color(gx_device *dev, const gs_gstate *pgs)
{
pdf14_device *pdev = (pdf14_device *)dev;
pdf14_parent_color_t *new_parent_color;
cmm_profile_t *icc_profile;
gsicc_rendering_param_t render_cond;
cmm_dev_profile_t *dev_profile;
dev_proc(dev, get_profile)(dev, &dev_profile);
... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 9,405,110,696,703,692,000,000,000,000,000,000,000 | 46 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
static int sha256_password_authenticate(MYSQL_PLUGIN_VIO *vio,
MYSQL_SERVER_AUTH_INFO *info)
{
uchar *pkt;
int pkt_len;
char *user_salt_begin;
char *user_salt_end;
char scramble[SCRAMBLE_LENGTH + 1];
char stage2[CRYPT_MAX_PASSWORD_SIZE + 1];
String scramble_respon... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 226,771,996,416,453,200,000,000,000,000,000,000,000 | 168 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
fuzzy_match_recursive(
char_u *fuzpat,
char_u *str,
int_u strIdx,
int *outScore,
char_u *strBegin,
int strLen,
int_u *srcMatches,
int_u *matches,
int maxMatches,
int nextMatch,
int *recursionCount)
{
// Recursion params
int recursiveMatch = FALSE;
int_u bestRecursiveMatches[MAX_FUZZY_... | 0 | [
"CWE-416"
] | vim | 409510c588b1eec1ae33511ae97a21eb8e110895 | 233,597,532,882,810,660,000,000,000,000,000,000,000 | 113 | patch 8.2.5050: using freed memory when searching for pattern in path
Problem: Using freed memory when searching for pattern in path.
Solution: Make a copy of the line. |
static void tcp_rcv_nxt_update(struct tcp_sock *tp, u32 seq)
{
u32 delta = seq - tp->rcv_nxt;
sock_owned_by_me((struct sock *)tp);
tp->bytes_received += delta;
tp->rcv_nxt = seq;
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 161,011,286,822,954,030,000,000,000,000,000,000,000 | 8 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
int security_file_lock(struct file *file, unsigned int cmd)
{
return security_ops->file_lock(file, cmd);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 210,062,985,854,869,500,000,000,000,000,000,000,000 | 4 | 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... |
apdu_open_remote_reader (const char *portstr,
const unsigned char *cookie, size_t length,
int (*readfnc) (void *opaque,
void *buffer, size_t size),
void *readfnc_value,
int (*writ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 53,649,792,772,978,950,000,000,000,000,000,000,000 | 35 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
HandleExecSelectable(Widget w,
XEvent *event,
String *params, /* selections */
Cardinal *num_params)
{
XtermWidget xw;
if ((xw = getXtermWidget(w)) != 0) {
TRACE_EVENT("HandleExecSelectable", event, params, num_params);
if (*num_params == 2) {
CELL start, finish;
char *data;
... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 49,793,628,900,703,000,000,000,000,000,000,000,000 | 33 | snapshot of project "xterm", label xterm-365d |
static int rtl8xxxu_set_mac(struct rtl8xxxu_priv *priv)
{
int i;
u16 reg;
reg = REG_MACID;
for (i = 0; i < ETH_ALEN; i++)
rtl8xxxu_write8(priv, reg + i, priv->mac_addr[i]);
return 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 99,122,630,968,408,150,000,000,000,000,000,000,000 | 12 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
void CWebSock::PrintErrorPage(const CString& sMessage) {
m_Template.SetFile("Error.tmpl");
m_Template["Action"] = "error";
m_Template["Title"] = "Error";
m_Template["Error"] = sMessage;
} | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 144,122,483,179,530,140,000,000,000,000,000,000,000 | 7 | Don't let web skin name ../../../../ access files outside of usual skins directories.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
if (out == NULL) return NULL;
if (!_gdImagePngCtxEx (im, out, level)) {
rv = gdDPExtractData (out, size);
} else {
rv = NULL;
}
out->gd_free (out);
return rv;
} | 0 | [
"CWE-415"
] | libgd | 56ce6ef068b954ad28379e83cca04feefc51320c | 220,030,009,588,353,140,000,000,000,000,000,000,000 | 13 | Fix #381: libgd double-free vulnerability
The issue is that `gdImagePngCtxEx` (which is called by `gdImagePngPtr`
and the other PNG output functions to do the real work) does not return
whether it succeeded or failed, so this is not checked in
`gdImagePngPtr` and the function wrongly assumes everything is okay,
which ... |
static int spk_ttyio_initialise_ldisc(struct spk_synth *synth)
{
int ret = 0;
struct tty_struct *tty;
struct ktermios tmp_termios;
dev_t dev;
ret = get_dev_to_use(synth, &dev);
if (ret)
return ret;
tty = tty_kopen(dev);
if (IS_ERR(tty))
return PTR_ERR(tty);
if (tty->ops->open)
ret = tty->ops->open(tty... | 0 | [
"CWE-476"
] | char-misc | f0992098cadb4c9c6a00703b66cafe604e178fea | 326,267,642,989,950,630,000,000,000,000,000,000,000 | 65 | speakup: Reject setting the speakup line discipline outside of speakup
Speakup exposing a line discipline allows userland to try to use it,
while it is deemed to be useless, and thus uselessly exposes potential
bugs. One of them is simply that in such a case if the line sends data,
spk_ttyio_receive_buf2 is called and... |
translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
const struct ip6t_replace *repl)
{
struct xt_percpu_counter_alloc_state alloc_state = { 0 };
struct ip6t_entry *iter;
unsigned int *offsets;
unsigned int i;
int ret = 0;
newinfo->size = repl->size;
newinfo->number = repl->num_entrie... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 190,884,312,507,998,400,000,000,000,000,000,000,000 | 84 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
HttpIntegrationTest::makeHttpConnection(Network::ClientConnectionPtr&& conn) {
auto codec = makeRawHttpConnection(std::move(conn));
EXPECT_TRUE(codec->connected());
return codec;
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 78,700,878,134,848,490,000,000,000,000,000,000,000 | 5 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
poppler_document_new_from_data (char *data,
int length,
const char *password,
GError **error)
{
PDFDoc *newDoc;
MemStream *str;
GooString *password_g;
if (!globalParams) {
globalParams = new... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 115,199,469,856,881,760,000,000,000,000,000,000,000 | 22 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
njs_generate_for_resolve_closure(njs_vm_t *vm, njs_parser_node_t *node)
{
return njs_parser_traverse(vm, node, NULL,
njs_generate_for_resolve_closure_cb);
} | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 97,104,762,430,707,350,000,000,000,000,000,000,000 | 5 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj TSRMLS_DC) /* {{{ */
{
int hash_len, ret = FAILURE;
char *hash = spl_object_storage_get_hash(intern, this, obj, &hash_len TSRMLS_CC);
if (!hash) {
return ret;
}
ret = zend_hash_del(&intern->storage, hash, hash_len);
spl_object_sto... | 1 | [
"CWE-416"
] | php-src | c2e197e4efc663ca55f393bf0e799848842286f3 | 109,394,556,376,378,990,000,000,000,000,000,000,000 | 12 | Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage |
static void TIFFSetProfiles(TIFF *tiff,Image *image)
{
const char
*name;
const StringInfo
*profile;
if (image->profiles == (void *) NULL)
return;
ResetImageProfileIterator(image);
for (name=GetNextImageProfile(image); name != (const char *) NULL; )
{
profile=GetImageProfile(image,name);
... | 0 | [
"CWE-787"
] | ImageMagick6 | 1aea203eb36409ce6903b9e41fe7cb70030e8750 | 162,487,855,737,064,950,000,000,000,000,000,000,000 | 74 | squash heap-buffer-overflow, PoC TIFF from Hardik |
bgp_attr_origin (struct peer *peer, bgp_size_t length,
struct attr *attr, u_char flag, u_char *startp)
{
bgp_size_t total;
/* total is entire attribute length include Attribute Flags (1),
Attribute Type code (1) and Attribute length (1 or 2). */
total = length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN)... | 1 | [] | quagga | 835315bfb49bff2b2fb354f2075c6d6693c2a151 | 290,763,087,320,675,440,000,000,000,000,000,000,000 | 54 | bgpd: Move up flag-check calls, parcel up attr-parser args, and other cleanups
* bgp_attr.h: (struct bgp_attr_parser_args) Attribute parsing context,
containing common arguments.
* bgp_attr.c: (general) Move the bgp_attr_flag_invalid flag-check calls up,
out of each individual attr parser function, to be done once... |
stonith_get_hostlist(Stonith* s)
{
StonithPlugin* sp = (StonithPlugin*)s;
if (sp && sp->s_ops && sp->isconfigured) {
return sp->s_ops->get_hostlist(sp);
}
return NULL;
} | 0 | [
"CWE-287"
] | cluster-glue | 3d7b464439ee0271da76e0ee9480f3dc14005879 | 256,848,505,209,119,780,000,000,000,000,000,000,000 | 8 | Medium: stonith: add -E option to get the configuration from the environment |
ThrowErrorData(ErrorData *edata)
{
ErrorData *newedata;
MemoryContext oldcontext;
if (!errstart(edata->elevel, edata->filename, edata->lineno,
edata->funcname, NULL))
return;
newedata = &errordata[errordata_stack_depth];
oldcontext = MemoryContextSwitchTo(edata->assoc_context);
/* Copy the supplied fie... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 285,819,227,660,078,230,000,000,000,000,000,000,000 | 42 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
packed_cell_mem_cost(void)
{
return sizeof(packed_cell_t) + MP_POOL_ITEM_OVERHEAD;
} | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 262,665,080,972,098,140,000,000,000,000,000,000,000 | 4 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
static void *netlink_seq_start(struct seq_file *seq, loff_t *posp)
{
struct nl_seq_iter *iter = seq->private;
void *obj = SEQ_START_TOKEN;
loff_t pos;
int err;
iter->link = 0;
err = netlink_walk_start(iter);
if (err)
return ERR_PTR(err);
for (pos = *posp; pos && obj && !IS_ERR(obj); pos--)
obj = __netlin... | 0 | [
"CWE-362",
"CWE-415"
] | linux | 92964c79b357efd980812c4de5c1fd2ec8bb5520 | 29,194,034,300,534,850,000,000,000,000,000,000,000 | 18 | netlink: Fix dump skb leak/double free
When we free cb->skb after a dump, we do it after releasing the
lock. This means that a new dump could have started in the time
being and we'll end up freeing their skb instead of ours.
This patch saves the skb and module before we unlock so we free
the right memory.
Fixes: 16... |
int HeaderMapWrapper::luaGet(lua_State* state) {
const char* key = luaL_checkstring(state, 2);
const auto value =
Http::HeaderUtility::getAllOfHeaderAsString(headers_, Http::LowerCaseString(key));
if (value.result().has_value()) {
lua_pushlstring(state, value.result().value().data(), value.result().valu... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 98,802,431,673,587,550,000,000,000,000,000,000,000 | 11 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static inline int security_sysctl(struct ctl_table *table, int op)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 290,070,943,956,068,970,000,000,000,000,000,000,000 | 4 | 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... |
ciMethod* ciEnv::get_method_from_handle(Method* method) {
VM_ENTRY_MARK;
return get_metadata(method)->as_method();
} | 0 | [] | jdk17u | 8be0fc09f0ba2dd1dbfd6627456fa929d5574b04 | 207,515,378,735,721,360,000,000,000,000,000,000,000 | 4 | 8281859: Improve class compilation
Reviewed-by: mbaesken
Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f |
int fp_to_unsigned_bin(fp_int *a, unsigned char *b)
{
int x;
#ifndef WOLFSSL_SMALL_STACK
fp_int t[1];
#else
fp_int *t;
#endif
#ifdef WOLFSSL_SMALL_STACK
t = (fp_int*)XMALLOC(sizeof(fp_int), NULL, DYNAMIC_TYPE_BIGINT);
if (t == NULL)
return FP_MEM;
#endif
fp_init_copy(t, a);
x = fp_to_uns... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 3,732,499,101,590,739,000,000,000,000,000,000,000 | 25 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
void Magick::Image::blur(const double radius_,const double sigma_)
{
MagickCore::Image
*newImage;
GetPPException;
newImage=BlurImage(constImage(),radius_,sigma_,exceptionInfo);
replaceImage(newImage);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 196,603,281,684,326,970,000,000,000,000,000,000,000 | 10 | Added missing return to avoid use after free. |
int cipso_v4_validate(const struct sk_buff *skb, unsigned char **option)
{
unsigned char *opt = *option;
unsigned char *tag;
unsigned char opt_iter;
unsigned char err_offset = 0;
u8 opt_len;
u8 tag_len;
struct cipso_v4_doi *doi_def = NULL;
u32 tag_iter;
/* caller already checks for length values that are too ... | 0 | [
"CWE-835"
] | linux | 40413955ee265a5e42f710940ec78f5450d49149 | 7,502,604,058,446,992,000,000,000,000,000,000,000 | 142 | Cipso: cipso_v4_optptr enter infinite loop
in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop.
Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue
Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-o... |
GF_Err strk_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_SubTrackBox *ptr = (GF_SubTrackBox *)s;
e = gf_isom_box_array_read(s, bs);
if (e) return e;
if (!ptr->info) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing SubTrackInformationBox\n"));
return GF_ISOM_INVALID_FILE;
}
return GF_OK... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 80,180,416,798,711,310,000,000,000,000,000,000,000 | 13 | fixed #1757 |
void WebContents::EnumerateDirectory(
content::WebContents* guest,
scoped_refptr<content::FileSelectListener> listener,
const base::FilePath& path) {
if (!web_dialog_helper_)
web_dialog_helper_ =
std::make_unique<WebDialogHelper>(owner_window(), offscreen_);
web_dialog_helper_->EnumerateDire... | 0 | [
"CWE-200",
"CWE-668"
] | electron | 07a1c2a3e5845901f7e2eda9506695be58edc73c | 339,489,990,423,401,650,000,000,000,000,000,000,000 | 9 | fix: restrict sendToFrame to same-process frames by default (#26875) |
Header headerCopyLoad(const void * uh)
{
/* Discards const but that's ok as we'll take a copy */
return headerImport((void *)uh, 0, HEADERIMPORT_COPY);
} | 0 | [
"CWE-125"
] | rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | 194,660,531,228,595,920,000,000,000,000,000,000,000 | 5 | hdrblobInit() needs bounds checks too
Users can pass untrusted data to hdrblobInit() and it must be robust
against this. |
static int ipmr_mfc_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct ipmr_mfc_iter *s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &ipmr_mfc_seq_ops);
if (rc)
goto out_kfree;
seq = file->private_data;
seq->private = s;
out:
... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 241,888,630,967,244,600,000,000,000,000,000,000,000 | 22 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int dsdb_user_obj_set_account_type(struct ldb_context *ldb, struct ldb_message *usr_obj,
uint32_t user_account_control, uint32_t *account_type_p)
{
int ret;
uint32_t account_type;
struct ldb_message_element *el;
account_type = ds_uf2atype(user_account_control);
if (account_type == 0) {
ldb_set_errstring(... | 1 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 195,478,620,824,942,160,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... |
static int fastrpc_map_find(struct fastrpc_user *fl, int fd,
struct fastrpc_map **ppmap)
{
struct fastrpc_map *map = NULL;
mutex_lock(&fl->mutex);
list_for_each_entry(map, &fl->maps, node) {
if (map->fd == fd) {
fastrpc_map_get(map);
*ppmap = map;
mutex_unlock(&fl->mutex);
return 0;
}
}
mut... | 0 | [
"CWE-400",
"CWE-401"
] | linux | fc739a058d99c9297ef6bfd923b809d85855b9a9 | 95,971,127,905,766,750,000,000,000,000,000,000,000 | 18 | misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach
In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory
for a should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com
Signed-off-by: Greg... |
void ioat_dma_remove(struct ioatdma_device *device)
{
struct dma_device *dma = &device->common;
ioat_disable_interrupts(device);
ioat_kobject_del(device);
dma_async_device_unregister(dma);
pci_pool_destroy(device->dma_pool);
pci_pool_destroy(device->completion_pool);
INIT_LIST_HEAD(&dma->channels);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 160,555,773,824,043,520,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... |
int call_fib6_entry_notifiers(struct net *net,
enum fib_event_type event_type,
struct fib6_info *rt,
struct netlink_ext_ack *extack)
{
struct fib6_entry_notifier_info info = {
.info.extack = extack,
.rt = rt,
};
rt->fib6_table->fib_seq++;
return call_fib6_notifiers(net, event_type, &... | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 104,717,925,492,600,100,000,000,000,000,000,000,000 | 13 | 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... |
static void print_parent_mibchildoid(FILE * f, struct tree *tp)
{
static struct tree *temp;
unsigned long elems[100];
int elem_cnt = 0;
int i = 0;
temp = tp;
if (temp) {
while (temp->parent) {
elems[elem_cnt++] = temp->subid;
temp = temp->parent;
}... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 91,043,572,876,215,330,000,000,000,000,000,000,000 | 22 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
struct razer_report razer_chroma_misc_set_polling_rate(unsigned short polling_rate)
{
struct razer_report report = get_razer_report(0x00, 0x05, 0x01);
switch(polling_rate) {
case 1000:
report.arguments[0] = 0x01;
break;
case 500:
report.arguments[0] = 0x02;
break;
c... | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 140,447,723,406,020,830,000,000,000,000,000,000,000 | 21 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
static void selinux_shm_free_security(struct shmid_kernel *shp)
{
ipc_free_security(&shp->shm_perm);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 179,007,145,727,436,330,000,000,000,000,000,000,000 | 4 | 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... |
static void print_fatal_signal(int signr)
{
struct pt_regs *regs = signal_pt_regs();
printk("%s/%d: potentially unexpected fatal signal %d.\n",
current->comm, task_pid_nr(current), signr);
#if defined(__i386__) && !defined(__arch_um__)
printk("code at %08lx: ", regs->ip);
{
int i;
for (i = 0; i < 16; i++) {
... | 0 | [
"CWE-20",
"CWE-362"
] | linux | 9899d11f654474d2d54ea52ceaa2a1f4db3abd68 | 307,037,522,181,521,000,000,000,000,000,000,000,000 | 24 | ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL
putreg() assumes that the tracee is not running and pt_regs_access() can
safely play with its stack. However a killed tracee can return from
ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
that debugger can actually read/mod... |
void ExistsMatchExpression::debugString(StringBuilder& debug, int indentationLevel) const {
_debugAddSpace(debug, indentationLevel);
debug << path() << " exists";
MatchExpression::TagData* td = getTag();
if (nullptr != td) {
debug << " ";
td->debugString(&debug);
}
debug << "\n";... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 177,369,074,238,471,970,000,000,000,000,000,000,000 | 10 | SERVER-43699 $mod should not overflow for large negative values |
int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_ioctl)
return drv->bdrv_ioctl(bs, req, buf);
return -ENOTSUP;
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 219,897,434,308,841,250,000,000,000,000,000,000,000 | 8 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
GF_Err colr_box_dump(GF_Box *a, FILE * trace)
{
u8 *prof_data_64=NULL;
u32 size_64;
GF_ColourInformationBox *ptr = (GF_ColourInformationBox *)a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "ColourInformationBox", trace);
if (ptr->is_jp2) {
gf_fprintf(trace, "method=\"%d\" precedence=\"%d\" approx=\... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 183,970,303,542,737,030,000,000,000,000,000,000,000 | 47 | fixed #2138 |
static int snd_ctl_fasync(int fd, struct file * file, int on)
{
struct snd_ctl_file *ctl;
ctl = file->private_data;
return snd_fasync_helper(fd, file, on, &ctl->fasync);
} | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 210,268,008,724,033,100,000,000,000,000,000,000,000 | 7 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
//! Fill sequentially all pixel values with specified values \newinstance.
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5) const {
return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1,val2,val3,val4,val5); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 283,729,369,661,211,220,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
gs_grab_release_mouse (GSGrab *grab)
{
gs_debug ("Ungrabbing pointer");
gdk_pointer_ungrab (GDK_CURRENT_TIME);
gs_grab_mouse_reset (grab);
return TRUE;
} | 0 | [] | gnome-screensaver | f93a22c175090cf02e80bc3ee676b53f1251f685 | 133,421,758,700,712,250,000,000,000,000,000,000,000 | 9 | Nullify grab window variables when windows are destroyed
If we don't do this then there is a time period where the
grab window variables contain dangling pointers which can
cause crashes.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789 |
static void cache_free(Cache* cache)
{
/* shutdown cache in 10 minutes of inactivity */
if(!cache->delayed_free_handler)
cache->delayed_free_handler = g_timeout_add_seconds(600,
delayed_cache_free,
... | 0 | [
"CWE-20"
] | menu-cache | 56f66684592abf257c4004e6e1fff041c64a12ce | 18,220,842,359,739,083,000,000,000,000,000,000,000 | 9 | Fix potential access violation, use runtime user dir instead of tmp dir.
Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0. |
_copyAlterTSDictionaryStmt(const AlterTSDictionaryStmt *from)
{
AlterTSDictionaryStmt *newnode = makeNode(AlterTSDictionaryStmt);
COPY_NODE_FIELD(dictname);
COPY_NODE_FIELD(options);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 270,103,375,696,041,440,000,000,000,000,000,000,000 | 9 | 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... |
helpsort(
const void *t1,
const void *t2
)
{
const char * const * name1 = t1;
const char * const * name2 = t2;
return strcmp(*name1, *name2);
} | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 237,161,703,494,421,340,000,000,000,000,000,000,000 | 10 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
hex_encode (const unsigned char *data,
size_t n_data)
{
char *result;
size_t i;
size_t o;
if ((SIZE_MAX - 1) / 3 < n_data)
return NULL;
result = malloc (n_data * 3 + 1);
if (result == NULL)
return NULL;
for (i = 0, o = 0; i < n_data; i++) {
if (i > 0)
result[o++] = ':';
result[o++] = HEX... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 116,690,836,269,260,970,000,000,000,000,000,000,000 | 23 | Check for arithmetic overflows before allocating |
void InstanceKlass::log_to_classlist() const {
#if INCLUDE_CDS
ResourceMark rm;
if (ClassListWriter::is_enabled()) {
if (!ClassLoader::has_jrt_entry()) {
warning("DumpLoadedClassList and CDS are not supported in exploded build");
DumpLoadedClassList = NULL;
return;
}
if (is_shareabl... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 275,972,147,224,480,000,000,000,000,000,000,000,000 | 17 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
void RECORD_LAYER_release(RECORD_LAYER *rl)
{
if (SSL3_BUFFER_is_initialised(&rl->rbuf))
ssl3_release_read_buffer(rl->s);
if (rl->numwpipes > 0)
ssl3_release_write_buffer(rl->s);
SSL3_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
} | 0 | [
"CWE-20"
] | openssl | 63658103d4441924f8dbfc517b99bb54758a98b9 | 133,214,312,620,669,460,000,000,000,000,000,000,000 | 8 | Fix a hang with SSL_peek()
If while calling SSL_peek() we read an empty record then we go into an
infinite loop, continually trying to read data from the empty record and
never making any progress. This could be exploited by a malicious peer in
a Denial Of Service attack.
CVE-2016-6305
GitHub Issue #1563
Reviewed-b... |
static void * __init efi_map_regions(int *count, int *pg_shift)
{
void *p, *new_memmap = NULL;
unsigned long left = 0;
unsigned long desc_size;
efi_memory_desc_t *md;
desc_size = efi.memmap.desc_size;
p = NULL;
while ((p = efi_map_next_entry(p))) {
md = p;
if (!should_map_region(md))
continue;
efi_m... | 0 | [
"CWE-388"
] | tip | 4e78921ba4dd0aca1cc89168f45039add4183f8e | 223,301,590,094,335,950,000,000,000,000,000,000,000 | 36 | efi/x86/Add missing error handling to old_memmap 1:1 mapping code
The old_memmap flow in efi_call_phys_prolog() performs numerous memory
allocations, and either does not check for failure at all, or it does
but fails to propagate it back to the caller, which may end up calling
into the firmware with an incomplete 1:1 ... |
ismode(const char *start, const char *end, int *permset)
{
const char *p;
if (start >= end)
return (0);
p = start;
*permset = 0;
while (p < end) {
switch (*p++) {
case 'r': case 'R':
*permset |= ARCHIVE_ENTRY_ACL_READ;
break;
case 'w': case 'W':
*permset |= ARCHIVE_ENTRY_ACL_WRITE;
break;
ca... | 0 | [
"CWE-476"
] | libarchive | 15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175 | 189,571,610,417,932,860,000,000,000,000,000,000,000 | 27 | Skip 0-length ACL fields
Currently, it is possible to create an archive that crashes bsdtar
with a malformed ACL:
Program received signal SIGSEGV, Segmentation fault.
archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726
1726 ... |
void ha_partition::cleanup_new_partition(uint part_count)
{
DBUG_ENTER("ha_partition::cleanup_new_partition");
if (m_added_file)
{
THD *thd= ha_thd();
handler **file= m_added_file;
while ((part_count > 0) && (*file))
{
(*file)->ha_external_lock(thd, F_UNLCK);
(*file)->close();
... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 240,470,365,201,408,340,000,000,000,000,000,000,000 | 22 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
CuePoint::CuePoint()
: time_(0),
track_(0),
cluster_pos_(0),
block_number_(1),
output_block_number_(true) {} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 211,871,654,865,344,740,000,000,000,000,000,000,000 | 6 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
call(VALUE self) {
agooReq r = DATA_PTR(self);
VALUE args[1];
volatile VALUE io;
if (NULL == r) {
rb_raise(rb_eArgError, "Request is no longer valid.");
}
r->res->con->hijacked = true;
// TBD try basic IO first. If that fails define a socket class
// is a mode needed?
args[0] =... | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 212,712,778,262,606,800,000,000,000,000,000,000,000 | 20 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
float pose_yaw() const { return pose_yaw_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 242,021,569,872,650,800,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static PHP_METHOD(SQLite, sqliteCreateFunction)
{
struct pdo_sqlite_func *func;
zval *callback;
char *func_name;
int func_name_len;
long argc = -1;
char *cbname = NULL;
pdo_dbh_t *dbh;
pdo_sqlite_db_handle *H;
int ret;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|l",
&func_name, &fu... | 0 | [
"CWE-264"
] | php-src | 055ecbc62878e86287d742c7246c21606cee8183 | 70,816,763,282,049,690,000,000,000,000,000,000,000 | 50 | Improve check for :memory: pseudo-filename in SQlite |
Item *Item_direct_view_ref::derived_field_transformer_for_having(THD *thd,
uchar *arg)
{
if ((*ref)->marker & SUBSTITUTION_FL)
{
this->marker|= SUBSTITUTION_FL;
return this;
}
st_select_lex *sel= (st_select_lex *)arg;
table_map tab_map= ... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 250,042,111,308,836,500,000,000,000,000,000,000,000 | 15 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
struct hlist_head *head = inode_hashtable + hash(inode->i_sb, hashval);
struct inode *old;
again:
spin_lock(&inode_hash_lock);
old = find_inod... | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 144,617,412,431,360,740,000,000,000,000,000,000,000 | 42 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
static int
snmp_input(int operation, netsnmp_session * session, int reqid, netsnmp_pdu * pdu, void *magic)
{ | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 211,049,357,672,406,660,000,000,000,000,000,000,000 | 4 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
static double mp_matrix_eig(_cimg_math_parser& mp) {
double *ptrd = &_mp_arg(1) + 1;
const double *ptr1 = &_mp_arg(2) + 1;
const unsigned int k = (unsigned int)mp.opcode[3];
CImg<doubleT> val, vec;
CImg<doubleT>(ptr1,k,k,1,1,true).symmetric_eigen(val,vec);
CImg<doub... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 212,076,247,329,106,660,000,000,000,000,000,000,000 | 10 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
gboolean
mono_verifier_verify_class (MonoClass *class)
{
/* The verifier was disabled at compile time */
return TRUE; | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 143,161,382,306,593,380,000,000,000,000,000,000,000 | 5 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
int __weak kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
{
int err;
err = copy_from_kernel_nofault(bpt->saved_instr, (char *)bpt->bpt_addr,
BREAK_INSTR_SIZE);
if (err)
return err;
err = copy_to_kernel_nofault((char *)bpt->bpt_addr,
arch_kgdb_ops.gdb_bpt_instr, BREAK_INSTR_SIZE);
return err;
} | 0 | [
"CWE-787"
] | linux | eadb2f47a3ced5c64b23b90fd2a3463f63726066 | 194,411,498,780,364,400,000,000,000,000,000,000,000 | 12 | lockdown: also lock down previous kgdb use
KGDB and KDB allow read and write access to kernel memory, and thus
should be restricted during lockdown. An attacker with access to a
serial port (for example, via a hypervisor console, which some cloud
vendors provide over the network) could trigger the debugger so it is
i... |
MagickExport ModuleInfo *AcquireModuleInfo(const char *path,const char *tag)
{
ModuleInfo
*module_info;
module_info=(ModuleInfo *) AcquireCriticalMemory(sizeof(*module_info));
(void) memset(module_info,0,sizeof(*module_info));
if (path != (const char *) NULL)
module_info->path=ConstantString(path);
i... | 0 | [
"CWE-200",
"CWE-362"
] | ImageMagick | 01faddbe2711a4156180c4a92837e2f23683cc68 | 135,310,771,242,280,280,000,000,000,000,000,000,000 | 15 | Use the correct rights. |
static struct rpc_task *nfs4_do_unlck(struct file_lock *fl,
struct nfs_open_context *ctx,
struct nfs4_lock_state *lsp,
struct nfs_seqid *seqid)
{
struct nfs4_unlockdata *data;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOCKU],
.rpc_cred = ctx->cred,
};
struct rpc_task_setup task... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 21,677,884,024,473,360,000,000,000,000,000,000,000 | 34 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
mysqld_get_one_option(int optid,
const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
case '#':
#ifndef DBUG_OFF
if (!argument)
argument= (char*) default_dbug_option;
if (argument[0] == '0' && !argument[1])
{
DEBUG... | 0 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 297,090,288,628,568,550,000,000,000,000,000,000,000 | 313 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
get_gconf_client (void)
{
GConfClient *client;
GSList *addresses;
GError *error;
GConfEngine *engine;
client = NULL;
addresses = NULL;
addresses = g_slist_prepend (addresses, "xml:merged:" SYSCONFDIR "/gconf/gconf.xml.mandat... | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 261,672,151,376,360,500,000,000,000,000,000,000,000 | 28 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
pdf14_ctx_new(gs_int_rect *rect, int n_chan, bool additive, gx_device *dev)
{
pdf14_ctx *result;
pdf14_buf *buf;
gs_memory_t *memory = dev->memory->stable_memory;
bool has_tags = device_encodes_tags(dev);
pdf14_device *pdev = (pdf14_device *)dev;
result = gs_alloc_struct(memory, pdf14_ctx, &st_... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 306,997,183,384,954,100,000,000,000,000,000,000,000 | 40 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
static INLINE int is_valid_qp(davs2_t *h, int i_qp)
{
return i_qp >= 0 && i_qp <= (63 + 8 * (h->sample_bit_depth - 8));
} | 0 | [
"CWE-787"
] | davs2 | b41cf117452e2d73d827f02d3e30aa20f1c721ac | 26,783,302,136,263,690,000,000,000,000,000,000,000 | 4 | Add checking for `frame_rate_code`.
Signed-off-by: luofl <falei.luo@gmail.com> |
static void server(int fd, unsigned rounds, const char *prio)
{
int retval;
gnutls_session_t session;
gnutls_datum_t session_ticket_key = { NULL, 0 };
gnutls_certificate_credentials_t serverx509cred = NULL;
virt_time_init();
if (gnutls_session_ticket_key_generate(&session_ticket_key) < 0) {
fail("server: Coul... | 1 | [] | gnutls | c2646aeee94e71cb15c90a3147cf3b5b0ca158ca | 133,951,118,923,900,700,000,000,000,000,000,000,000 | 68 | stek: differentiate initial state from valid time window of TOTP
There was a confusion in the TOTP implementation in stek.c. When the
mechanism is initialized at the first time, it records the timestamp
but doesn't initialize the key. This removes the timestamp recording
at the initialization phase, so the key is pr... |
void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t val)
{
stl_phys_internal(as, addr, val, DEVICE_BIG_ENDIAN);
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 85,223,634,500,423,790,000,000,000,000,000,000,000 | 4 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
GF_Err hnti_box_read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read_ex(s, bs, s->type);
} | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 87,835,532,566,712,390,000,000,000,000,000,000,000 | 4 | fixed #1757 |
void qemu_input_event_send_key_delay(uint32_t delay_ms)
{
if (!kbd_timer) {
kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process,
&kbd_queue);
}
qemu_input_queue_delay(&kbd_queue, kbd_timer,
delay_ms ? delay_ms : kbd_defaul... | 1 | [
"CWE-772"
] | qemu | fa18f36a461984eae50ab957e47ec78dae3c14fc | 307,508,524,759,350,370,000,000,000,000,000,000,000 | 9 | input: limit kbd queue depth
Apply a limit to the number of items we accept into the keyboard queue.
Impact: Without this limit vnc clients can exhaust host memory by
sending keyboard events faster than qemu feeds them to the guest.
Fixes: CVE-2017-8379
Cc: P J P <ppandit@redhat.com>
Cc: Huawei PSIRT <PSIRT@huawei.c... |
static int get_hub_descriptor(struct usb_device *hdev,
struct usb_hub_descriptor *desc)
{
int i, ret, size;
unsigned dtype;
if (hub_is_superspeed(hdev)) {
dtype = USB_DT_SS_HUB;
size = USB_DT_SS_HUB_SIZE;
} else {
dtype = USB_DT_HUB;
size = sizeof(struct usb_hub_descriptor);
}
for (i = 0; i < 3; i++) ... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 318,212,332,240,666,370,000,000,000,000,000,000,000 | 32 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
static int load_certificates(char **key, char **cert, char **trust) {
int r;
r = read_full_file(arg_key ?: PRIV_KEY_FILE, key, NULL);
if (r < 0)
return log_error_errno(r, "Failed to read key from file '%s': %m",
arg_key ?: PRIV_KEY_FILE);
... | 0 | [
"CWE-770"
] | systemd | ef4d6abe7c7fab6cbff975b32e76b09feee56074 | 101,425,869,752,037,790,000,000,000,000,000,000,000 | 28 | journal-remote: set a limit on the number of fields in a message
Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
reused for the new error condition (too many fields).
This matches the change done for systemd-journald, hence forming the second
part of the fix for CVE-2018-16865
(https://b... |
static void check_unshare_flags(unsigned long *flags_ptr)
{
/*
* If unsharing a thread from a thread group, must also
* unshare vm.
*/
if (*flags_ptr & CLONE_THREAD)
*flags_ptr |= CLONE_VM;
/*
* If unsharing vm, must also unshare signal handlers.
*/
if (*flags_ptr & CLONE_VM)
*flags_ptr |= CLONE_SIGH... | 0 | [
"CWE-20"
] | linux | f106eee10038c2ee5b6056aaf3f6d5229be6dcdd | 73,661,015,881,006,560,000,000,000,000,000,000,000 | 21 | pids: fix fork_idle() to setup ->pids correctly
copy_process(pid => &init_struct_pid) doesn't do attach_pid/etc.
It shouldn't, but this means that the idle threads run with the wrong
pids copied from the caller's task_struct. In x86 case the caller is
either kernel_init() thread or keventd.
In particular, this means... |
PJ_DEF(void) pj_ssl_cert_wipe_keys(pj_ssl_cert_t *cert)
{
if (cert) {
wipe_buf(&cert->CA_file);
wipe_buf(&cert->CA_path);
wipe_buf(&cert->cert_file);
wipe_buf(&cert->privkey_file);
wipe_buf(&cert->privkey_pass);
wipe_buf(&cert->CA_buf);
wipe_buf(&cert->cert_buf);
wipe_buf(&cert->privkey_buf);
}
} | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 283,880,778,798,350,770,000,000,000,000,000,000,000 | 13 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
int modbus_set_socket(modbus_t *ctx, int s)
{
if (ctx == NULL) {
errno = EINVAL;
return -1;
}
ctx->s = s;
return 0;
} | 0 | [
"CWE-125"
] | libmodbus | 5ccdf5ef79d742640355d1132fa9e2abc7fbaefc | 228,011,045,359,475,280,000,000,000,000,000,000,000 | 10 | Fix VD-1301 and VD-1302 vulnerabilities
This patch was contributed by Maor Vermucht and Or Peles from
VDOO Connected Trust. |
*/
static int io_scm_file_account(struct io_ring_ctx *ctx, struct file *file)
{
#if defined(CONFIG_UNIX)
struct sock *sk = ctx->ring_sock->sk;
struct sk_buff_head *head = &sk->sk_receive_queue;
struct scm_fp_list *fpl;
struct sk_buff *skb;
if (likely(!io_file_need_scm(file)))
return 0;
/*
* See if we can m... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 290,204,028,804,181,400,000,000,000,000,000,000,000 | 53 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
static int tcos_decipher(sc_card_t *card, const u8 * crgram, size_t crgram_len, u8 * out, size_t outlen)
{
sc_context_t *ctx;
sc_apdu_t apdu;
u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
u8 sbuf[SC_MAX_APDU_BUFFER_SIZE];
tcos_data *data;
int tcos3, r;
assert(card != NULL && crgram != NULL && out != NULL);
ctx = card->ctx... | 0 | [
"CWE-787"
] | OpenSC | 9d294de90d1cc66956389856e60b6944b27b4817 | 135,428,929,269,373,700,000,000,000,000,000,000,000 | 46 | prevent out of bounds write
fixes https://oss-fuzz.com/testcase-detail/5226571123392512 |
static ut32 adr(ArmOp *op, int addr) {
ut32 data = UT32_MAX;
ut64 at = 0LL;
if (op->operands[1].type & ARM_CONSTANT) {
// XXX what about negative values?
at = op->operands[1].immediate - addr;
at /= 4;
}
data = 0x00000030;
data += 0x01000000 * op->operands[0].reg;
ut8 b0 = at;
ut8 b1 = (at >> 3) & 0xff;
... | 0 | [
"CWE-119",
"CWE-787"
] | radare2 | df167c7db545953bb7f71c72e98e7a3ca0c793bf | 197,105,814,981,513,300,000,000,000,000,000,000,000 | 19 | Fix #12376 - crash in: rasm2 -a arm -b 64 '0 ,0,0,0,0,0,0,' |
void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
if (!owner_window_)
return;
SetHtmlApiFullscreen(false);
if (native_fullscreen_) {
// Explicitly trigger a view resize, as the size is not actually changing if
// the browser is fullscreened, too. Chrome does this indirectly ... | 0 | [] | electron | 6d9f3a494596d6b3e30938af9deb2c79f1c7f797 | 38,822,916,546,918,540,000,000,000,000,000,000,000 | 13 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191)
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367)
* Make ElectronBrowser mojo interface frame associated. (#32815)
Co-authored-by: Marek Haranczyk <marek@openfin.co>
* fix: e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.