func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static bool v4l2_is_known_ioctl(unsigned int cmd)
{
if (_IOC_NR(cmd) >= V4L2_IOCTLS)
return false;
return v4l2_ioctls[_IOC_NR(cmd)].ioctl == cmd;
} | 0 | [
"CWE-401"
] | linux | fb18802a338b36f675a388fc03d2aa504a0d0899 | 110,330,012,375,393,300,000,000,000,000,000,000,000 | 6 | media: v4l: ioctl: Fix memory leak in video_usercopy
When an IOCTL with argument size larger than 128 that also used array
arguments were handled, two memory allocations were made but alas, only
the latter one of them was released. This happened because there was only
a single local variable to hold such a temporary a... |
static int do_replace(struct net *net, sockptr_t arg, unsigned int len)
{
int ret;
struct arpt_replace tmp;
struct xt_table_info *newinfo;
void *loc_cpu_entry;
struct arpt_entry *iter;
if (copy_from_sockptr(&tmp, arg, sizeof(tmp)) != 0)
return -EFAULT;
/* overflow check */
if (tmp.num_counters >= INT_MAX / ... | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 35,980,101,093,755,027,000,000,000,000,000,000,000 | 47 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, struct kstatfs *fsdata)
{
struct smb2_query_info_rsp *rsp = NULL;
struct kvec iov;
struct kvec rsp_iov;
int rc = 0;
int resp_buftype;
struct cifs_ses *ses = tcon->ses;
struct smb2_fs_full_size_info *info = ... | 0 | [
"CWE-476"
] | linux | cabfb3680f78981d26c078a26e5c748531257ebb | 257,058,183,526,095,880,000,000,000,000,000,000,000 | 41 | CIFS: Enable encryption during session setup phase
In order to allow encryption on SMB connection we need to exchange
a session key and generate encryption and decryption keys.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> |
static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
s64 change, struct gfs2_quota_data *qd,
struct fs_disk_quota *fdq)
{
struct inode *inode = &ip->i_inode;
struct address_space *mapping = inode->i_mapping;
unsigned long index = loc >> PAGE_CACHE_SHIFT;
unsigned offset = loc & (PAGE_CACH... | 0 | [
"CWE-399"
] | linux-2.6 | 7e619bc3e6252dc746f64ac3b486e784822e9533 | 243,088,254,303,527,520,000,000,000,000,000,000,000 | 128 | GFS2: Fix writing to non-page aligned gfs2_quota structures
This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across... |
static double mp_div(_cimg_math_parser& mp) {
return _mp_arg(2)/_mp_arg(3);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 31,161,338,079,185,306,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void t_cpp_generator::generate_struct_declaration(ofstream& out,
t_struct* tstruct,
bool is_exception,
bool pointers,
bo... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 334,662,247,105,737,200,000,000,000,000,000,000,000 | 247 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
parse_extended_hostname(char *address, hostname_type_t *type_out)
{
char *s;
char *q;
char query[HS_SERVICE_ADDR_LEN_BASE32+1];
s = strrchr(address,'.');
if (!s) {
*type_out = NORMAL_HOSTNAME; /* no dot, thus normal */
goto success;
}
if (!strcmp(s+1,"exit")) {
*s = 0; /* NUL-terminate it */
... | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 22,867,095,433,123,340,000,000,000,000,000,000,000 | 75 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
static void FVMenuRemoveEncoding(GWindow UNUSED(gw), struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
RemoveEncoding();
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 24,517,802,208,149,453,000,000,000,000,000,000,000 | 3 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
OSDMapRef add_map(OSDMap *o) {
return service.add_map(o);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 105,029,897,217,408,540,000,000,000,000,000,000,000 | 3 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
int vrend_create_query(struct vrend_context *ctx, uint32_t handle,
uint32_t query_type, uint32_t query_index,
uint32_t res_handle, UNUSED uint32_t offset)
{
struct vrend_query *q;
struct vrend_resource *res;
uint32_t ret_handle;
bool fake_samples_passed = false;... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 163,512,198,584,865,830,000,000,000,000,000,000,000 | 94 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
const Type_handler *type_handler() const
{
return result_field->type_handler();
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 261,175,572,091,092,550,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
void mwifiex_set_vht_width(struct mwifiex_private *priv,
enum nl80211_chan_width width,
bool ap_11ac_enable)
{
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_11ac_vht_cfg vht_cfg;
vht_cfg.band_config = VHT_CFG_5GHZ;
vht_cfg.cap_info = adapter->hw_dot_11ac_dev_cap;
if (!ap_11ac_enable... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 7caac62ed598a196d6ddf8d9c121e12e082cac3a | 106,122,218,952,533,560,000,000,000,000,000,000,000 | 28 | mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and
mwifiex_set_wmm_params() call memcpy() without checking
the destination size.Since the source is given from
user-space, this may trigger a heap buffer overflow.
Fix them by putting the length... |
int wc_InitCert(Cert* cert)
{
#ifdef WOLFSSL_MULTI_ATTRIB
int i = 0;
#endif
if (cert == NULL) {
return BAD_FUNC_ARG;
}
XMEMSET(cert, 0, sizeof(Cert));
cert->version = 2; /* version 3 is hex 2 */
#ifndef NO_SHA
cert->sigType = CTC_SHAwRSA;
#elif !defined(NO_SHA256)
cert->sig... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 334,767,376,646,093,400,000,000,000,000,000,000,000 | 52 | OCSP: improve handling of OCSP no check extension |
explicit Pooling3DOp(OpKernelConstruction* context) : UnaryOp<T>(context) {
string data_format;
OP_REQUIRES_OK(context, context->GetAttr("data_format", &data_format));
OP_REQUIRES(context, FormatFromString(data_format, &data_format_),
errors::InvalidArgument("Invalid data format"));
if... | 0 | [
"CWE-369",
"CWE-787"
] | tensorflow | 63c6a29d0f2d692b247f7bf81f8732d6442fad09 | 41,399,463,004,534,380,000,000,000,000,000,000,000 | 32 | Add missing validation, prevent heap OOB
PiperOrigin-RevId: 372246723
Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf |
AlterForeignServerOwner(const char *name, Oid newOwnerId)
{
Oid servOid;
HeapTuple tup;
Relation rel;
ObjectAddress address;
rel = heap_open(ForeignServerRelationId, RowExclusiveLock);
tup = SearchSysCacheCopy1(FOREIGNSERVERNAME, CStringGetDatum(name));
if (!HeapTupleIsValid(tup))
ereport(ERROR,
(errc... | 0 | [
"CWE-94"
] | postgres | f52d2fbd8c62f667191b61228acf9d8aa53607b9 | 76,464,913,322,424,420,000,000,000,000,000,000,000 | 28 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
walk_string(fz_context *ctx, int uni, int remove, editable_str *str)
{
int rune;
if (str->utf8 == NULL || str->pos == -1)
return;
do
{
char *s = &str->utf8[str->pos];
size_t len;
int n = fz_chartorune(&rune, s);
if (rune == uni)
{
/* Match. Skip over that one. */
str->pos += n;
}
else if (un... | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 110,682,247,109,584,430,000,000,000,000,000,000,000 | 44 | Bug 701292: Fix test for missing/empty string. |
decode_NXAST_RAW_POP_QUEUE(struct ofpbuf *out)
{
ofpact_put_POP_QUEUE(out);
return 0;
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 157,365,391,166,131,520,000,000,000,000,000,000,000 | 5 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
get_v_kerning(hb_font_t *font, void *font_data, hb_codepoint_t first,
hb_codepoint_t second, void *user_data)
{
return 0;
} | 0 | [
"CWE-399"
] | libass | aa54e0b59200a994d50a346b5d7ac818ebcf2d4b | 82,943,546,713,217,740,000,000,000,000,000,000,000 | 5 | shaper: fix reallocation
Update the variable that tracks the allocated size. This potentially
improves performance and avoid some side effects, which lead to
undefined behavior in some cases.
Fixes fuzzer test case id:000051,sig:11,sync:fuzzer3,src:004221. |
static int crypto_blkcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_blkcipher rblkcipher;
snprintf(rblkcipher.type, CRYPTO_MAX_ALG_NAME, "%s", "blkcipher");
snprintf(rblkcipher.geniv, CRYPTO_MAX_ALG_NAME, "%s",
alg->cra_blkcipher.geniv ?: "<default>");
rblkcipher.blocksize = ... | 1 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 67,854,609,524,620,440,000,000,000,000,000,000,000 | 21 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
static const char *event_name(XHCIEvent *event)
{
return lookup_name(event->ccode, TRBCCode_names,
ARRAY_SIZE(TRBCCode_names));
} | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 58,283,458,026,345,340,000,000,000,000,000,000,000 | 5 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
static int common_file_perm(int op, struct file *file, u32 mask)
{
struct aa_file_cxt *fcxt = file->f_security;
struct aa_profile *profile, *fprofile = aa_cred_profile(file->f_cred);
int error = 0;
BUG_ON(!fprofile);
if (!file->f_path.mnt ||
!mediated_filesystem(file->f_path.dentry))
return 0;
profile =... | 0 | [
"CWE-119",
"CWE-264",
"CWE-369"
] | linux | 30a46a4647fd1df9cf52e43bf467f0d9265096ca | 87,914,621,128,762,200,000,000,000,000,000,000,000 | 27 | apparmor: fix oops, validate buffer size in apparmor_setprocattr()
When proc_pid_attr_write() was changed to use memdup_user apparmor's
(interface violating) assumption that the setprocattr buffer was always
a single page was violated.
The size test is not strictly speaking needed as proc_pid_attr_write()
will reject... |
static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request,
int validx, int *value_ret)
{
struct snd_usb_audio *chip = cval->head.mixer->chip;
/* enough space for one range */
unsigned char buf[sizeof(__u16) + 3 * sizeof(__u32)];
unsigned char *val;
int idx = 0, ret, val_size, size;
__u8 bRe... | 0 | [
"CWE-674"
] | sound | 19bce474c45be69a284ecee660aa12d8f1e88f18 | 193,386,885,000,183,170,000,000,000,000,000,000,000 | 64 | ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
`check_input_term` recursively calls itself with input from
device side (e.g., uac_input_terminal_descriptor.bCSourceID)
as argument (id). In `check_input_term`, if `check_input_term`
is called with the same `id` argument as the caller, it triggers
e... |
int tcf_register_action(struct tc_action_ops *act)
{
struct tc_action_ops *a, **ap;
write_lock(&act_mod_lock);
for (ap = &act_base; (a = *ap) != NULL; ap = &a->next) {
if (act->type == a->type || (strcmp(act->kind, a->kind) == 0)) {
write_unlock(&act_mod_lock);
return -EEXIST;
}
}
act->next = NULL;
*ap... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 246,376,901,055,748,970,000,000,000,000,000,000,000 | 16 | [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> |
R_API RList *r_bin_java_enum_class_methods(RBinJavaObj *bin, ut16 class_idx) {
RList *methods = r_list_newf (free);
RListIter *iter;
RBinJavaField *field;
r_list_foreach (bin->methods_list, iter, field) {
if (field->field_ref_cp_obj && 0) {
if ((field && field->field_ref_cp_obj->metas->ord == class_idx)) {
... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 303,116,835,276,800,500,000,000,000,000,000,000,000 | 26 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
s64 vsock_stream_has_space(struct vsock_sock *vsk)
{
return transport->stream_has_space(vsk);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 10,748,874,158,798,529,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 char *get_output_encoding(TSRMLS_D) {
if (ICONVG(output_encoding) && ICONVG(output_encoding)[0]) {
return ICONVG(output_encoding);
} else if (PG(output_encoding) && PG(output_encoding)[0]) {
return PG(output_encoding);
} else if (SG(default_charset)) {
return SG(default_charset);
}
return "";
} | 0 | [
"CWE-835"
] | php-src | 06d309fd7a917575d65c7a6f4f57b0e6bb0f9711 | 518,801,398,847,294,700,000,000,000,000,000,000 | 10 | Fix bug #76249 - fail on invalid sequences |
int ssl3_get_client_hello(SSL *s)
{
int i,j,ok,al,ret= -1;
unsigned int cookie_len;
long n;
unsigned long id;
unsigned char *p,*d,*q;
SSL_CIPHER *c;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp=NULL;
#endif
STACK_OF(SSL_CIPHER) *ciphers=NULL;
/* We do this so that we will respond with our native type.
* If we ar... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 21,357,230,189,412,970,000,000,000,000,000,000,000 | 490 | Add Next Protocol Negotiation. |
SPL_METHOD(MultipleIterator, attachIterator)
{
spl_SplObjectStorage *intern;
zval *iterator = NULL, *info = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|z!", &iterator, zend_ce_iterator, &info) == FAILURE) {
return;
}
intern = Z_SPLOBJSTORAGE_P(getThis());
if (info != NUL... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 61cdd1255d5b9c8453be71aacbbf682796ac77d4 | 294,514,314,170,728,450,000,000,000,000,000,000,000 | 31 | Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key |
static UINT gdi_ResetGraphics(RdpgfxClientContext* context,
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics)
{
UINT rc = ERROR_INTERNAL_ERROR;
UINT32 index;
UINT16 count;
UINT32 DesktopWidth;
UINT32 DesktopHeight;
gdiGfxSurface* surface;
UINT16* pSurfaceIds = NULL;
rdpGdi* gdi = (rd... | 0 | [
"CWE-190"
] | FreeRDP | e08a23f93136f59a52651f66d064b8d4303872e1 | 10,329,899,995,209,549,000,000,000,000,000,000,000 | 49 | Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen |
TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,
const char* module)
{
TIFFDirectory *td = &tif->tif_dir;
if (!_TIFFFillStriles( tif ))
return ((tmsize_t)(-1));
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
if (!isMapped(tif)) {
tmsize_t cc;
if (!SeekOK(tif, td->td_st... | 0 | [
"CWE-190"
] | libtiff | 66e7bd59520996740e4df5495a830b42fae48bc4 | 318,599,966,396,626,150,000,000,000,000,000,000,000 | 78 | * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer
addition in TIFFReadRawStrip1() in isMapped() case.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 |
print_ip6cp_config_options(netdissect_options *ndo,
const u_char *p, int length)
{
int len, opt;
if (length < 2)
return 0;
ND_TCHECK2(*p, 2);
len = p[1];
opt = p[0];
if (length < len)
return 0;
if (len < 2) {
ND_PRINT((ndo, "\n\t %s Option (0x%02x), length %u (length bogus, sho... | 0 | [
"CWE-119"
] | tcpdump | 0f95d441e4b5d7512cc5c326c8668a120e048eda | 39,240,533,888,669,824,000,000,000,000,000,000,000 | 56 | Do bounds checking when unescaping PPP.
Clean up a const issue while we're at it. |
void ConnectionManagerImpl::onGoAway(GoAwayErrorCode) {
// Currently we do nothing with remote go away frames. In the future we can decide to no longer
// push resources if applicable.
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 283,428,865,288,712,550,000,000,000,000,000,000,000 | 4 | 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... |
void addReplyMultiBulkLen(redisClient *c, long length) {
_addReplyLongLong(c,length,'*');
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 73,498,877,168,823,690,000,000,000,000,000,000,000 | 3 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
MagickExport ChannelMoments *GetImageChannelMoments(const Image *image,
ExceptionInfo *exception)
{
#define MaxNumberImageMoments 8
ChannelMoments
*channel_moments;
double
M00[CompositeChannels+1],
M01[CompositeChannels+1],
M02[CompositeChannels+1],
M03[CompositeChannels+1],
M10[Composi... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 318,046,301,113,184,970,000,000,000,000,000,000,000 | 417 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
int smb_vfs_call_sys_acl_add_perm(struct vfs_handle_struct *handle,
SMB_ACL_PERMSET_T permset,
SMB_ACL_PERM_T perm)
{
VFS_FIND(sys_acl_add_perm);
return handle->fns->sys_acl_add_perm(handle, permset, perm);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 178,753,604,693,700,700,000,000,000,000,000,000,000 | 7 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct sockaddr_in *usin = (struct sockaddr_in *)uaddr;
struct inet_sock *inet = inet_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
__be16 orig_sport, orig_dport;
__be32 daddr, nexthop;
struct flowi4 *fl4;
struct rtable *rt;
int err;
struc... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 229,699,828,765,560,240,000,000,000,000,000,000,000 | 124 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
static void __exit exit_elf_binfmt(void)
{
/* Remove the COFF and ELF loaders. */
unregister_binfmt(&elf_format);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 4e7c22d447bb6d7e37bfe39ff658486ae78e8d77 | 20,555,355,424,303,680,000,000,000,000,000,000,000 | 5 | x86, mm/ASLR: Fix stack randomization on 64-bit systems
The issue is that the stack for processes is not properly randomized on
64 bit architectures due to an integer overflow.
The affected function is randomize_stack_top() in file
"fs/binfmt_elf.c":
static unsigned long randomize_stack_top(unsigned long stack_top... |
static ssize_t stream_websocket_read(RedStream *s, void *buf, size_t size)
{
unsigned flags;
int len;
do {
len = websocket_read(s->priv->ws, (uint8_t *) buf, size, &flags);
} while (len == 0 && flags != 0);
return len;
} | 0 | [] | spice | 95a0cfac8a1c8eff50f05e65df945da3bb501fc9 | 179,441,598,487,183,700,000,000,000,000,000,000,000 | 10 | With OpenSSL 1.0.2 and earlier: disable client-side renegotiation.
Fixed issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
static struct caldav_db *my_caldav_open(struct mailbox *mailbox)
{
if (httpd_userid && mboxname_userownsmailbox(httpd_userid, mailbox->name)) {
return auth_caldavdb;
}
else {
return caldav_open_mailbox(mailbox, CALDAV_CREATE);
}
} | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 76,517,454,376,315,450,000,000,000,000,000,000,000 | 9 | HTTP: don't overrun buffer when parsing strings with sscanf() |
EXPORTED modseq_t dav_get_modseq(struct mailbox *mailbox __attribute__((unused)),
void *data,
const char *userid __attribute__((unused)))
{
return ((struct dav_data *) data)->modseq;
} | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 315,699,932,782,687,600,000,000,000,000,000,000,000 | 6 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
bool dma_release_from_contiguous(struct device *dev, struct page *pages,
int count)
{
return false;
} | 0 | [
"CWE-682"
] | linux | 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e | 176,413,675,656,518,900,000,000,000,000,000,000,000 | 5 | mm: cma: fix incorrect type conversion for size during dma allocation
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.
show_stack+0x10/0x1c
dump_stack+0x74/0xc8
kasan_report_error+0x2b0/0x408
kasan_report+0x34/0x40
__asan_storeN... |
int intel_uc_fw_init(struct intel_uc_fw *uc_fw)
{
int err;
/* this should happen before the load! */
GEM_BUG_ON(intel_uc_fw_is_loaded(uc_fw));
if (!intel_uc_fw_is_available(uc_fw))
return -ENOEXEC;
err = i915_gem_object_pin_pages(uc_fw->obj);
if (err) {
DRM_DEBUG_DRIVER("%s fw pin-pages err=%d\n",
int... | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 3,988,242,139,240,423,000,000,000,000,000,000,000 | 19 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
{
char
buffer[MaxTextExtent],
format,
magick[MaxTextExtent];
const char
*value;
IndexPacket
index;
MagickBooleanType
status;
MagickOffsetType
scene;
QuantumAny
pixel;
QuantumInfo
*qua... | 1 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | bfa3b9610c83227894c92b0d312ad327fceb6241 | 185,209,081,888,260,500,000,000,000,000,000,000,000 | 948 | https://github.com/ImageMagick/ImageMagick/issues/1614 |
static void ExportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const PixelPacket *magick_restrict p,
unsigned char *magick_restrict q)
{
QuantumAny
range;
ssize_t
x;
ssize_t
bit;
switch (quantum_info->depth)
{
case 1:
{
Magi... | 0 | [
"CWE-190"
] | ImageMagick6 | 553054c1cb1e4e05ec86237afef76a32cd7c464d | 50,206,402,081,833,930,000,000,000,000,000,000,000 | 203 | https://github.com/ImageMagick/ImageMagick/pull/3083 |
void jprobe_return(void)
{
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
asm volatile (
#ifdef CONFIG_X86_64
" xchg %%rbx,%%rsp \n"
#else
" xchgl %%ebx,%%esp \n"
#endif
" int3 \n"
" .globl jprobe_return_end\n"
" jprobe_return_end: \n"
" nop \n"::"b"
... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 206,361,234,545,222,530,000,000,000,000,000,000,000 | 16 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
BMPInfo
bmp_info;
BMPSubtype
bmp_subtype;
const char
*option;
const StringInfo
*profile;
MagickBooleanType
have_color_info,
status;
MagickOffsetType
scene;
Memor... | 1 | [
"CWE-787"
] | ImageMagick | ae04fa4be910255e5d363edebd77adeee99a525d | 58,621,105,963,454,080,000,000,000,000,000,000,000 | 773 | https://github.com/ImageMagick/ImageMagick/issues/1177 |
boost::system::error_code make_error_code(error_code_enum e)
{
return boost::system::error_code(e, get_gzip_category());
} | 0 | [
"CWE-20"
] | libtorrent | debf3c6e3688aab8394fe5c47737625faffe6f9e | 155,965,973,858,184,640,000,000,000,000,000,000,000 | 4 | update puff.c for gzip inflation (#1022)
update puff.c for gzip inflation |
void rfbAuthNewClient(rfbClientPtr cl)
{
RFBSecTypeData **p;
RFBSecTypeData *r;
if (rfbAuthIsBlocked()) {
rfbLog("Too many authentication failures - client rejected\n");
rfbClientConnFailed(cl, "Too many authentication failures");
return;
}
if (cl->protocol_minor_ver >= 7) {
rfbSendSecurityT... | 0 | [
"CWE-787"
] | turbovnc | cea98166008301e614e0d36776bf9435a536136e | 263,366,911,846,974,000,000,000,000,000,000,000,000 | 32 | Server: Fix two issues identified by ASan
1. If the TLSPlain and X509Plain security types were both disabled, then
rfbOptPamAuth() would overflow the name field in the secTypes
structure when testing the "none" security type, since the name of
that security type has less than five characters. This issue was
... |
static plist_t parse_string_node(const char **bnode, uint64_t size)
{
plist_data_t data = plist_new_plist_data();
data->type = PLIST_STRING;
data->strval = (char *) malloc(sizeof(char) * (size + 1));
memcpy(data->strval, *bnode, size);
data->strval[size] = '\0';
data->length = strlen(data->strv... | 1 | [
"CWE-119",
"CWE-787"
] | libplist | fbd8494d5e4e46bf2e90cb6116903e404374fb56 | 107,561,270,747,953,300,000,000,000,000,000,000,000 | 12 | bplist: Make sure to bail out if malloc() fails in parse_string_node()
Credit to Wang Junjie <zhunkibatu@gmail.com> (#93) |
int ssl_set_psk( ssl_context *ssl, const unsigned char *psk, size_t psk_len,
const unsigned char *psk_identity, size_t psk_identity_len )
{
if( psk == NULL || psk_identity == NULL )
return( POLARSSL_ERR_SSL_BAD_INPUT_DATA );
if( psk_len > POLARSSL_PSK_MAX_LEN )
return( POLARSSL... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 280,911,603,985,364,920,000,000,000,000,000,000,000 | 38 | Added max length checking of hostname |
void iscsi_set_connection_parameters(
struct iscsi_conn_ops *ops,
struct iscsi_param_list *param_list)
{
char *tmpptr;
struct iscsi_param *param;
pr_debug("---------------------------------------------------"
"---------------\n");
list_for_each_entry(param, ¶m_list->param_list, p_list) {
/*
* Special... | 0 | [
"CWE-119"
] | target-pending | cea4dcfdad926a27a18e188720efe0f2c9403456 | 284,416,760,233,983,600,000,000,000,000,000,000,000 | 85 | iscsi-target: fix heap buffer overflow on error
If a key was larger than 64 bytes, as checked by iscsi_check_key(), the
error response packet, generated by iscsi_add_notunderstood_response(),
would still attempt to copy the entire key into the packet, overflowing
the structure on the heap.
Remote preauthentication ke... |
GF_Err gf_media_parse_ivf_frame_header(GF_BitStream *bs, u64 *frame_size, u64 *pts)
{
if (!frame_size) return GF_BAD_PARAM;
if (gf_bs_available(bs) < 12)
return GF_BUFFER_TOO_SMALL;
*frame_size = gf_bs_read_u32_le(bs);
if (*frame_size > 256 * 1024 * 1024) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[IVF] Wrong fra... | 0 | [
"CWE-190"
] | gpac | 0cd19f4db70615d707e0e6202933c2ea0c1d36df | 99,328,652,362,438,570,000,000,000,000,000,000,000 | 17 | fixed #2067 |
inet_broadcast(uint32_t network, uint32_t netmask)
{
return 0xffffffff - netmask + network;
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 46,644,146,296,723,980,000,000,000,000,000,000,000 | 4 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
int64 GetMemoryLimitInBytes() override { return memory_limit_; } | 0 | [
"CWE-617",
"CWE-703"
] | tensorflow | 31bd5026304677faa8a0b77602c6154171b9aec1 | 315,327,567,460,605,200,000,000,000,000,000,000,000 | 1 | Prevent check fail in FFT
PiperOrigin-RevId: 372031044
Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299 |
int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
u8 comm_mode, u8 rf_mode)
{
dev->dep_link_up = true;
if (!dev->active_target && rf_mode == NFC_RF_INITIATOR) {
struct nfc_target *target;
target = nfc_find_target(dev, target_idx);
if (target == NULL)
return -ENOTCONN;
dev->active_targ... | 0 | [] | linux | 3e3b5dfcd16a3e254aab61bd1e8c417dd4503102 | 244,824,505,739,442,460,000,000,000,000,000,000,000 | 22 | NFC: reorder the logic in nfc_{un,}register_device
There is a potential UAF between the unregistration routine and the NFC
netlink operations.
The race that cause that UAF can be shown as below:
(FREE) | (USE)
nfcmrvl_nci_unregister_dev | nfc_genl_dev_up
nci_close_device |
nci... |
static zval *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, php_uint32 flags TSRMLS_DC) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry, newentry;
zval *ret;
/* invalidate phar cache */
PHAR_G(last_phar) = NULL;
PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL;
phar = (p... | 0 | [
"CWE-119"
] | php-src | 13ad4d3e971807f9a58ab5933182907dc2958539 | 267,956,585,794,450,640,000,000,000,000,000,000,000 | 136 | Fix bug #71354 - remove UMR when size is 0 |
MagickExport QuantizeInfo *AcquireQuantizeInfo(const ImageInfo *image_info)
{
QuantizeInfo
*quantize_info;
quantize_info=(QuantizeInfo *) AcquireMagickMemory(sizeof(*quantize_info));
if (quantize_info == (QuantizeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
GetQu... | 0 | [
"CWE-703",
"CWE-772"
] | ImageMagick | 0417cea1b6d72f90bd4f1f573f91e42a8ba66a89 | 57,255,372,414,211,190,000,000,000,000,000,000,000 | 24 | https://github.com/ImageMagick/ImageMagick/issues/574 |
closeTransport(PRIVATE_ASSOCIATIONKEY ** association)
{
closeTransportTCP(association);
} | 0 | [
"CWE-415",
"CWE-703",
"CWE-401"
] | dcmtk | a9697dfeb672b0b9412c00c7d36d801e27ec85cb | 197,609,955,183,233,350,000,000,000,000,000,000,000 | 4 | Fixed poss. NULL pointer dereference/double free.
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches. |
static void Ins_SCFS( INS_ARG )
{
Long K;
Int L;
L = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp2.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
K = CUR_Func_project( CUR.zp2.cur_x[L],
CUR.zp2.cur_y[L] );
CUR_Func_move( &CU... | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 301,522,245,236,961,900,000,000,000,000,000,000,000 | 26 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static void nested_vmx_restore_host_state(struct kvm_vcpu *vcpu)
{
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmx_msr_entry g, h;
struct msr_data msr;
gpa_t gpa;
u32 i, j;
vcpu->arch.pat = vmcs_read64(GUEST_IA32_PAT);
if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEB... | 0 | [
"CWE-863"
] | kvm | acff78477b9b4f26ecdf65733a4ed77fe837e9dc | 116,895,910,528,388,300,000,000,000,000,000,000,000 | 110 | KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887)
The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the
x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a
result, we discovered the potential for a buggy or malicious L1 to get
access to L0's x2APIC MSRs, via an L2, as follo... |
exit_zlib(struct Curl_easy *data,
z_stream *z, zlibInitState *zlib_init, CURLcode result)
{
if(*zlib_init == ZLIB_GZIP_HEADER)
Curl_safefree(z->next_in);
if(*zlib_init != ZLIB_UNINIT) {
if(inflateEnd(z) != Z_OK && result == CURLE_OK)
result = process_zlib_error(data, z);
*zlib_init = ZL... | 0 | [] | curl | 3a09fbb7f264c67c438d01a30669ce325aa508e2 | 221,211,897,156,108,540,000,000,000,000,000,000,000 | 14 | content_encoding: return error on too many compression steps
The max allowed steps is arbitrarily set to 5.
Bug: https://curl.se/docs/CVE-2022-32206.html
CVE-2022-32206
Reported-by: Harry Sintonen
Closes #9049 |
static struct page *dequeue_huge_page_vma(struct hstate *h,
struct vm_area_struct *vma,
unsigned long address, int avoid_reserve,
long chg)
{
struct page *page = NULL;
struct mempolicy *mpol;
gfp_t gfp_mask;
nodemask_t *nodemask;
int nid;
/*
* A child process with MAP_PRIVATE mappings created by th... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 316,082,388,189,961,820,000,000,000,000,000,000,000 | 48 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
long keyctl_instantiate_key_common(key_serial_t id,
struct iov_iter *from,
key_serial_t ringid)
{
const struct cred *cred = current_cred();
struct request_key_auth *rka;
struct key *instkey, *dest_keyring;
size_t plen = from ? iov_iter_count(from) : 0;
void *payload;
long ret;
kenter("%d,,%zu,%d",... | 0 | [
"CWE-476"
] | linux | 5649645d725c73df4302428ee4e02c869248b4c5 | 100,764,040,622,684,970,000,000,000,000,000,000,000 | 67 | KEYS: fix dereferencing NULL payload with nonzero length
sys_add_key() and the KEYCTL_UPDATE operation of sys_keyctl() allowed a
NULL payload with nonzero length to be passed to the key type's
->preparse(), ->instantiate(), and/or ->update() methods. Various key
types including asymmetric, cifs.idmap, cifs.spnego, an... |
static int bus_append_path_property(sd_bus_message *m, const char *field, const char *eq) {
int r;
if (streq(field, "MakeDirectory"))
return bus_append_parse_boolean(m, field, eq);
if (streq(field, "DirectoryMode"))
return bus_append_parse_mode(m, field, eq);
... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 77,569,060,723,530,115,000,000,000,000,000,000,000 | 27 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
void CmdAuthenticate::redactForLogging(mutablebson::Document* cmdObj) {
namespace mmb = mutablebson;
static const int numRedactedFields = 2;
static const char* redactedFields[numRedactedFields] = { "key", "nonce" };
for (int i = 0; i < numRedactedFields; ++i) {
for (mmb::... | 0 | [] | mongo | f85ceb17b37210eef71e8113162c41368bfd5c12 | 55,744,084,989,178,200,000,000,000,000,000,000,000 | 13 | SERVER-9476 Redact some potentially sensitive information when logging authentications. |
void jsP_dumplist(js_State *J, js_Ast *prog)
{
minify = 0;
if (prog->type == AST_LIST)
sblock(0, prog);
else
snode(0, prog);
nl();
} | 1 | [
"CWE-476"
] | mujs | f5b3c703e18725e380b83427004632e744f85a6f | 317,626,161,862,486,900,000,000,000,000,000,000,000 | 9 | Issue #161: Cope with empty programs in mujs-pp. |
static MagickBooleanType ReadProfile(Image *image,const char *name,
const unsigned char *datum,ssize_t length,ExceptionInfo *exception)
{
MagickBooleanType
status;
StringInfo
*profile;
if (length < 4)
return(MagickFalse);
profile=BlobToStringInfo(datum,(size_t) length);
if (profile == (StringI... | 0 | [
"CWE-703",
"CWE-787"
] | ImageMagick | 30ccf9a0da1f47161b5935a95be854fe84e6c2a2 | 214,600,620,455,727,530,000,000,000,000,000,000,000 | 19 | squash heap-buffer-overflow, PoC TIFF from Hardik |
NOEXPORT int connect_init(CLI *c, int domain) {
SOCKADDR_UNION bind_addr;
if(c->bind_addr) {
/* setup bind_addr based on c->bind_addr */
#if 0
/* IPv6 addresses converted from IPv4 cause timeouts */
#ifdef USE_IPv6
if(c->bind_addr->sa.sa_family==AF_INET && domain==AF_INET6) {
... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 240,951,189,711,665,650,000,000,000,000,000,000,000 | 98 | stunnel-5.57 |
DnsPacket *dns_packet_unref(DnsPacket *p) {
if (!p)
return NULL;
assert(p->n_ref > 0);
dns_packet_unref(p->more);
if (p->n_ref == 1)
dns_packet_free(p);
else
p->n_ref--;
return NULL;
} | 0 | [
"CWE-20",
"CWE-476"
] | systemd | a924f43f30f9c4acaf70618dd2a055f8b0f166be | 220,675,562,627,150,900,000,000,000,000,000,000,000 | 15 | resolved: bugfix of null pointer p->question dereferencing (#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396 |
static void dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps)
{
int i;
for (i = 0; i < num_maps; ++i) {
kfree_const(map[i].dev_name);
map[i].dev_name = NULL;
}
if (pctldev) {
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
if (ops->dt_free_map)
ops->dt_... | 0 | [
"CWE-125"
] | linux | be4c60b563edee3712d392aaeb0943a768df7023 | 197,778,055,505,436,800,000,000,000,000,000,000,000 | 19 | pinctrl: devicetree: Avoid taking direct reference to device name string
When populating the pinctrl mapping table entries for a device, the
'dev_name' field for each entry is initialised to point directly at the
string returned by 'dev_name()' for the device and subsequently used by
'create_pinctrl()' when looking up... |
static PST1 *LigaCreateFromOldStyleMultiple(PST1 *liga) {
char *pt;
PST1 *new, *last=liga;
while ( (pt = strrchr(liga->pst.u.lig.components,';'))!=NULL ) {
new = chunkalloc(sizeof( PST1 ));
*new = *liga;
new->pst.u.lig.components = copy(pt+1);
last->pst.next = (PST *) new;
last = new;
*pt = '\0';
... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 130,352,021,191,017,950,000,000,000,000,000,000,000 | 13 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
static void io_clean_op(struct io_kiocb *req)
{
if (req->flags & REQ_F_BUFFER_SELECTED) {
spin_lock(&req->ctx->completion_lock);
io_put_kbuf_comp(req);
spin_unlock(&req->ctx->completion_lock);
}
if (req->flags & REQ_F_NEED_CLEANUP) {
switch (req->opcode) {
case IORING_OP_READV:
case IORING_OP_READ_FIXE... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 68,380,813,519,931,270,000,000,000,000,000,000,000 | 70 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static int __kvm_io_bus_read(struct kvm_vcpu *vcpu, struct kvm_io_bus *bus,
struct kvm_io_range *range, void *val)
{
int idx;
idx = kvm_io_bus_get_first_dev(bus, range->addr, range->len);
if (idx < 0)
return -EOPNOTSUPP;
while (idx < bus->dev_count &&
kvm_io_bus_cmp(range, &bus->range[idx]) == 0) {
... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 47,148,872,763,496,290,000,000,000,000,000,000,000 | 19 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
running_bfd(void)
{
return (__test_bit(DAEMON_BFD, &daemon_mode) &&
(global_data->have_bfd_config ||
__test_bit(RUN_ALL_CHILDREN, &daemon_mode)));
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 261,737,085,890,756,460,000,000,000,000,000,000,000 | 6 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
RI_FKey_cascade_del(PG_FUNCTION_ARGS)
{
TriggerData *trigdata = (TriggerData *) fcinfo->context;
const RI_ConstraintInfo *riinfo;
Relation fk_rel;
Relation pk_rel;
HeapTuple old_row;
RI_QueryKey qkey;
SPIPlanPtr qplan;
int i;
/*
* Check that this is a valid trigger call on the right time and event.
*/
... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 58,937,767,713,235,810,000,000,000,000,000,000,000 | 147 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val)
{
val = cpu_to_be64(val);
address_space_rw(as, addr, (void *) &val, 8, 1);
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 117,226,992,293,489,840,000,000,000,000,000,000,000 | 5 | 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... |
account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
update_load_sub(&cfs_rq->load, se->load.weight);
#ifdef CONFIG_SMP
if (entity_is_task(se)) {
account_numa_dequeue(rq_of(cfs_rq), task_of(se));
list_del_init(&se->group_node);
}
#endif
cfs_rq->nr_running--;
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 241,523,040,100,221,050,000,000,000,000,000,000,000 | 11 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
static int mpeg4_decode_studio_mb(MpegEncContext *s, int16_t block_[12][64])
{
int i;
/* StudioMacroblock */
/* Assumes I-VOP */
s->mb_intra = 1;
if (get_bits1(&s->gb)) { /* compression_mode */
/* DCT */
/* macroblock_type, 1 or 2-bit VLC */
if (!get_bits1(&s->gb)) {
... | 0 | [
"CWE-476"
] | FFmpeg | 2aa9047486dbff12d9e040f917e5f799ed2fd78b | 192,315,333,680,795,360,000,000,000,000,000,000,000 | 34 | avcodec/mpeg4videodec: Check read profile before setting it
Fixes: null pointer dereference
Fixes: ffmpeg_crash_7.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int airo_set_mac_address(struct net_device *dev, void *p)
{
struct airo_info *ai = dev->ml_priv;
struct sockaddr *addr = p;
readConfigRid(ai, 1);
memcpy (ai->config.macAddr, addr->sa_data, dev->addr_len);
set_bit (FLAG_COMMIT, &ai->flags);
disable_MAC(ai, 1);
writeConfigRid (ai, 1);
enable_MAC(ai, 1);
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 14,506,633,071,226,880,000,000,000,000,000,000,000 | 16 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
TEST_F(QuicUnencryptedServerTransportTest, TestSendHandshakeDone) {
getFakeHandshakeLayer()->allowZeroRttKeys();
setupClientReadCodec();
recvClientHello(true, QuicVersion::QUIC_DRAFT);
recvClientFinished(true, nullptr, QuicVersion::QUIC_DRAFT);
auto& packets = server->getConn().outstandings.packets;
ASSERT_... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 331,385,041,016,758,900,000,000,000,000,000,000,000 | 20 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
av_cold void ff_dsputil_static_init(void)
{
int i;
for(i=0;i<512;i++) {
ff_squareTbl[i] = (i - 256) * (i - 256);
}
for(i=0; i<64; i++) ff_inv_zigzag_direct16[ff_zigzag_direct[i]]= i+1;
} | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 260,868,806,995,977,120,000,000,000,000,000,000,000 | 10 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void setFlushTimeout(std::chrono::milliseconds) override {
// HTTP/1 has one stream per connection, thus any data encoded is immediately written to the
// connection, invoking any watermarks as necessary. There is no internal buffering that would
// require a flush timeout not already covered by other tim... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 56,140,153,335,176,400,000,000,000,000,000,000,000 | 5 | 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... |
bool Item_outer_ref::check_inner_refs_processor(uchar *arg)
{
List_iterator_fast<Item_outer_ref> *it=
((List_iterator_fast<Item_outer_ref> *) arg);
Item_outer_ref *ref;
while ((ref= (*it)++))
{
if (ref == this)
{
ref->found_in_group_by= 1;
break;
}
}
(*it).rewind();
return FALS... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 119,112,267,655,138,280,000,000,000,000,000,000,000 | 16 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static inline int security_inode_killpriv(struct dentry *dentry)
{
return cap_inode_killpriv(dentry);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 114,169,438,928,979,320,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 int ext4_find_delete_entry(handle_t *handle, struct inode *dir,
const struct qstr *d_name)
{
int retval = -ENOENT;
struct buffer_head *bh;
struct ext4_dir_entry_2 *de;
bh = ext4_find_entry(dir, d_name, &de, NULL);
if (IS_ERR(bh))
return PTR_ERR(bh);
if (bh) {
retval = ext4_delete_entry(handle, d... | 0 | [
"CWE-125"
] | linux | 5872331b3d91820e14716632ebb56b1399b34fe1 | 126,810,354,384,621,310,000,000,000,000,000,000,000 | 16 | ext4: fix potential negative array index in do_split()
If for any reason a directory passed to do_split() does not have enough
active entries to exceed half the size of the block, we can end up
iterating over all "count" entries without finding a split point.
In this case, count == move, and split will be zero, and w... |
void __init(RBuffer *buf, r_bin_ne_obj_t *bin) {
bin->header_offset = r_buf_read_le16_at (buf, 0x3c);
bin->ne_header = R_NEW0 (NE_image_header);
if (!bin->ne_header) {
return;
}
bin->buf = buf;
// XXX this is endian unsafe
if (r_buf_read_at (buf, bin->header_offset, (ut8 *)bin->ne_header, sizeof (NE_image_head... | 0 | [
"CWE-476"
] | radare2 | 18d1d064bf599a255d55f09fca3104776fc34a67 | 69,387,097,149,891,750,000,000,000,000,000,000,000 | 51 | Fix null deref in the ne parser ##crash
* Reported by @hmsec via huntr.dev
* Reproducer: nepoc00
* BountyID: bfeb8fb8-644d-4587-80d4-cb704c404013 |
BOOL transport_connect_tls(rdpTransport* transport)
{
if (transport->layer == TRANSPORT_LAYER_TSG)
return TRUE;
if (transport->TlsIn == NULL)
transport->TlsIn = tls_new(transport->settings);
if (transport->TlsOut == NULL)
transport->TlsOut = transport->TlsIn;
transport->layer = TRANSPORT_LAYER_TLS;
transp... | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 197,126,613,414,290,800,000,000,000,000,000,000,000 | 31 | nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished. |
ProtobufTypes::MessagePtr InstanceImpl::dumpBootstrapConfig() {
auto config_dump = std::make_unique<envoy::admin::v3::BootstrapConfigDump>();
config_dump->mutable_bootstrap()->MergeFrom(bootstrap_);
TimestampUtil::systemClockToTimestamp(bootstrap_config_update_time_,
*(conf... | 0 | [
"CWE-400"
] | envoy | 542f84c66e9f6479bc31c6f53157c60472b25240 | 302,097,284,600,603,230,000,000,000,000,000,000,000 | 7 | overload: Runtime configurable global connection limits (#147)
Signed-off-by: Tony Allen <tony@allen.gg> |
static int tt_s2_4600_frontend_attach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap->dev;
struct dw2102_state *state = d->priv;
struct i2c_adapter *i2c_adapter;
struct i2c_client *client;
struct i2c_board_info board_info;
struct m88ds3103_platform_data m88ds3103_pdata = {};
struct ts2020_config... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 606142af57dad981b78707234cfbd15f9f7b7125 | 349,755,877,501,424,640,000,000,000,000,000,000 | 112 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... |
static void splashOutBlendSoftLight(SplashColorPtr src, SplashColorPtr dest,
SplashColorPtr blend, SplashColorMode cm) {
int i, x;
#ifdef SPLASH_CMYK
if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) {
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
dest[i] = 255 - dest[i];
src[i] = ... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 8,019,019,282,515,963,000,000,000,000,000,000,000 | 36 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
term_bg_rgb_color(guicolor_T rgb)
{
if (rgb != INVALCOLOR)
term_rgb_color(T_8B, rgb);
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 267,137,410,887,388,020,000,000,000,000,000,000,000 | 5 | 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. |
do_reset (GdmSession *self)
{
stop_all_conversations (self);
g_list_free_full (self->priv->pending_worker_connections, g_object_unref);
self->priv->pending_worker_connections = NULL;
g_free (self->priv->selected_user);
self->priv->selected_user = NULL;
g_free (self->pr... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 192,655,932,053,105,300,000,000,000,000,000,000,000 | 27 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
compare_signed_descriptors_by_age_(const void **_a, const void **_b)
{
const signed_descriptor_t *r1 = *_a, *r2 = *_b;
return (int)(r1->published_on - r2->published_on);
} | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 15,175,228,075,798,860,000,000,000,000,000,000,000 | 5 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
static void ImportCMYKOQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const unsigned char *magick_restrict p,
Quantum *magick_restrict q,ExceptionInfo *exception)
{
QuantumAny
range;
register ssize_t
x;
unsigned int
pixel;
if (image->colorspace != CMY... | 0 | [
"CWE-125"
] | ImageMagick | 430403b0029b37decf216d57f810899cab2317dd | 192,116,943,744,009,700,000,000,000,000,000,000,000 | 180 | https://github.com/ImageMagick/ImageMagick/issues/126 |
decoder_context::decoder_context()
{
//memset(ctx, 0, sizeof(decoder_context));
// --- parameters ---
param_sei_check_hash = false;
param_conceal_stream_errors = true;
param_suppress_faulty_pictures = false;
param_disable_deblocking = false;
param_disable_sao = false;
//param_disable_mc_residual_idct... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 199,473,303,473,586,030,000,000,000,000,000,000,000 | 112 | fix streams where SPS image size changes without refreshing PPS (#299) |
dataiterator_seek(Dataiterator *di, int whence)
{
if ((whence & DI_SEEK_STAY) != 0)
di->rootlevel = di->nparents;
switch (whence & ~DI_SEEK_STAY)
{
case DI_SEEK_CHILD:
if (di->state != di_nextarrayelement)
break;
if ((whence & DI_SEEK_STAY) != 0)
di->rootlevel = di->nparents + 1; /* XXX: d... | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 10,200,487,585,873,494,000,000,000,000,000,000,000 | 44 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
uint32_t readString(std::string& str) {
T_VIRTUAL_CALL();
return readString_virt(str);
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 204,026,666,244,729,370,000,000,000,000,000,000,000 | 4 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
bool AuthorizationSession::isAuthorizedForPrivilege(const Privilege& privilege) {
if (_externalState->shouldIgnoreAuthChecks())
return true;
return _isAuthorizedForPrivilege(privilege);
} | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 337,421,675,065,938,300,000,000,000,000,000,000,000 | 6 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
ParaNDIS_IsQueueInterruptEnabled(struct virtqueue * _vq)
{
return virtqueue_is_interrupt_enabled(_vq);
} | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 128,548,983,870,606,670,000,000,000,000,000,000,000 | 4 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
poppler_password_to_latin1 (const gchar *password)
{
gchar *password_latin;
GooString *password_g;
if (!password)
return nullptr;
password_latin = g_convert(password, -1, "ISO-8859-1", "UTF-8",
nullptr, nullptr, nullptr);
password_g = new GooString (password_latin);
g_free... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 79,664,054,986,000,370,000,000,000,000,000,000,000 | 15 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.