func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state)
{
unsigned int i;
for (i = 0; i < state->user_state.bo_count; i++)
drm_gem_object_unreference_unlocked(state->bo[i]);
kfree(state);
} | 0 | [
"CWE-190",
"CWE-703"
] | linux | 0f2ff82e11c86c05d051cae32b58226392d33bbf | 311,419,608,306,312,670,000,000,000,000,000,000,000 | 9 | drm/vc4: Fix an integer overflow in temporary allocation layout.
We copy the unvalidated ioctl arguments from the user into kernel
temporary memory to run the validation from, to avoid a race where the
user updates the unvalidate contents in between validating them and
copying them into the validated BO.
However, in ... |
vrend_copy_sub_image(struct vrend_resource* src_res, struct vrend_resource * dst_res,
uint32_t src_level, const struct pipe_box *src_box,
uint32_t dst_level, uint32_t dstx, uint32_t dsty, uint32_t dstz)
{
GLenum src_target = tgsitargettogltarget(src_res->base.target, src_re... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 315,115,952,513,215,840,000,000,000,000,000,000,000 | 19 | 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> |
rfbSendBell(rfbScreenInfoPtr rfbScreen)
{
rfbClientIteratorPtr i;
rfbClientPtr cl;
rfbBellMsg b;
i = rfbGetClientIterator(rfbScreen);
while((cl=rfbClientIteratorNext(i))) {
b.type = rfbBell;
LOCK(cl->sendMutex);
if (rfbWriteExact(cl, (char *)&b, sz_rfbBellMsg) < 0) {
rfbLogPerror("rf... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 211,523,163,006,059,300,000,000,000,000,000,000,000 | 19 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
int ath6kl_wmi_sta_bmiss_enhance_cmd(struct wmi *wmi, u8 if_idx, bool enhance)
{
struct sk_buff *skb;
struct wmi_sta_bmiss_enhance_cmd *cmd;
int ret;
skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
if (!skb)
return -ENOMEM;
cmd = (struct wmi_sta_bmiss_enhance_cmd *) skb->data;
cmd->enable = enhance ? 1 : 0;
re... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 200,863,343,444,565,850,000,000,000,000,000,000,000 | 18 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
int line6_probe(struct usb_interface *interface,
const struct usb_device_id *id,
const char *driver_name,
const struct line6_properties *properties,
int (*private_init)(struct usb_line6 *, const struct usb_device_id *id),
size_t data_size)
{
struct usb_device *usbdev = interface_to_usbdev(interface);
struct... | 1 | [
"CWE-476"
] | linux | 0b074ab7fc0d575247b9cc9f93bb7e007ca38840 | 106,889,145,437,579,570,000,000,000,000,000,000,000 | 86 | ALSA: line6: Assure canceling delayed work at disconnection
The current code performs the cancel of a delayed work at the late
stage of disconnection procedure, which may lead to the access to the
already cleared state.
This patch assures to call cancel_delayed_work_sync() at the beginning
of the disconnection proced... |
unsigned int timespec_sub_ms(struct timespec *a, struct timespec *b)
{
time_t dsecs;
dsecs = a->tv_sec - b->tv_sec;
if (!INT_MULTIPLY_OVERFLOW(dsecs, 1000)) {
return (dsecs*1000 + (a->tv_nsec - b->tv_nsec) / (1000 * 1000));
} else {
return UINT_MAX;
}
} | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 129,815,505,940,342,470,000,000,000,000,000,000,000 | 11 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
static inline void restore_sprs(struct thread_struct *old_thread,
struct thread_struct *new_thread)
{
#ifdef CONFIG_ALTIVEC
if (cpu_has_feature(CPU_FTR_ALTIVEC) &&
old_thread->vrsave != new_thread->vrsave)
mtspr(SPRN_VRSAVE, new_thread->vrsave);
#endif
#ifdef CONFIG_PPC_BOOK3S_64
if (cpu_has_feature(CPU_FT... | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 293,311,047,404,661,500,000,000,000,000,000,000,000 | 44 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
static u32 tg3_irq_count(struct tg3 *tp)
{
u32 irq_cnt = max(tp->rxq_cnt, tp->txq_cnt);
if (irq_cnt > 1) {
/* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
* only deals with link interrupts, etc, so we add
* one to the number of vectors we are reque... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 202,077,789,408,448,120,000,000,000,000,000,000,000 | 15 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
TEST(SimpleRegexTest, RootedComplex) {
auto testIndex = buildSimpleIndexEntry();
IndexBoundsBuilder::BoundsTightness tightness;
std::string prefix = IndexBoundsBuilder::simpleRegex(
"\\Af \t\vo\n\ro \\ \\# #comment", "mx", testIndex, &tightness);
ASSERT_EQUALS(prefix, "foo #");
ASSERT_EQUAL... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 270,066,066,002,811,700,000,000,000,000,000,000,000 | 8 | SERVER-44377 generate correct plan for indexed inequalities to null |
static MagickBooleanType GetXMPProperty(const Image *image,const char *property)
{
char
*xmp_profile;
const char
*content;
const StringInfo
*profile;
ExceptionInfo
*exception;
MagickBooleanType
status;
register const char
*p;
XMLTreeInfo
*child,
*description,
*nod... | 0 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 276,707,885,210,142,150,000,000,000,000,000,000,000 | 79 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
void mdesc_register_notifier(struct mdesc_notifier_client *client)
{
bool supported = false;
u64 node;
int i;
mutex_lock(&mdesc_mutex);
/* check to see if the node is supported for registration */
for (i = 0; md_node_ops_table[i].name != NULL; i++) {
if (strcmp(md_node_ops_table[i].name, client->node_name) ==... | 0 | [
"CWE-476"
] | sparc | 80caf43549e7e41a695c6d1e11066286538b336f | 89,099,797,485,335,650,000,000,000,000,000,000,000 | 30 | mdesc: fix a missing-check bug in get_vdev_port_node_info()
In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated
by kstrdup_const(), and it returns NULL when fails. So
'node_info->vdev_port.name' should be checked.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: David S. Miller <d... |
static int match_endpoint_audioformats(struct snd_usb_substream *subs,
struct audioformat *fp,
struct audioformat *match, int rate,
snd_pcm_format_t pcm_format)
{
int i;
int score = 0;
if (fp->channels < 1) {
dev_dbg(&subs->dev->dev,
"%s: (fmt @%p) no channels\n", __func__, fp)... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 29,080,296,645,580,690,000,000,000,000,000,000,000 | 42 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
void dump_xml(Formatter *f) const {
encode_xml("Key", key, f);
encode_xml("Value", value, f);
} | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 37,239,653,456,742,540,000,000,000,000,000,000,000 | 4 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
innodb_conn_init(
/*=============*/
innodb_engine_t* engine, /*!< in/out: InnoDB memcached
engine */
const void* cookie, /*!< in: This connection's
cookie */
int conn_option, /*!< in: whether it is
for read or write operation*/
ib_lck_mode_t lock_mode, /*!< in: Table lock mode */
bool has... | 0 | [] | mysql-server | 659514dc83299a7d8c7defeb543be4339fbe1ee1 | 258,021,350,287,537,400,000,000,000,000,000,000,000 | 445 | Bug #25147515 SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED
PROBLEM
-------
User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5
and with binlog on. Since "get" is a read transaction this connection is not
allocated any conn_data->thd (which is used for bin log commit... |
bool basic_const_item() const { return true; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 714,728,546,035,926,700,000,000,000,000,000,000 | 1 | 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.... |
CImg<T>& operator%=(const t value) {
if (is_empty()) return *this;
cimg_openmp_for(*this,cimg::mod(*ptr,(T)value),16384);
return *this;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 221,514,733,923,831,270,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
Status AuthorizationManager::getAuthorizationVersion(OperationContext* opCtx, int* version) {
CacheGuard guard(this, CacheGuard::fetchSynchronizationManual);
int newVersion = _version;
if (schemaVersionInvalid == newVersion) {
while (guard.otherUpdateInFetchPhase())
guard.wait();
... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 316,381,333,588,581,560,000,000,000,000,000,000,000 | 23 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
int MonConnection::get_auth_request(
uint32_t *method,
std::vector<uint32_t> *preferred_modes,
ceph::buffer::list *bl,
const EntityName& entity_name,
uint32_t want_keys,
RotatingKeyRing* keyring)
{
using ceph::encode;
// choose method
if (auth_method < 0) {
std::vector<uint32_t> as;
auth_regis... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 265,911,168,287,990,930,000,000,000,000,000,000,000 | 43 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
v3d_clean_caches(struct v3d_dev *v3d)
{
struct drm_device *dev = &v3d->drm;
int core = 0;
trace_v3d_cache_clean_begin(dev);
V3D_CORE_WRITE(core, V3D_CTL_L2TCACTL, V3D_L2TCACTL_TMUWCF);
if (wait_for(!(V3D_CORE_READ(core, V3D_CTL_L2TCACTL) &
V3D_L2TCACTL_L2TFLS), 100)) {
DRM_ERROR("Timeout waiting for L... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 29cd13cfd7624726d9e6becbae9aa419ef35af7f | 294,885,139,330,894,340,000,000,000,000,000,000,000 | 27 | drm/v3d: Fix memory leak in v3d_submit_cl_ioctl
In the impelementation of v3d_submit_cl_ioctl() there are two memory
leaks. One is when allocation for bin fails, and the other is when bin
initialization fails. If kcalloc fails to allocate memory for bin then
render->base should be put. Also, if v3d_job_init() fails to... |
dec_cursor(void)
{
return dec(&curwin->w_cursor);
} | 0 | [
"CWE-120"
] | vim | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 | 320,715,174,140,011,430,000,000,000,000,000,000,000 | 4 | patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change. |
int cli_hm_have_size(const struct cli_matcher *root, enum CLI_HASH_TYPE type, uint32_t size) {
return (size && size != 0xffffffff && root && root->hm.sizehashes[type].capacity && cli_htu32_find(&root->hm.sizehashes[type], size));
} | 0 | [
"CWE-189"
] | clamav-devel | 4842733eb3f09be61caeed83778bb6679141dbc5 | 306,668,707,218,032,400,000,000,000,000,000,000,000 | 3 | bb#2818 |
void FoFiTrueType::cvtCharStrings(char **encoding,
int *codeToGID,
FoFiOutputFunc outputFunc,
void *outputStream) {
char *name;
GooString *buf;
char buf2[16];
int i, k;
// always define '.notdef'
(*outputFunc)(outputStream, "/CharStrings 256 dict dup begin\n", 32);
(*outputFunc)(outputS... | 0 | [
"CWE-125"
] | poppler | cdb7ad95f7c8fbf63ade040d8a07ec96467042fc | 183,908,902,454,750,100,000,000,000,000,000,000,000 | 51 | Fix malformed file crash in bug #85243 |
plan_a (char const *filename)
{
char const *s;
char const *lim;
char const **ptr;
char *buffer;
lin iline;
size_t size = instat.st_size;
/* Fail if the file size doesn't fit in a size_t,
or if storage isn't available. */
if (! (size == instat.st_size
&& (buffer = malloc (size ? size : (size_t) ... | 1 | [
"CWE-59"
] | patch | dce4683cbbe107a95f1f0d45fabc304acfb5d71a | 176,392,324,421,738,530,000,000,000,000,000,000,000 | 117 | Don't follow symlinks unless --follow-symlinks is given
* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
append_to_file): Unless the --follow-symlinks option is given, open files with
the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
that consistently for input files.
* src/u... |
OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{
(void)p_j2k;
(void)p_stream;
(void)p_manager;
return OPJ_TRUE;
} | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | 4241ae6fbbf1de9658764a80944dc8108f2b4154 | 115,338,879,063,989,500,000,000,000,000,000,000,000 | 10 | Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985) |
static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
struct ext4_extent *ex,
long long *partial_cluster,
ext4_lblk_t from, ext4_lblk_t to)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
unsigned short ee_len = ext4_ext_get_actual_len(ex);
ext4_fsblk_t pblk;
int flags =... | 0 | [
"CWE-125"
] | linux | bc890a60247171294acc0bd67d211fa4b88d40ba | 75,877,366,740,730,750,000,000,000,000,000,000,000 | 98 | ext4: verify the depth of extent tree in ext4_find_extent()
If there is a corupted file system where the claimed depth of the
extent tree is -1, this can cause a massive buffer overrun leading to
sadness.
This addresses CVE-2018-10877.
https://bugzilla.kernel.org/show_bug.cgi?id=199417
Signed-off-by: Theodore Ts'o ... |
void luaD_call (lua_State *L, StkId func, int nresults) {
lua_CFunction f;
retry:
switch (ttypetag(s2v(func))) {
case LUA_VCCL: /* C closure */
f = clCvalue(s2v(func))->f;
goto Cfunc;
case LUA_VLCF: /* light C function */
f = fvalue(s2v(func));
Cfunc: {
int n; /* number of r... | 0 | [
"CWE-416",
"CWE-125",
"CWE-787"
] | lua | eb41999461b6f428186c55abd95f4ce1a76217d5 | 192,929,546,844,245,500,000,000,000,000,000,000,000 | 57 | Fixed bugs of stack reallocation x GC
Macro 'checkstackGC' was doing a GC step after resizing the stack;
the GC could shrink the stack and undo the resize. Moreover, macro
'checkstackp' also does a GC step, which could remove the preallocated
CallInfo when calling a function. (Its name has been changed to
'checkstackG... |
void setInUserManagementCommand(OperationContext*, bool) override {
UASSERT_NOT_IMPLEMENTED;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 243,727,338,032,180,800,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
Image *image,const char *format,int value,char *filename)
{
char
*q;
int
c;
MagickBooleanType
canonical;
register const char
*p;
ssize_t
field_width,
offset;
canonical=MagickFalse;
offset=0;
(void) Cop... | 0 | [
"CWE-665"
] | ImageMagick6 | 27b1c74979ac473a430e266ff6c4b645664bc805 | 200,168,357,255,689,360,000,000,000,000,000,000,000 | 129 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
box_ge(PG_FUNCTION_ARGS)
{
BOX *box1 = PG_GETARG_BOX_P(0);
BOX *box2 = PG_GETARG_BOX_P(1);
PG_RETURN_BOOL(FPge(box_ar(box1), box_ar(box2)));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 239,633,961,412,486,740,000,000,000,000,000,000,000 | 7 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static int usbredir_check_filter(USBRedirDevice *dev)
{
if (dev->interface_info.interface_count == NO_INTERFACE_INFO) {
ERROR("No interface info for device\n");
goto error;
}
if (dev->filter_rules) {
if (!usbredirparser_peer_has_cap(dev->parser,
u... | 0 | [
"CWE-770"
] | qemu | 7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986 | 80,532,808,634,938,290,000,000,000,000,000,000,000 | 39 | usb/redir: avoid dynamic stack allocation (CVE-2021-3527)
Use autofree heap allocation instead.
Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id:... |
xmlXPathFreeObjectEntry(void *obj, const xmlChar *name ATTRIBUTE_UNUSED) {
xmlXPathFreeObject((xmlXPathObjectPtr) obj);
} | 0 | [
"CWE-476"
] | libxml2 | a436374994c47b12d5de1b8b1d191a098fa23594 | 273,847,808,189,179,200,000,000,000,000,000,000,000 | 3 | Fix nullptr deref with XPath logic ops
If the XPath stack is corrupted, for example by a misbehaving extension
function, the "and" and "or" XPath operators could dereference NULL
pointers. Check that the XPath stack isn't empty and optimize the
logic operators slightly.
Closes: https://gitlab.gnome.org/GNOME/libxml2/... |
static inline unsigned int level_to_offset_bits(int level)
{
return (level - 1) * LEVEL_STRIDE;
} | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 34,672,167,626,244,494,000,000,000,000,000,000,000 | 4 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
static void Ins_PUSHW( INS_ARG )
{
Int L, K;
L = CUR.opcode - 0xB8 + 1;
if ( BOUNDS( L, CUR.stackSize+1-CUR.top ) )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
CUR.IP++;
for ( K = 0; K < L; K++ )
{ args[K] = GET_ShortIns();
DBG_PRINT1(" %d", args[K]);
... | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 204,595,265,460,401,300,000,000,000,000,000,000,000 | 21 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static Image *ReadOneJNGImage(MngInfo *mng_info,
const ImageInfo *image_info, ExceptionInfo *exception)
{
Image
*alpha_image,
*color_image,
*image,
*jng_image;
ImageInfo
*alpha_image_info,
*color_image_info;
MagickBooleanType
logging;
ssize_t
y;
MagickBooleanType
st... | 1 | [
"CWE-703",
"CWE-770"
] | ImageMagick | d9ccd8227c4c88a907cda5278408b73552cb0c07 | 53,698,818,751,833,550,000,000,000,000,000,000,000 | 703 | https://github.com/ImageMagick/ImageMagick/issues/549 |
void LinkResolver::check_method_loader_constraints(const LinkInfo& link_info,
const methodHandle& resolved_method,
const char* method_type, TRAPS) {
Handle current_loader(THREAD, link_info.current_klass()->class_load... | 0 | [] | jdk11u | 132745902a4601dc64b2c8ca112ca30292feccb4 | 80,979,245,817,629,680,000,000,000,000,000,000,000 | 34 | 8281866: Enhance MethodHandle invocations
Reviewed-by: mbaesken
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event,
u32 flags, int family,
const struct nft_table *table,
const struct nft_chain *chain,
const struct nft_rule *rule)
{
struct nlmsghdr *nlh;
struct nfgenmsg *nfmsg;
const str... | 0 | [
"CWE-19"
] | nf | a2f18db0c68fec96631c10cad9384c196e9008ac | 283,435,986,978,942,900,000,000,000,000,000,000,000 | 61 | netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896... |
static void record_gencode(GVJ_t * job, node_t * n)
{
obj_state_t *obj = job->obj;
boxf BF;
pointf AF[4];
int style;
field_t *f;
int doMap = (obj->url || obj->explicit_tooltip);
int filled;
char* clrs[2];
f = (field_t *) ND_shape_info(n);
BF = f->b;
BF.LL.x += ND_coord(n).x;... | 0 | [
"CWE-120"
] | graphviz | 784411ca3655c80da0f6025ab20634b2a6ff696b | 106,290,922,092,576,340,000,000,000,000,000,000,000 | 73 | fix: out-of-bounds write on invalid label
When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to... |
explicit RuntimeShape(int dimensions_count) : size_(dimensions_count) {
if (dimensions_count > kMaxSmallSize) {
#ifdef TF_LITE_STATIC_MEMORY
TFLITE_CHECK(false && "No shape resizing supported on this platform");
#else // TF_LITE_STATIC_MEMORY
dims_pointer_ = new int32_t[dimensions_count];
#endif // ... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 282,795,503,681,900,800,000,000,000,000,000,000,000 | 9 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
void alignment_exception(struct pt_regs *regs)
{
int fixed = 0;
/* we don't implement logging of alignment exceptions */
if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS))
fixed = fix_alignment(regs);
if (fixed == 1) {
regs->nip += 4; /* skip over emulated instruction */
emulate_single_step(regs);
retu... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 6c4841c2b6c32a134f9f36e5e08857138cc12b10 | 101,685,457,108,144,580,000,000,000,000,000,000,000 | 25 | [POWERPC] Never panic when taking altivec exceptions from userspace
At the moment we rely on a cpu feature bit or a firmware property to
detect altivec. If we dont have either of these and the cpu does in fact
support altivec we can cause a panic from userspace.
It seems safer to always send a signal if we manage to ... |
TPM2B_ECC_PARAMETER_Marshal(TPM2B_ECC_PARAMETER *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += TPM2B_Marshal(&source->b, buffer, size);
return written;
} | 1 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 143,004,319,429,520,450,000,000,000,000,000,000,000 | 6 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
file_compare_by_mime_type (NautilusFile *file_a,
NautilusFile *file_b)
{
char *mime_type_a, *mime_type_b;
int ret;
mime_type_a = nautilus_file_get_mime_type (file_a);
mime_type_b = nautilus_file_get_mime_type (file_b);
ret = strcmp (mime_type_a, mime_type_b);
g_free... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 101,661,905,661,148,740,000,000,000,000,000,000,000 | 16 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t... | 1 | [
"CWE-476"
] | jasper | c4144a6fdb2660794136d1daaa80682ee40b138b | 88,965,041,268,641,220,000,000,000,000,000,000,000 | 385 | Fixes #268 (A Null Pointer dereference).
The JP2 decoder was not checking if a component number referenced by
a CDEF box was valid. This has now been fixed. A new test case
related to this bug has been added to the test suite as well. |
void xackCommand(client *c) {
streamCG *group = NULL;
robj *o = lookupKeyRead(c->db,c->argv[1]);
if (o) {
if (checkType(c,o,OBJ_STREAM)) return; /* Type error. */
group = streamLookupCG(o->ptr,c->argv[2]->ptr);
}
/* No key or group? Nothing to ack. */
if (o == NULL || group == N... | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 289,806,097,638,408,220,000,000,000,000,000,000,000 | 48 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
mono_image_build_metadata (MonoReflectionModuleBuilder *moduleb)
{
g_error ("This mono runtime was configured with --enable-minimal=reflection_emit_save, so saving of dynamic assemblies is not supported.");
} | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 278,387,093,806,461,950,000,000,000,000,000,000,000 | 4 | 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 |
GF_Err gf_isom_get_chapter(GF_ISOFile *movie, u32 trackNumber, u32 Index, u64 *chapter_time, const char **name)
{
GF_UserDataMap *map;
GF_ChapterListBox *lst;
GF_ChapterEntry *ce;
GF_UserDataBox *udta;
if (!movie || !movie->moov) return GF_BAD_PARAM;
udta = NULL;
if (trackNumber) {
GF_TrackBox *trak = gf_iso... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 329,519,403,657,565,520,000,000,000,000,000,000,000 | 32 | fixed #1706 |
inline uint8_t* WireFormatLite::WriteEnumToArray(
int field_number, const RepeatedField<int>& value, uint8_t* target) {
return WritePrimitiveToArray(field_number, value, WriteEnumToArray, target);
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 67,133,330,113,372,390,000,000,000,000,000,000,000 | 4 | Apply patch |
CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item)
{
if (array == NULL)
{
return;
}
add_item_to_array(array, create_reference(item, &global_hooks));
} | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 221,289,158,943,388,280,000,000,000,000,000,000,000 | 9 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size)
{
static iconv_t icv_utf16_to_local;
size_t ibl, obl;
char *pin, *pout;
// if not already open
if (!icv_utf16_to_local)
{
icv_utf16_to_local = iconv_open(g_codepage, WINDOWS_CODEPAGE);
if (icv_utf16_to_local == (iconv_t) - 1)
{
logger... | 1 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 130,065,328,684,911,340,000,000,000,000,000,000,000 | 57 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
if (iTask.do_retry) {
iTask.complete = 0;
goto retry;
} | 0 | [
"CWE-125"
] | qemu | ff0507c239a246fd7215b31c5658fc6a3ee1e4c5 | 197,856,860,502,898,050,000,000,000,000,000,000,000 | 4 | block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb
There is an overflow, the source 'datain.data[2]' is 100 bytes,
but the 'ss' is 252 bytes.This may cause a security issue because
we can access a lot of unrelated memory data.
The len for sbp copy data should take the minimum of mx_sb_len and
sb_len_wr, no... |
static int _zzip_fnmatch(char* pattern, char* string, int flags)
{
puts ("<zzip:mmapped:strcmp>");
return strcmp (pattern, string);
} | 0 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 280,797,853,570,639,100,000,000,000,000,000,000,000 | 5 | memdisk
(.) |
int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size)
{
AVCodecContext *avctx = h->avctx;
int ret;
if (!buf || size <= 0)
return -1;
if (buf[0] == 1) {
int i, cnt, nalsize;
const unsigned char *p = buf;
h->is_avc = 1;
if (size < 7) {
... | 0 | [
"CWE-703"
] | FFmpeg | e8714f6f93d1a32f4e4655209960afcf4c185214 | 208,714,526,255,838,800,000,000,000,000,000,000,000 | 61 | avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory
Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals,
int indent)
{
POLICYQUALINFO *qualinfo;
int i;
for (i = 0; i < sk_POLICYQUALINFO_num(quals); i++) {
qualinfo = sk_POLICYQUALINFO_value(quals, i);
switch (OBJ_obj2nid(qualinfo->pqualid)) {
... | 0 | [
"CWE-125"
] | openssl | 5f54e57406ca17731b9ade3afd561d3c652e07f2 | 303,267,815,811,594,070,000,000,000,000,000,000,000 | 28 | Fix POLICYINFO printing to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
{
char *str, *hint_charset = NULL;
int str_len, hint_charset_len = 0;
size_t new_len;
long flags = ENT_COMPAT;
char *replaced;
zend_bool double_encode = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls!b", &str, &str_len, &flags, ... | 1 | [
"CWE-190"
] | php-src | 0da8b8b801f9276359262f1ef8274c7812d3dfda | 297,086,773,833,989,500,000,000,000,000,000,000,000 | 16 | Fix bug #72135 - don't create strings with lengths outside int range |
static MemTxResult flatview_write(struct uc_struct *uc, FlatView *fv, hwaddr addr, MemTxAttrs attrs,
const void *buf, hwaddr len)
{
hwaddr l;
hwaddr addr1;
MemoryRegion *mr;
MemTxResult result = MEMTX_OK;
l = len;
mr = flatview_translate(uc, fv, addr, &addr1, &... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 272,498,938,430,625,000,000,000,000,000,000,000,000 | 15 | Fix crash when mapping a big memory and calling uc_close |
print_description(oid * objid, size_t objidlen, /* number of subidentifiers */
int width)
{
fprint_description(stdout, objid, objidlen, width);
} | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 207,551,884,603,735,300,000,000,000,000,000,000,000 | 5 | 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. |
htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, int val)
{
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, err... | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 101,017,555,805,966,620,000,000,000,000,000,000,000 | 14 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd)
{
struct page *page;
spin_lock(&mm->page_table_lock);
if (unlikely(!pmd_trans_huge(*pmd))) {
spin_unlock(&mm->page_table_lock);
return;
}
page = pmd_page(*pmd);
VM_BUG_ON(!page_count(page));
get_page(page);
spin_unlock(&mm->page_table_lock);
sp... | 0 | [
"CWE-399"
] | linux | 78f11a255749d09025f54d4e2df4fbcb031530e2 | 116,070,540,161,932,630,000,000,000,000,000,000,000 | 19 | mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups
The huge_memory.c THP page fault was allowed to run if vm_ops was null
(which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't
setup a special vma->vm_ops and it would fallback to regular anonymous
memory) but other THP logics weren't fully ac... |
static int auth_session_timeout_cb(CALLBACK_FRAME) {
pr_event_generate("core.timeout-session", NULL);
pr_response_send_async(R_421,
_("Session Timeout (%d seconds): closing control connection"),
TimeoutSession);
pr_log_pri(PR_LOG_INFO, "%s", "FTP session timed out, disconnected");
pr_session_disconnect... | 0 | [
"CWE-59",
"CWE-295"
] | proftpd | 349addc3be4fcdad9bd4ec01ad1ccd916c898ed8 | 223,077,762,070,557,460,000,000,000,000,000,000,000 | 13 | Walk the entire DefaultRoot path, checking for symlinks of any component,
when AllowChrootSymlinks is disabled. |
SYSCALL_DEFINE1(dup, unsigned int, fildes)
{
int ret = -EBADF;
struct file *file = fget_raw(fildes);
if (file) {
ret = get_unused_fd_flags(0);
if (ret >= 0)
fd_install(ret, file);
else
fput(file);
}
return ret;
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 127,827,932,866,121,660,000,000,000,000,000,000,000 | 14 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
handle_cyclelogs(CMD_Request *rx_message, CMD_Reply *tx_message)
{
LOG_CycleLogFiles();
tx_message->status = htons(STT_SUCCESS);
} | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 230,727,802,753,073,750,000,000,000,000,000,000,000 | 6 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
void __fastcall TSCPFileSystem::SCPSink(const UnicodeString TargetDir,
const UnicodeString FileName, const UnicodeString SourceDir,
const TCopyParamType * CopyParam, bool & Success,
TFileOperationProgressType * OperationProgress, int Params,
int Level)
{
struct
{
int SetTime;
TDateTime Modi... | 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 117,274,214,927,609,920,000,000,000,000,000,000,000 | 418 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
callbacks_drawingarea_button_release_event (GtkWidget *widget, GdkEventButton *event)
{
gint index;
if (event->type != GDK_BUTTON_RELEASE)
return TRUE;
switch (screen.state) {
case IN_MOVE:
screen.off_x = 0;
screen.off_y = 0;
render_refresh_rendered_image_on_screen ();
callbacks_switch_to_normal_tool_cu... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 95,407,436,775,169,880,000,000,000,000,000,000,000 | 74 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
static sector_t ext4_bmap(struct address_space *mapping, sector_t block)
{
struct inode *inode = mapping->host;
journal_t *journal;
int err;
if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY) &&
test_opt(inode->i_sb, DELALLOC)) {
/*
* With delalloc we want to sync the file
* so that we can make sure we al... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 27,651,122,334,551,000,000,000,000,000,000,000,000 | 48 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
const String *Item_param::query_val_str(THD *thd, String* str) const
{
switch (state) {
case INT_VALUE:
str->set_int(value.integer, unsigned_flag, &my_charset_bin);
break;
case REAL_VALUE:
str->set_real(value.real, NOT_FIXED_DEC, &my_charset_bin);
break;
case DECIMAL_VALUE:
if (my_decimal2st... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 171,745,154,972,431,660,000,000,000,000,000,000,000 | 49 | 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 FDrive *get_drv(FDCtrl *fdctrl, int unit)
{
switch (unit) {
case 0: return drv0(fdctrl);
case 1: return drv1(fdctrl);
#if MAX_FD == 4
case 2: return drv2(fdctrl);
case 3: return drv3(fdctrl);
#endif
default: return NULL;
}
} | 0 | [
"CWE-787"
] | qemu | defac5e2fbddf8423a354ff0454283a2115e1367 | 301,106,307,000,240,830,000,000,000,000,000,000,000 | 12 | hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)
Per the 82078 datasheet, if the end-of-track (EOT byte in
the FIFO) is more than the number of sectors per side, the
command is terminated unsuccessfully:
* 5.2.5 DATA TRANSFER TERMINATION
The 82078 supports terminal count explicitly through
the TC pin a... |
rdpdr_process(STREAM s)
{
uint32 handle;
uint16 vmin;
uint16 component;
uint16 pakid;
logger(Protocol, Debug, "rdpdr_process()");
/* hexdump(s->p, s->end - s->p); */
in_uint16(s, component);
in_uint16(s, pakid);
if (component == RDPDR_CTYP_CORE)
{
switch (pakid)
{
case PAKID_CORE_DEVICE_IOREQUEST:
... | 1 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 218,449,187,538,483,300,000,000,000,000,000,000,000 | 91 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static void put_bool(QEMUFile *f, void *pv, size_t size)
{
bool *v = pv;
qemu_put_byte(f, *v);
} | 0 | [
"CWE-119"
] | qemu | d2ef4b61fe6d33d2a5dcf100a9b9440de341ad62 | 59,690,819,704,541,190,000,000,000,000,000,000,000 | 5 | vmstate: fix buffer overflow in target-arm/machine.c
CVE-2013-4531
cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for
cpreg_vmstate_array_len will cause a buffer overflow.
VMSTATE_INT32_LE was supposed to protect against this
but doesn't because it doesn't validate that input is
non-negative.
Fix this ma... |
xmlNodePtr sdl_guess_convert_xml(encodeTypePtr enc, zval *data, int style, xmlNodePtr parent TSRMLS_DC)
{
sdlTypePtr type;
xmlNodePtr ret = NULL;
type = enc->sdl_type;
if (type == NULL) {
ret = guess_xml_convert(enc, data, style, parent TSRMLS_CC);
if (style == SOAP_ENCODED) {
set_ns_and_type(ret, enc);
... | 0 | [
"CWE-19"
] | php-src | c8eaca013a3922e8383def6158ece2b63f6ec483 | 202,053,214,338,819,400,000,000,000,000,000,000,000 | 71 | Added type checks |
static inline u32 open_file_to_av(struct file *file)
{
u32 av = file_to_av(file);
struct inode *inode = file_inode(file);
if (selinux_policycap_openperm() &&
inode->i_sb->s_magic != SOCKFS_MAGIC)
av |= FILE__OPEN;
return av;
} | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 33,876,285,257,426,896,000,000,000,000,000,000,000 | 11 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
BOOL ber_read_sequence_tag(wStream* s, int* length)
{
BYTE byte;
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
Stream_Read_UINT8(s, byte);
if (byte != ((BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_SEQUENCE_OF)))
return FALSE;
return ber_read_length(s, length);
} | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 131,980,344,560,456,220,000,000,000,000,000,000,000 | 13 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
TEST_F(GrpcHealthCheckerImplTest, GoAwayProbeInProgress) {
setupHCWithUnhealthyThreshold(/*threshold=*/1);
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
expectSessionCreate();
expectHealthcheckStart(0);
health_checker_->start();
... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 218,171,757,825,491,320,000,000,000,000,000,000,000 | 28 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
buffer_write (ProxySide *side,
Buffer *buffer,
GSocket *socket)
{
gssize res;
GOutputVector v;
GError *error = NULL;
GSocketControlMessage **messages = NULL;
int i, n_messages;
GList *l;
if (buffer->send_credentials &&
G_IS_UNIX_CONNECTION (side->connection))
{
... | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 175,179,869,176,747,270,000,000,000,000,000,000,000 | 73 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
struct mlx5e_tc_tunnel *mlx5e_get_tc_tun(struct net_device *tunnel_dev)
{
if (netif_is_vxlan(tunnel_dev))
return &vxlan_tunnel;
else if (netif_is_geneve(tunnel_dev))
return &geneve_tunnel;
else if (netif_is_gretap(tunnel_dev) ||
netif_is_ip6gretap(tunnel_dev))
return &gre_tunnel;
else
return NULL;
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 126,732,629,072,350,370,000,000,000,000,000,000,000 | 12 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
void bnxt_re_query_fw_str(struct ib_device *ibdev, char *str)
{
struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
snprintf(str, IB_FW_VERSION_NAME_MAX, "%d.%d.%d.%d",
rdev->dev_attr.fw_ver[0], rdev->dev_attr.fw_ver[1],
rdev->dev_attr.fw_ver[2], rdev->dev_attr.fw_ver[3]);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4a9d46a9fe14401f21df69cea97c62396d5fb053 | 15,539,887,246,250,818,000,000,000,000,000,000,000 | 8 | RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Si... |
stonith_walk_ghash(gpointer key, gpointer value, gpointer user_data)
{
StonithNVpair* u = user_data;
if (NVcur <= NVmax && !NVerr) {
u[NVcur].s_name = STRDUP(key);
u[NVcur].s_value = STRDUP(value);
if (u[NVcur].s_name == NULL || u[NVcur].s_value == NULL) {
/* Memory allocation error */
NVerr = TRUE;
... | 0 | [
"CWE-287"
] | cluster-glue | 3d7b464439ee0271da76e0ee9480f3dc14005879 | 259,854,901,508,300,170,000,000,000,000,000,000,000 | 17 | Medium: stonith: add -E option to get the configuration from the environment |
static int compat_prepare_timeout(const struct compat_timespec __user *p,
struct timespec *ts)
{
if (compat_get_timespec(ts, p))
return -EFAULT;
if (!timespec_valid(ts))
return -EINVAL;
return 0;
} | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 136,084,728,441,668,880,000,000,000,000,000,000,000 | 9 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
on_ps_internal(Point *pt, LSEG *lseg)
{
return FPeq(point_dt(pt, &lseg->p[0]) + point_dt(pt, &lseg->p[1]),
point_dt(&lseg->p[0], &lseg->p[1]));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 92,136,865,355,529,280,000,000,000,000,000,000,000 | 5 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
bool fieldsMatch(const BSONObj& lhs, const BSONObj& rhs) {
BSONObjIterator l(lhs);
BSONObjIterator r(rhs);
while (l.more() && r.more()){
if (strcmp(l.next().fieldName(), r.next().fieldName())) {
return false;
}
}
return !(l.more() || ... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 109,474,378,398,345,620,000,000,000,000,000,000,000 | 12 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
ReadVariableOp::ReadVariableOp(OpKernelConstruction* c) : OpKernel(c) {
OP_REQUIRES_OK(c, c->GetAttr("dtype", &dtype_));
} | 0 | [
"CWE-369"
] | tensorflow | ac117ee8a8ea57b73d34665cdf00ef3303bc0b11 | 244,900,267,295,678,900,000,000,000,000,000,000,000 | 3 | Prevent division by 0 in `resource_variable_ops.cc`
PiperOrigin-RevId: 387939939
Change-Id: Ib04902d63756633999959a70613f2eaa30c2c151 |
void CServer::ConStatus(IConsole::IResult *pResult, void *pUser)
{
char aBuf[1024];
char aAddrStr[NETADDR_MAXSTRSIZE];
CServer* pThis = static_cast<CServer *>(pUser);
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(pThis->m_aClients[i].m_State != CClient::STATE_EMPTY)
{
net_addr_str(pThis->m_NetServer.ClientAddr... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | teeworlds | c68402fa7e279d42886d5951d1ea8ac2facc1ea5 | 163,629,336,651,462,830,000,000,000,000,000,000,000 | 24 | changed a check |
cr_tknzr_parse_nl (CRTknzr * a_this,
guchar ** a_start,
guchar ** a_end,
CRParsingLocation *a_location)
{
CRInputPos init_pos;
guchar next_chars[2] = { 0 };
enum CRStatus status = CR_PARSING_ERROR;
g_return_val_if_fail (a_this ... | 0 | [
"CWE-119"
] | libcroco | 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 | 8,501,280,982,556,379,000,000,000,000,000,000,000 | 48 | tknzr: support only max long rgb values
This fixes a possible out of bound when reading rgbs which
are longer than the support MAXLONG |
xf86SetVerbosity(int verb)
{
int save = xf86Verbose;
xf86Verbose = verb;
LogSetParameter(XLOG_VERBOSITY, verb);
return save;
} | 0 | [] | xserver | 032b1d79b7d04d47814a5b3a9fdd162249fea74c | 126,598,753,809,237,900,000,000,000,000,000,000,000 | 8 | xfree86: use the xf86CheckPrivs() helper for modulepath/logfile
v2: Rebase against updated xf86CheckPrivs() helper.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> |
print_addr_act(YAFFSFS_INFO * /*fs_file*/, TSK_OFF_T /*a_off*/,
TSK_DADDR_T addr, char * /*buf*/, size_t /*size*/,
TSK_FS_BLOCK_FLAG_ENUM flags, void *a_ptr)
{
YAFFSFS_PRINT_ADDR *print = (YAFFSFS_PRINT_ADDR *) a_ptr;
if (flags & TSK_FS_BLOCK_FLAG_CONT) {
tsk_fprintf(print->hFile, "%" PRIuD... | 0 | [
"CWE-125",
"CWE-787"
] | sleuthkit | 459ae818fc8dae717549810150de4d191ce158f1 | 189,621,870,566,725,060,000,000,000,000,000,000,000 | 17 | Fix stack buffer overflow in yaffsfs_istat
Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str. |
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) {
xmlDocPtr doc = NULL;
if (reader == NULL)
return(NULL);
if (reader->doc != NULL)
doc = reader->doc;
else if (reader->ctxt != NULL)
doc = reader->ctxt->myDoc;
if (doc == NULL)
return(NULL);
if (doc->version == NULL)
return(NULL)... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 44,323,685,228,383,220,000,000,000,000,000,000,000 | 16 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
static bool list_intersect(struct ldb_kv_private *ldb_kv,
struct dn_list *list,
const struct dn_list *list2)
{
const struct dn_list *short_list, *long_list;
struct dn_list *list3;
unsigned int i;
if (list->count == 0) {
/* 0 & X == 0 */
return true;
}
if (list2->count == 0) {
/* X & 0 == 0 */
... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 171,827,172,238,363,630,000,000,000,000,000,000,000 | 82 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
vte_sequence_handler_local_charset (VteTerminal *terminal, GValueArray *params)
{
G_CONST_RETURN char *locale_encoding;
g_get_charset(&locale_encoding);
vte_terminal_set_encoding(terminal, locale_encoding);
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 238,377,566,791,939,800,000,000,000,000,000,000,000 | 6 | fix bug #548272
svn path=/trunk/; revision=2365 |
static int vmx_get_msr_feature(struct kvm_msr_entry *msr)
{
switch (msr->index) {
case MSR_IA32_VMX_BASIC ... MSR_IA32_VMX_VMFUNC:
if (!nested)
return 1;
return vmx_get_vmx_msr(&vmcs_config.nested, msr->index, &msr->data);
case MSR_IA32_PERF_CAPABILITIES:
msr->data = vmx_get_perf_capabilities();
return 0;... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 166,324,062,831,808,450,000,000,000,000,000,000,000 | 14 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
void btrt_box_del(GF_Box *s)
{
GF_BitRateBox *ptr = (GF_BitRateBox *)s;
if (ptr) gf_free(ptr);
} | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 331,951,551,577,767,470,000,000,000,000,000,000,000 | 5 | fixed #1785 (fuzz) |
XStoreName (
register Display *dpy,
Window w,
_Xconst char *name)
{
if (strlen(name) >= USHRT_MAX)
return 0;
return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, /* */
8, PropModeReplace, (_Xconst unsigned char *)name,
name ? (int) strlen(name) : 0);
} | 0 | [
"CWE-120"
] | libx11 | 8d2e02ae650f00c4a53deb625211a0527126c605 | 232,406,707,756,752,440,000,000,000,000,000,000,000 | 11 | Reject string longer than USHRT_MAX before sending them on the wire
The X protocol uses CARD16 values to represent the length so
this would overflow.
CVE-2021-31535
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
void oidc_util_hdr_in_set(const request_rec *r, const char *name,
const char *value) {
oidc_util_hdr_table_set(r, r->headers_in, name, value);
} | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 229,902,656,091,124,400,000,000,000,000,000,000,000 | 4 | Add a function to escape Javascript characters |
static int selinux_binder_transfer_binder(struct task_struct *from,
struct task_struct *to)
{
u32 fromsid = task_sid(from);
u32 tosid = task_sid(to);
return avc_has_perm(fromsid, tosid, SECCLASS_BINDER, BINDER__TRANSFER,
NULL);
} | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 245,121,100,587,506,270,000,000,000,000,000,000,000 | 9 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
static int vm_stat_get(void *_offset, u64 *val)
{
unsigned offset = (long)_offset;
struct kvm *kvm;
struct kvm_stat_data stat_tmp = {.offset = offset};
u64 tmp_val;
*val = 0;
spin_lock(&kvm_lock);
list_for_each_entry(kvm, &vm_list, vm_list) {
stat_tmp.kvm = kvm;
vm_stat_get_per_vm((void *)&stat_tmp, &tmp_va... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cfa39381173d5f969daf43582c95ad679189cbc9 | 242,717,017,845,742,500,000,000,000,000,000,000,000 | 17 | kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device t... |
njs_generate_function_expression(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_variable_t *var;
njs_function_lambda_t *lambda;
njs_vmcode_function_t *function;
const njs_lexer_entry_t *lex_entry;
var = njs_variable_re... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 168,953,969,585,953,270,000,000,000,000,000,000,000 | 46 | 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... |
_zip_write4(unsigned int i, FILE *fp)
{
putc(i&0xff, fp);
putc((i>>8)&0xff, fp);
putc((i>>16)&0xff, fp);
putc((i>>24)&0xff, fp);
return;
} | 0 | [
"CWE-189"
] | php-src | ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5 | 297,860,594,152,016,460,000,000,000,000,000,000,000 | 9 | Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary |
static int rtrs_rdma_conn_rejected(struct rtrs_clt_con *con,
struct rdma_cm_event *ev)
{
struct rtrs_path *s = con->c.path;
const struct rtrs_msg_conn_rsp *msg;
const char *rej_msg;
int status, errno;
u8 data_len;
status = ev->status;
rej_msg = rdma_reject_msg(con->c.cm_id, status);
msg = rdma_consumer... | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 338,997,142,319,541,360,000,000,000,000,000,000,000 | 30 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
static int ntop_get_interface_host_activitymap(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
char *host_ip;
GenericHost *h;
u_int16_t vlan_id = 0;
char buf[64];
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(!ntop_interface) return(CONST_LUA_ER... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 169,958,788,991,656,050,000,000,000,000,000,000,000 | 32 | Security fix: prevents empty host from being used |
switch (recv_into_rbuf (h)) {
case -1: SET_NEXT_STATE (%.DEAD); return 0;
case 1:
save_reply_state (h);
SET_NEXT_STATE (%.READY);
return 0;
case 0:
length = be32toh (h->sbuf.sr.structured_reply.length);
offset = be64toh (h->sbuf.sr.payload.offset_data.offset);
assert (cmd); /* guarantee... | 0 | [] | libnbd | 2c1987fc23d6d0f537edc6d4701e95a2387f7917 | 135,021,046,535,239,000,000,000,000,000,000,000,000 | 31 | lib: Fix stack corruption with structured reply containing negative offset.
Because of improper bounds checking, when receiving a structured reply
some offset/lengths sent by the server could cause libnbd to execute
arbitrary code under control of a malicious server.
A structured reply segment containing (for example... |
TEST_F(OAuth2Test, CookieValidatorInvalidExpiresAt) {
Http::TestRequestHeaderMapImpl request_headers{
{Http::Headers::get().Host.get(), "traffic.example.com"},
{Http::Headers::get().Path.get(), "/anypath"},
{Http::Headers::get().Method.get(), Http::Headers::get().MethodValues.Get},
{Http::Head... | 0 | [
"CWE-416"
] | envoy | 7ffda4e809dec74449ebc330cebb9d2f4ab61360 | 282,485,540,523,781,750,000,000,000,000,000,000,000 | 21 | oauth2: do not blindly accept requests with a token in the Authorization headera (781)
The logic was broken because it assumed an additional call would be
performed to the auth server, which isn't the case. Per the filter
documentation, a request is only considered subsequently authenticated
if there's valid cookie th... |
static int decode_fsinfo(struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo)
{
__be32 *savep;
uint32_t attrlen, bitmap[2];
int status;
if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
goto xdr_error;
if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
goto xdr_error;
if ((status = decode_attr_length(xdr, ... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 140,593,477,416,635,140,000,000,000,000,000,000,000 | 31 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int snd_seq_queue_timer_open(int queueid)
{
int result = 0;
struct snd_seq_queue *queue;
struct snd_seq_timer *tmr;
queue = queueptr(queueid);
if (queue == NULL)
return -EINVAL;
tmr = queue->timer;
if ((result = snd_seq_timer_open(queue)) < 0) {
snd_seq_timer_defaults(tmr);
result = snd_seq_timer_open(que... | 0 | [
"CWE-362"
] | linux | 3567eb6af614dac436c4b16a8d426f9faed639b3 | 240,927,041,901,921,000,000,000,000,000,000,000,000 | 17 | ALSA: seq: Fix race at timer setup and close
ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client. This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.
This patch papers over it by adding a proper queue->timer_mutex lock
around the timer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.