func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void spl_dllist_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
spl_dllist_it *iterator = (spl_dllist_it *)iter;
spl_dllist_object *object = iterator->object;
zend_user_it_invalidate_current(iter TSRMLS_CC);
spl_dllist_it_helper_move_forward(&iterator->traverse_pointer, &iterator->t... | 0 | [] | php-src | df78c48354f376cf419d7a97f88ca07d572f00fb | 311,833,020,735,894,570,000,000,000,000,000,000,000 | 9 | Fixed Bug #67538 (SPL Iterators use-after-free) |
static MagickBooleanType WriteAVSImage(const ImageInfo *image_info,Image *image)
{
MagickBooleanType
status;
MagickOffsetType
scene;
MemoryInfo
*pixel_info;
register const PixelPacket
*magick_restrict p;
register ssize_t
x;
register unsigned char
*magick_restrict q;
size_t
... | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 50,716,616,096,828,330,000,000,000,000,000,000,000 | 99 | Fix ultra rare but potential memory-leak |
ssh_string sftp_handle_alloc(sftp_session sftp, void *info) {
ssh_string ret;
uint32_t val;
uint32_t i;
if (sftp->handles == NULL) {
sftp->handles = calloc(SFTP_HANDLES, sizeof(void *));
if (sftp->handles == NULL) {
return NULL;
}
}
for (i = 0; i < SFTP_HANDLES; i++) {
if (sftp->hand... | 0 | [
"CWE-476"
] | libssh-mirror | 533d881b0f4b24c72b35ecc97fa35d295d063e53 | 295,677,979,778,642,800,000,000,000,000,000,000,000 | 33 | sftpserver: Add missing NULL check for ssh_buffer_new()
Thanks to Ramin Farajpour Cami for spotting this.
Fixes T232
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com> |
RZ_API RzAnalysisVarAccess *rz_analysis_var_get_access_at(RzAnalysisVar *var, ut64 addr) {
rz_return_val_if_fail(var, NULL);
st64 offset = (st64)addr - (st64)var->fcn->addr;
size_t index;
rz_vector_lower_bound(&var->accesses, offset, index, ACCESS_CMP);
if (index >= var->accesses.len) {
return NULL;
}
RzAnalys... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 71,118,715,250,549,675,000,000,000,000,000,000,000 | 14 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
HttpDownstreamConnection::get_downstream_addr_group() const {
return group_;
} | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 168,284,666,782,431,830,000,000,000,000,000,000,000 | 3 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
int sm_looptest_inject_packets(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) {
fm_mgr_config_errno_t res;
fm_msg_ret_code_t ret_code;
int numpkts=1;
uint8_t data[BUF_SZ];
if (argc > 1) {
printf("Error: only 1 argument expected\n");
return 0;
}
if (argc == 1) {
... | 0 | [
"CWE-362"
] | opa-fm | c5759e7b76f5bf844be6c6641cc1b356bbc83869 | 115,722,774,778,282,730,000,000,000,000,000,000,000 | 32 | Fix scripts and code that use well-known tmp files. |
static inline void ModulateLCHuv(const double percent_luma,
const double percent_chroma,const double percent_hue,double *red,
double *green,double *blue)
{
double
hue,
luma,
chroma;
/*
Increase or decrease color luma, chroma, or hue.
*/
ConvertRGBToLCHuv(*red,*green,*blue,&luma,&chroma,&hue... | 0 | [
"CWE-835"
] | ImageMagick | a80ee0ee1a083b4991d12ed4c07b7c7c5890f329 | 14,851,568,510,916,833,000,000,000,000,000,000,000 | 18 | https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506 |
_dbus_connect_tcp_socket (const char *host,
const char *port,
const char *family,
DBusError *error)
{
return _dbus_connect_tcp_socket_with_nonce (host, port, family, (const char*)NULL, error);
} | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 123,553,184,642,431,420,000,000,000,000,000,000,000 | 7 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
void opj_pi_create_encode(opj_pi_iterator_t *pi,
opj_cp_t *cp,
OPJ_UINT32 tileno,
OPJ_UINT32 pino,
OPJ_UINT32 tpnum,
OPJ_INT32 tppos,
J2K_T2_MODE t2_mode)
{
con... | 0 | [
"CWE-122"
] | openjpeg | 00383e162ae2f8fc951f5745bf1011771acb8dce | 336,195,326,249,497,630,000,000,000,000,000,000,000 | 262 | pi.c: avoid out of bounds access with POC (refs https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-737122836) |
gnutls_server_name_set (gnutls_session_t session,
gnutls_server_name_type_t type,
const void *name, size_t name_length)
{
int server_names;
if (session->security_parameters.entity == GNUTLS_SERVER)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
if (name_length > MAX_SERVER_NAME... | 0 | [
"CWE-189"
] | gnutls | bc8102405fda11ea00ca3b42acc4f4bce9d6e97b | 160,352,823,076,257,300,000,000,000,000,000,000,000 | 33 | Fix GNUTLS-SA-2008-1 security vulnerabilities.
See http://www.gnu.org/software/gnutls/security.html for updates. |
static inline void io_commit_cqring(struct io_ring_ctx *ctx)
{
/* order cqe stores with ring update */
smp_store_release(&ctx->rings->cq.tail, ctx->cached_cq_tail);
} | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 101,497,004,819,954,720,000,000,000,000,000,000,000 | 5 | 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 void unregister_ftrace_profiler(void)
{
unregister_ftrace_graph();
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 58,582,749,220,023,810,000,000,000,000,000,000,000 | 4 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static void npidentifier_cache_reserve(int n_entries)
{
if (G_UNLIKELY(g_npidentifier_cache == NULL))
npidentifier_cache_create();
if (g_hash_table_size(g_npidentifier_cache) + n_entries > NPIDENTIFIER_CACHE_SIZE)
npidentifier_cache_invalidate();
} | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 89,488,469,594,559,690,000,000,000,000,000,000,000 | 7 | Support all the new variables added |
void dcn20_set_mcif_arb_params(
struct dc *dc,
struct dc_state *context,
display_e2e_pipe_params_st *pipes,
int pipe_cnt)
{
enum mmhubbub_wbif_mode wbif_mode;
struct mcif_arb_params *wb_arb_params;
int i, j, k, dwb_pipe;
/* Writeback MCIF_WB arbitration parameters */
dwb_pipe = 0;
for (i = 0; i < dc->res... | 0 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | 055e547478a11a6360c7ce05e2afc3e366968a12 | 26,260,762,493,272,830,000,000,000,000,000,000,000 | 52 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
static void mxf_read_random_index_pack(AVFormatContext *s)
{
MXFContext *mxf = s->priv_data;
uint32_t length;
int64_t file_size;
KLVPacket klv;
if (!s->pb->seekable)
return;
file_size = avio_size(s->pb);
avio_seek(s->pb, file_size - 4, SEEK_SET);
length = avio_rb32(s->pb);
... | 0 | [
"CWE-703"
] | FFmpeg | f173cdfe669556aa92857adafe60cbe5f2aa1210 | 234,564,520,911,087,800,000,000,000,000,000,000,000 | 27 | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c... |
static int check_func_arg(struct verifier_env *env, u32 regno,
enum bpf_arg_type arg_type, struct bpf_map **mapp)
{
struct reg_state *reg = env->cur_state.regs + regno;
enum bpf_reg_type expected_type;
int err = 0;
if (arg_type == ARG_DONTCARE)
return 0;
if (reg->type == NOT_INIT) {
verbose("R%d !read_o... | 0 | [
"CWE-200"
] | linux | a1b14d27ed0965838350f1377ff97c93ee383492 | 89,824,097,528,824,090,000,000,000,000,000,000,000 | 89 | bpf: fix branch offset adjustment on backjumps after patching ctx expansion
When ctx access is used, the kernel often needs to expand/rewrite
instructions, so after that patching, branch offsets have to be
adjusted for both forward and backward jumps in the new eBPF program,
but for backward jumps it fails to account ... |
static BOOL _update_end_paint(rdpContext* context)
{
wStream* s;
int headerLength;
rdpUpdate* update = context->update;
if (!update->us)
return FALSE;
s = update->us;
headerLength = Stream_Length(s);
Stream_SealLength(s);
Stream_SetPosition(s, headerLength);
Stream_Write_UINT16(s, update->numberOrders); /*... | 0 | [
"CWE-125"
] | FreeRDP | f8890a645c221823ac133dbf991f8a65ae50d637 | 139,949,635,097,751,810,000,000,000,000,000,000,000 | 28 | Fixed #6005: Bounds checks in update_read_bitmap_data |
std::string PsdImage::mimeType() const
{
return "image/x-photoshop";
} | 0 | [
"CWE-125"
] | exiv2 | 68966932510213b5656fcf433ab6d7e26f48e23b | 79,440,017,244,697,030,000,000,000,000,000,000,000 | 4 | PSD: Use Safe::add for preventing overflows in PSD files |
int set_compat_user_sigmask(const compat_sigset_t __user *umask,
size_t sigsetsize)
{
sigset_t kmask;
if (!umask)
return 0;
if (sigsetsize != sizeof(compat_sigset_t))
return -EINVAL;
if (get_compat_sigset(&kmask, umask))
return -EFAULT;
set_restore_sigmask();
current->saved_sigmask = current->block... | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 293,287,819,023,682,360,000,000,000,000,000,000,000 | 18 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
void ssl_set_sig_mask(uint32_t *pmask_a, SSL *s, int op)
{
const uint16_t *sigalgs;
size_t i, sigalgslen;
uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
/*
* Go through all signature algorithms seeing if we support any
* in disabled_mask.
*/
sigalgslen = tls12_get_psigalgs... | 0 | [
"CWE-476"
] | openssl | 5235ef44b93306a14d0b6c695b13c64b16e1fdec | 152,322,050,514,550,960,000,000,000,000,000,000,000 | 28 | Fix SSL_check_chain()
The function SSL_check_chain() can be used by applications to check that
a cert and chain is compatible with the negotiated parameters. This could
be useful (for example) from the certificate callback. Unfortunately this
function was applying TLSv1.2 sig algs rules and did not work correctly if
T... |
ext4_ext_binsearch_idx(struct inode *inode,
struct ext4_ext_path *path, ext4_lblk_t block)
{
struct ext4_extent_header *eh = path->p_hdr;
struct ext4_extent_idx *r, *l, *m;
ext_debug("binsearch for %u(idx): ", block);
l = EXT_FIRST_INDEX(eh) + 1;
r = EXT_LAST_INDEX(eh);
while (l <= r) {
m = l + (r - l) /... | 0 | [
"CWE-703"
] | linux | 667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3 | 128,850,462,411,066,600,000,000,000,000,000,000,000 | 53 | ext4: reimplement convert and split_unwritten
Reimplement ext4_ext_convert_to_initialized() and
ext4_split_unwritten_extents() using ext4_split_extent()
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Allison Henderson <achender@linux.vnet.ibm.com> |
static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid)
{
struct kvm_lapic_irq lapic_irq;
lapic_irq.shorthand = 0;
lapic_irq.dest_mode = 0;
lapic_irq.dest_id = apicid;
lapic_irq.msi_redir_hint = false;
lapic_irq.delivery_mode = APIC_DM_REMRD;
kvm_irq_delivery_to_apic(kvm, NULL, &lapic_... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 214,326,369,225,203,700,000,000,000,000,000,000,000 | 12 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
virtual const char *full_name() const { return orig_item->full_name(); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 170,513,571,587,900,070,000,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.... |
DEFUN (clear_ip_bgp_as_in_prefix_filter,
clear_ip_bgp_as_in_prefix_filter_cmd,
"clear ip bgp <1-65535> in prefix-filter",
CLEAR_STR
IP_STR
BGP_STR
"Clear peers with the AS number\n"
"Soft reconfig inbound update\n"
"Push out prefix-list ORF and do inbound soft rec... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 146,343,147,534,538,690,000,000,000,000,000,000,000 | 13 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
xsltDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlXPathObjectPtr obj, obj2 = NULL;
xmlChar *base = NULL, *URI;
if ((nargs < 1) || (nargs > 2)) {
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
"document() : invalid number of args %d\n",... | 0 | [] | libxslt | 6c99c519d97e5fcbec7a9537d190efb442e4e833 | 80,184,401,665,422,340,000,000,000,000,000,000,000 | 124 | Crash when passing an uninitialized variable to document()
https://bugzilla.gnome.org/show_bug.cgi?id=685330
Missing check for NULL |
vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
int main_fd __rte_unused)
{
uint64_t mmap_size, mmap_offset;
uint16_t num_queues, queue_size;
uint32_t pervq_inflight_size;
struct virtio_net *dev = *pdev;
void *addr;
int fd;
fd = msg->fds[0];
if (msg->size != sizeof(msg->payload.in... | 0 | [
"CWE-190"
] | dpdk | d87f1a1cb7b666550bb53e39c1d85d9f7b861e6f | 328,443,881,395,130,740,000,000,000,000,000,000,000 | 71 | vhost: support inflight info sharing
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD
and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared
buffer between qemu and backend.
Signed-off-by: Lin Li <lilin24@baidu.com>
Signed-off-by: Xun Ni <nixun@baidu.com>
Signed-off-by: Yu Zhang <zhangyu31@b... |
bool operator<(const LowerCaseString& rhs) const { return string_.compare(rhs.string_) < 0; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 67,723,094,051,795,470,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
GetStringPlatformLength(JNIEnv* env, jstring instr, jint* outlen, const char* encoding)
{
jint result;
preloadLibraries();
Trc_SC_GetStringPlatformLength_Entry(env, instr, outlen, encoding);
result = globalGetStringPlatformLength(env, instr, outlen, encoding);
Trc_SC_GetStringPlatformLength_Exit(env, result, *ou... | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 239,142,743,991,338,750,000,000,000,000,000,000,000 | 12 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
vpn_connection_state_changed (NMVPNConnection *vpn,
NMVPNConnectionState state,
NMVPNConnectionStateReason reason,
gpointer user_data)
{
NMApplet *applet = NM_APPLET (user_data);
NMConnection *connection;
const char *banner;
c... | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 91,445,466,359,398,130,000,000,000,000,000,000,000 | 65 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
TEE_Result syscall_cryp_obj_close(unsigned long obj)
{
TEE_Result res;
struct tee_ta_session *sess;
struct tee_obj *o;
res = tee_ta_get_current_session(&sess);
if (res != TEE_SUCCESS)
return res;
res = tee_obj_get(to_user_ta_ctx(sess->ctx),
tee_svc_uref_to_vaddr(obj), &o);
if (res != TEE_SUCCESS)
retu... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | a637243270fc1faae16de059091795c32d86e65e | 147,572,001,774,779,480,000,000,000,000,000,000,000 | 25 | svc: check for allocation overflow in crypto calls
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that it might
lead to a heap based overflow with attacker controlled data written
outside the boundaries of the buffer.
Fixes: OP-TEE-2018-... |
find_key_data(Repodata *data, Id solvid, Id keyname, Repokey **keypp)
{
unsigned char *dp;
Id schema, *keyp, *kp;
Repokey *key;
if (!maybe_load_repodata(data, keyname))
return 0;
dp = solvid2data(data, solvid, &schema);
if (!dp)
return 0;
keyp = data->schemadata + data->schemata[schema];
for (k... | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 81,556,527,123,133,500,000,000,000,000,000,000,000 | 29 | 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> |
static void _DESTRUCTOR lib_deinit(void)
{
const char *e;
if (_gnutls_global_init_skip() != 0)
return;
e = secure_getenv("GNUTLS_NO_EXPLICIT_INIT");
if (e != NULL) {
int ret = atoi(e);
if (ret == 1)
return;
}
_gnutls_global_deinit(1);
} | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 119,880,023,233,065,800,000,000,000,000,000,000,000 | 16 | env: use secure_getenv when reading environment variables |
struct curl_llist *Curl_multi_pipelining_site_bl(struct Curl_multi *multi)
{
return multi->pipelining_site_bl;
} | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 134,079,111,770,588,150,000,000,000,000,000,000,000 | 4 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
conn_key_extract(struct conntrack *ct, struct dp_packet *pkt, ovs_be16 dl_type,
struct conn_lookup_ctx *ctx, uint16_t zone)
{
const struct eth_header *l2 = dp_packet_eth(pkt);
const struct ip_header *l3 = dp_packet_l3(pkt);
const char *l4 = dp_packet_l4(pkt);
memset(ctx, 0, sizeof *ctx... | 0 | [
"CWE-400"
] | ovs | 48ceca0446b1c2c2c03e7551048c5b19ed23cc97 | 273,902,625,080,308,250,000,000,000,000,000,000,000 | 81 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
uint cursor_rowtype_offset() const
{
return m_cursor_rowtype_offset;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 21,534,441,919,140,970,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
slapi_config_register_callback(int operation,
int flags,
const char *base,
int scope,
const char *filter,
dseCallbackFn fn,
void *fn_a... | 0 | [
"CWE-200",
"CWE-203"
] | 389-ds-base | b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32 | 259,692,758,822,115,660,000,000,000,000,000,000,000 | 10 | Issue 4609 - CVE - info disclosure when authenticating
Description: If you bind as a user that does not exist. Error 49 is returned
instead of error 32. As error 32 discloses that the entry does
not exist. When you bind as an entry that does not have userpassword
set then ... |
static int v9fs_test_new_inode_dotl(struct inode *inode, void *data)
{
return 0;
} | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 289,375,650,431,727,700,000,000,000,000,000,000,000 | 4 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
GF_Err dref_Size(GF_Box *s)
{
GF_DataReferenceBox *ptr = (GF_DataReferenceBox *)s;
if (!s) return GF_BAD_PARAM;
ptr->size += 4;
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 45,118,670,074,934,660,000,000,000,000,000,000,000 | 8 | prevent dref memleak on invalid input (#1183) |
DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
{
(void) buf;
(void) cc;
(void) s;
TIFFErrorExt(tif->tif_clientdata, "TIFFReadScanline",
"scanline oriented access is not supported for downsampled JPEG compressed images, consider enabling TIFF_JPEGCOLORMODE as JPEGCOLORMOD... | 0 | [
"CWE-369"
] | libtiff | 47f2fb61a3a64667bce1a8398a8fcb1b348ff122 | 204,574,171,348,840,960,000,000,000,000,000,000,000 | 11 | * libtiff/tif_jpeg.c: avoid integer division by zero in
JPEGSetupEncode() when horizontal or vertical sampling is set to 0.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 |
static VALUE read_memory(VALUE klass, VALUE content)
{
xmlSchemaPtr schema;
xmlSchemaParserCtxtPtr ctx = xmlSchemaNewMemParserCtxt(
(const char *)StringValuePtr(content),
(int)RSTRING_LEN(content)
);
VALUE rb_schema;
VALUE errors = rb_ary_new();
xmlSetStructuredErrorFunc((void *)errors, Nokogiri... | 1 | [
"CWE-611",
"CWE-703"
] | nokogiri | 9c87439d9afa14a365ff13e73adc809cb2c3d97b | 154,902,691,343,962,340,000,000,000,000,000,000,000 | 39 | feat: XML::Schema and RelaxNG creation accept optional ParseOptions
I'm trying out a new pattern, which is that the parsed object carries
around the ParseOptions it was created with, which should make some
testing a bit easier.
I'm also not implementing the "config block" pattern in use for
Documents, because I think... |
static inline struct cfs_rq *task_cfs_rq(struct task_struct *p)
{
return &task_rq(p)->cfs;
} | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 179,178,536,372,523,570,000,000,000,000,000,000,000 | 4 | sched: simplify sched_slice()
Use the existing calc_delta_mine() calculation for sched_slice(). This
saves a divide and simplifies the code because we share it with the
other /cfs_rq->load users.
It also improves code size:
text data bss dec hex filename
42659 2740 144 45543 b1e... |
u8 gf_isom_is_track_in_root_od(GF_ISOFile *movie, u32 trackNumber)
{
u32 i;
GF_ISOTrackID trackID;
GF_Descriptor *desc;
GF_ES_ID_Inc *inc;
GF_List *inc_list;
if (!movie) return 2;
if (!movie->moov || !movie->moov->iods) return 0;
desc = movie->moov->iods->descriptor;
switch (desc->tag) {
case GF_ODF_ISOM_IOD... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 20,350,594,177,979,036,000,000,000,000,000,000,000 | 30 | fixed #1706 |
static int process_io_rotate(Master_info *mi, Rotate_log_event *rev)
{
DBUG_ENTER("process_io_rotate");
mysql_mutex_assert_owner(&mi->data_lock);
if (unlikely(!rev->is_valid()))
DBUG_RETURN(1);
/* Safe copy as 'rev' has been "sanitized" in Rotate_log_event's ctor */
memcpy(const_cast<char *>(mi->get_mas... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 115,441,906,431,116,600,000,000,000,000,000,000,000 | 47 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
GIT_INLINE(int) index_find_in_entries(
size_t *out, git_vector *entries, git_vector_cmp entry_srch,
const char *path, size_t path_len, int stage)
{
struct entry_srch_key srch_key;
srch_key.path = path;
srch_key.pathlen = !path_len ? strlen(path) : path_len;
srch_key.stage = stage;
return git_vector_bsearch2(out,... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 61,593,410,771,936,220,000,000,000,000,000,000,000 | 10 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
e_file_recursive_delete_sync (GFile *file,
GCancellable *cancellable,
GError **error)
{
GFileEnumerator *file_enumerator;
GFileInfo *file_info;
GFileType file_type;
gboolean success = TRUE;
GError *local_error = NULL;
g_return_val_if_fail (G_IS_FILE (fi... | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 136,505,113,746,812,420,000,000,000,000,000,000,000 | 66 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static int proc_resetdevice(struct usb_dev_state *ps)
{
struct usb_host_config *actconfig = ps->dev->actconfig;
struct usb_interface *interface;
int i, number;
/* Don't allow a device reset if the process has dropped the
* privilege to do such things and any of the interfaces are
* currently claimed.
*/
if ... | 0 | [
"CWE-200"
] | linux | 681fef8380eb818c0b845fca5d2ab1dcbab114ee | 318,113,788,921,002,360,000,000,000,000,000,000,000 | 26 | USB: usbfs: fix potential infoleak in devio
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
kadm5_get_principal(void *server_handle, krb5_principal principal,
kadm5_principal_ent_t entry,
long in_mask)
{
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
krb5_error_code ret = 0;
long mask;
int i;
... | 0 | [
"CWE-522",
"CWE-255"
] | krb5 | af0ed4df4dfae762ab5fb605f5a0c8f59cb4f6ca | 305,125,363,158,036,770,000,000,000,000,000,000,000 | 150 | Return only new keys in randkey [CVE-2014-5351]
In kadmind's randkey operation, if a client specifies the keepold
flag, do not include the preserved old keys in the response.
CVE-2014-5351:
An authenticated remote attacker can retrieve the current keys for a
service principal when generating a new set of keys for th... |
int isColorTerm(void) {
char *t = getenv("TERM");
return t != NULL && strstr(t,"xterm") != NULL;
} | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 239,354,373,864,590,620,000,000,000,000,000,000,000 | 4 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
static int tid_numa_maps_open(struct inode *inode, struct file *file)
{
return numa_maps_open(inode, file, &proc_tid_numa_maps_op);
} | 0 | [
"CWE-200"
] | linux | ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce | 263,940,364,340,095,000,000,000,000,000,000,000,000 | 4 | pagemap: do not leak physical addresses to non-privileged userspace
As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.
This disallows anybody without CAP_SYS_ADMIN to read the pagemap.
[1] http://googleprojectzero.bl... |
XML_MemRealloc(XML_Parser parser, void *ptr, size_t size) {
if (parser == NULL)
return NULL;
return REALLOC(parser, ptr, size);
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 7,966,753,532,165,124,000,000,000,000,000,000,000 | 5 | xmlparse.c: Deny internal entities closing the doctype |
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
unsigned long, prot, unsigned long, pgoff, unsigned long, flags)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
struct file *file;
pr_warn_once("%s (%d) uses... | 0 | [
"CWE-362"
] | linux | 246c320a8cfe0b11d81a4af38fa9985ef0cc9a4c | 329,615,226,697,220,500,000,000,000,000,000,000,000 | 95 | mm/mmap.c: close race between munmap() and expand_upwards()/downwards()
VMA with VM_GROWSDOWN or VM_GROWSUP flag set can change their size under
mmap_read_lock(). It can lead to race with __do_munmap():
Thread A Thread B
__do_munmap()
detach_vmas_to_be_unmapped()
mmap_write_downgrade()
expand_downwards()
... |
static void sig_complete_word(GList **list, WINDOW_REC *window,
const char *word, const char *linestart,
int *want_space)
{
SERVER_REC *server;
CHANNEL_REC *channel;
QUERY_REC *query;
char *prefix;
g_return_if_fail(list != NULL);
g_return_if_fail(window != NULL);
g_return_if_fail(word != NULL)... | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 80,003,749,759,553,080,000,000,000,000,000,000,000 | 61 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
GF_Box *gen_sample_entry_New()
{
ISOM_DECL_BOX_ALLOC(GF_SampleEntryBox, GF_QT_BOX_TYPE_C608);//type will be overriten
gf_isom_sample_entry_init((GF_SampleEntryBox*)tmp);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 329,904,254,754,429,430,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
uchar *getProgramName(msg_t *pM, sbool bLockMutex)
{
prepareProgramName(pM, bLockMutex);
return (pM->pCSProgName == NULL) ? UCHAR_CONSTANT("") : rsCStrGetSzStrNoNULL(pM->pCSProgName);
} | 0 | [
"CWE-772"
] | rsyslog | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 | 296,911,249,888,857,400,000,000,000,000,000,000,000 | 5 | backporting abort condition fix from 5.7.7 |
Image::AutoPtr ImageFactory::create(int type)
{
BasicIo::AutoPtr io(new MemIo);
Image::AutoPtr image = create(type, io);
if (image.get() == 0) throw Error(kerUnsupportedImageType, type);
return image;
} | 0 | [
"CWE-835"
] | exiv2 | ae49250942f4395639961abeed3c15920fcd7241 | 164,466,801,179,122,180,000,000,000,000,000,000,000 | 7 | Check in Image::printIFDStructure if seek and reads are OK |
static void interface_release_resource(QXLInstance *sin,
struct QXLReleaseInfoExt ext)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
uintptr_t id;
dprint(2, "%s:\n", __FUNCTION__);
id = ext.info->id;
qemu_spice_destroy_update(ssd, (vo... | 0 | [] | qemu-kvm | 5ff4e36c804157bd84af43c139f8cd3a59722db9 | 308,287,628,057,973,750,000,000,000,000,000,000,000 | 10 | qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async comm... |
void CertManager::AddPeerCert(x509* x)
{
peerList_.push_back(x); // take ownership
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 92,476,978,302,238,060,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
int SSL_get_shared_sigalgs(SSL *s, int idx,
int *psign, int *phash, int *psignhash,
unsigned char *rsig, unsigned char *rhash)
{
TLS_SIGALGS *shsigalgs = s->cert->shared_sigalgs;
if (!shsigalgs || idx >= (int)s->cert->shared_sigalgslen)
return 0;
shsigalgs += idx;
if (phash)
*phash = shsigalgs->hash_nid;... | 0 | [] | openssl | 80bd7b41b30af6ee96f519e629463583318de3b0 | 267,435,389,136,237,870,000,000,000,000,000,000,000 | 20 | Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-201... |
void ListDCCsCommand(const CString& sLine) {
CTable Table;
Table.AddColumn("Type");
Table.AddColumn("State");
Table.AddColumn("Speed");
Table.AddColumn("Nick");
Table.AddColumn("IP");
Table.AddColumn("File");
set<CSocket*>::const_iterator it;
for (it = BeginSockets(); it != EndSockets(); ++it) {
... | 0 | [
"CWE-399"
] | znc | 11508aa72efab4fad0dbd8292b9614d9371b20a9 | 172,275,795,828,278,600,000,000,000,000,000,000,000 | 41 | Fix crash in bouncedcc module.
It happens when DCC RESUME is received.
Affected ZNC versions: 0.200, 0.202.
Thanks to howeyc for reporting this and providing the patch. |
GF_Err elng_dump(GF_Box *a, FILE * trace)
{
GF_ExtendedLanguageBox *p = (GF_ExtendedLanguageBox *)a;
gf_isom_box_dump_start(a, "ExtendedLanguageBox", trace);
fprintf(trace, "LanguageCode=\"%s\">\n", p->extended_language);
gf_isom_box_dump_done("ExtendedLanguageBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 85,624,499,495,320,200,000,000,000,000,000,000,000 | 8 | fixed 2 possible heap overflows (inc. #1088) |
const PrimaryChromaticity* b() const { return b_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 320,864,452,317,261,300,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static void ParseCommon(map_string_t *settings, const char *conf_filename)
{
const char *value;
value = get_map_string_item_or_NULL(settings, "WatchCrashdumpArchiveDir");
if (value)
{
g_settings_sWatchCrashdumpArchiveDir = xstrdup(value);
remove_map_string_item(settings, "WatchCrashdump... | 1 | [
"CWE-200"
] | abrt | 8939398b82006ba1fec4ed491339fc075f43fc7c | 145,019,145,846,152,910,000,000,000,000,000,000,000 | 74 | make the dump directories owned by root by default
It was discovered that the abrt event scripts create a user-readable
copy of a sosreport file in abrt problem directories, and include
excerpts of /var/log/messages selected by the user-controlled process
name, leading to an information disclosure.
This issue was dis... |
*/
xmlNodePtr
xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) &&
(cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL))
return(cur->children);
... | 0 | [
"CWE-119"
] | libxml2 | ea90b894146030c214a7df6d8375310174f134b9 | 22,610,271,573,975,690,000,000,000,000,000,000,000 | 23 | Fix a change of semantic on XPath preceding and following axis
This was introduced in the prevous fix, while preceding-sibling and
following sibling axis are empty for attributes and namespaces,
preceding and following axis should still work based on the parent
element. However the parent element is not available for ... |
OJPEGWriteStreamQTable(TIFF* tif, uint8 table_index, void** mem, uint32* len)
{
OJPEGState* sp=(OJPEGState*)tif->tif_data;
if (sp->qtable[table_index]!=0)
{
*mem=(void*)(sp->qtable[table_index]+sizeof(uint32));
*len=*((uint32*)sp->qtable[table_index])-sizeof(uint32);
}
sp->out_state++;
} | 0 | [
"CWE-369"
] | libtiff | 43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec | 72,718,795,082,844,810,000,000,000,000,000,000,000 | 10 | * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 |
static int me_huge_page(struct page *p, unsigned long pfn)
{
int res = 0;
struct page *hpage = compound_head(p);
if (!PageHuge(hpage))
return MF_DELAYED;
/*
* We can safely recover from error on free or reserved (i.e.
* not in-use) hugepage by dequeuing it from freelist.
* To check whether a hugepage is i... | 0 | [] | linux | c3901e722b2975666f42748340df798114742d6d | 191,523,305,503,099,840,000,000,000,000,000,000,000 | 23 | mm: hwpoison: fix thp split handling in memory_failure()
When memory_failure() runs on a thp tail page after pmd is split, we
trigger the following VM_BUG_ON_PAGE():
page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1
flags: 0x1fffc000400000(hwpoison)
page dumped because: VM_BUG_ON_PAG... |
static struct uprobe *find_uprobe(struct inode *inode, loff_t offset)
{
struct uprobe *uprobe;
spin_lock(&uprobes_treelock);
uprobe = __find_uprobe(inode, offset);
spin_unlock(&uprobes_treelock);
return uprobe;
} | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 310,976,384,867,836,800,000,000,000,000,000,000,000 | 10 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
static int samldb_lockout_time(struct samldb_ctx *ac)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
NTTIME lockoutTime;
struct ldb_message_element *el;
struct ldb_message *tmp_msg;
int ret;
ret = dsdb_get_expected_new_values(ac,
ac->msg,
"lockoutTime",
&el,
ac->req->... | 1 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 231,197,866,114,441,000,000,000,000,000,000,000,000 | 54 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
int jas_stream_rewind(jas_stream_t *stream)
{
JAS_DBGLOG(100, ("jas_stream_rewind(%p)\n", stream));
return jas_stream_seek(stream, 0, SEEK_SET);
} | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 240,174,039,759,525,050,000,000,000,000,000,000,000 | 5 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
static void tsc210x_pin_update(TSC210xState *s)
{
int64_t expires;
int pin_state;
switch (s->pin_func) {
case 0:
pin_state = s->pressure;
break;
case 1:
pin_state = !!s->dav;
break;
case 2:
default:
pin_state = s->pressure && !s->dav;
}
if (!... | 0 | [
"CWE-119"
] | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | 156,399,702,694,009,500,000,000,000,000,000,000,000 | 68 | tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst... |
static int gfs2_xquota_get(struct super_block *sb, int type, qid_t id,
struct fs_disk_quota *fdq)
{
struct gfs2_sbd *sdp = sb->s_fs_info;
struct gfs2_quota_lvb *qlvb;
struct gfs2_quota_data *qd;
struct gfs2_holder q_gh;
int error;
memset(fdq, 0, sizeof(struct fs_disk_quota));
if (sdp->sd_args.ar_quota ==... | 0 | [
"CWE-399"
] | linux-2.6 | 7e619bc3e6252dc746f64ac3b486e784822e9533 | 55,894,372,975,544,500,000,000,000,000,000,000,000 | 41 | 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 void ipa_device_close(wmfAPI * API)
{
wmf_magick_t
*ddata = WMF_MAGICK_GetData(API);
if (ddata->draw_wand != (DrawingWand *) NULL)
{
DestroyDrawingWand(ddata->draw_wand);
ddata->draw_wand=(DrawingWand *) NULL;
}
if (ddata->draw_info != (DrawInfo *) NULL)
{
DestroyDrawInfo... | 0 | [
"CWE-772"
] | ImageMagick | b2b48d50300a9fbcd0aa0d9230fd6d7a08f7671e | 187,980,948,133,635,000,000,000,000,000,000,000,000 | 17 | https://github.com/ImageMagick/ImageMagick/issues/544 |
static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
{
struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr;
struct sock *sk = sock->sk;
struct llc_sock *llc = llc_sk(sk);
struct llc_sap *sap;
int rc = -EINVAL;
dprintk("%s: binding %02X\n", __func__, addr->sllc_sap);
if (unlikely... | 0 | [
"CWE-200"
] | net | b8670c09f37bdf2847cc44f36511a53afc6161fd | 121,201,348,077,534,020,000,000,000,000,000,000,000 | 82 | net: fix infoleak in llc
The stack object “info” has a total size of 12 bytes. Its last byte
is padding which is not initialized and leaked via “put_cmsg”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
TEST_F(
QuicUnencryptedServerTransportTest,
ReceiveHandshakePacketFromChangedPeerAddress) {
server->getNonConstConn().transportSettings.disableMigration = false;
recvClientHello();
auto data = IOBuf::copyBuffer("bad data");
folly::SocketAddress newPeer("100.101.102.103", 23456);
try {
recvClien... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 129,062,281,649,561,000,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 |
get_ctype_code_range(OnigCtype ctype, OnigCodePoint* sb_out,
const OnigCodePoint* ranges[])
{
if (ctype <= ONIGENC_MAX_STD_CTYPE) {
return ONIG_NO_SUPPORT_CONFIG;
}
else {
*sb_out = 0x80;
PROPERTY_LIST_INIT_CHECK;
ctype -= (ONIGENC_MAX_STD_CTYPE + 1);
if (ctype >= (OnigCtype )Property... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 199,433,197,814,742,050,000,000,000,000,000,000,000 | 19 | onig-5.9.2 |
long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = (void __user *)arg;
int r;
struct kvm_lapic_state *lapic = NULL;
switch (ioctl) {
case KVM_GET_LAPIC: {
lapic = kzalloc(sizeof(struct kvm_lapic_state), GFP_KE... | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 287,390,972,889,960,840,000,000,000,000,000,000,000 | 140 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
TEST(RegexMatchExpression, MatchesElementMultilineOff) {
BSONObj match = BSON("x"
<< "az");
BSONObj notMatch = BSON("x"
<< "\naz");
RegexMatchExpression regex;
ASSERT(regex.init("", "^a", "").isOK());
ASSERT(regex.matchesSingleElement(match.firstE... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 7,273,413,017,805,786,000,000,000,000,000,000,000 | 10 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
smtp_alert_vrrp_handler(vector_t *strvec)
{
int res = true;
if (vector_size(strvec) >= 2) {
res = check_true_false(strvec_slot(strvec,1));
if (res < 0) {
report_config_error(CONFIG_GENERAL_ERROR, "Invalid value '%s' for global smtp_alert_vrrp specified", FMT_STR_VSLOT(strvec, 1));
return;
}
}
global_d... | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 133,671,843,371,578,530,000,000,000,000,000,000,000 | 14 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
cin_isinit(void)
{
char_u *s;
static char *skip[] = {"static", "public", "protected", "private"};
s = cin_skipcomment(ml_get_curline());
if (cin_starts_with(s, "typedef"))
s = cin_skipcomment(s + 7);
for (;;)
{
int i, l;
for (i = 0; i < (int)ARRAY_LENGTH(skip); ++i)
{
l = (int)strle... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 2de9b7c7c8791da8853a9a7ca9c467867465b655 | 239,747,977,180,205,460,000,000,000,000,000,000,000 | 36 | patch 8.2.3625: illegal memory access when C-indenting
Problem: Illegal memory access when C-indenting.
Solution: Also set the cursor column. |
inline static int is_type_printable(int type)
{
if (type == GNUTLS_SAN_DNSNAME || type == GNUTLS_SAN_RFC822NAME ||
type == GNUTLS_SAN_URI || type == GNUTLS_SAN_OTHERNAME_XMPP ||
type == GNUTLS_SAN_OTHERNAME)
return 1;
else
return 0;
} | 0 | [
"CWE-295"
] | gnutls | 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff | 322,091,942,877,745,200,000,000,000,000,000,000,000 | 9 | on certificate import check whether the two signature algorithms match |
static long vsock_dev_do_ioctl(struct file *filp,
unsigned int cmd, void __user *ptr)
{
u32 __user *p = ptr;
int retval = 0;
switch (cmd) {
case IOCTL_VM_SOCKETS_GET_LOCAL_CID:
if (put_user(transport->get_local_cid(), p) != 0)
retval = -EFAULT;
break;
default:
pr_err("Unknown ioctl %d\n", cmd)... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 133,957,111,888,385,660,000,000,000,000,000,000,000 | 19 | 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... |
int uwsgi_file_to_string_list(char *filename, struct uwsgi_string_list **list) {
char line[1024];
FILE *fh = fopen(filename, "r");
if (fh) {
while (fgets(line, 1024, fh)) {
uwsgi_string_new_list(list, uwsgi_chomp(uwsgi_str(line)));
}
fclose(fh);
return 1;
}
uwsgi_error_open(filename);
return 0;
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 165,396,902,541,759,770,000,000,000,000,000,000,000 | 15 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
bool JOIN::make_aggr_tables_info()
{
List<Item> *curr_all_fields= &all_fields;
List<Item> *curr_fields_list= &fields_list;
JOIN_TAB *curr_tab= join_tab + const_tables;
TABLE *exec_tmp_table= NULL;
bool distinct= false;
bool keep_row_order= false;
bool is_having_added_as_table_cond= false;
DBUG_ENTER("JO... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 77,893,601,055,776,320,000,000,000,000,000,000,000 | 554 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
unsigned int rtas_busy_delay_time(int status)
{
int order;
unsigned int ms = 0;
if (status == RTAS_BUSY) {
ms = 1;
} else if (status >= RTAS_EXTENDED_DELAY_MIN &&
status <= RTAS_EXTENDED_DELAY_MAX) {
order = status - RTAS_EXTENDED_DELAY_MIN;
for (ms = 1; order > 0; order--)
ms *= 10;
}
return ms;
... | 0 | [
"CWE-862"
] | linux | bd59380c5ba4147dcbaad3e582b55ccfd120b764 | 52,120,032,171,749,030,000,000,000,000,000,000,000 | 16 | powerpc/rtas: Restrict RTAS requests from userspace
A number of userspace utilities depend on making calls to RTAS to retrieve
information and update various things.
The existing API through which we expose RTAS to userspace exposes more
RTAS functionality than we actually need, through the sys_rtas syscall,
which al... |
GF_Err hdlr_dump(GF_Box *a, FILE * trace)
{
GF_HandlerBox *p = (GF_HandlerBox *)a;
gf_isom_box_dump_start(a, "HandlerBox", trace);
if (p->nameUTF8 && (u32) p->nameUTF8[0] == strlen(p->nameUTF8)-1) {
fprintf(trace, "hdlrType=\"%s\" Name=\"%s\" ", gf_4cc_to_str(p->handlerType), p->nameUTF8+1);
} else {
fprintf(tr... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 110,929,997,129,153,730,000,000,000,000,000,000,000 | 17 | fixed 2 possible heap overflows (inc. #1088) |
static void ptrace_trap_notify(struct task_struct *t)
{
WARN_ON_ONCE(!(t->ptrace & PT_SEIZED));
assert_spin_locked(&t->sighand->siglock);
task_set_jobctl_pending(t, JOBCTL_TRAP_NOTIFY);
ptrace_signal_wake_up(t, t->jobctl & JOBCTL_LISTENING);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 80,661,436,259,156,580,000,000,000,000,000,000,000 | 8 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
static void __net_exit crypto_netlink_exit(struct net *net)
{
netlink_kernel_release(net->crypto_nlsk);
net->crypto_nlsk = NULL;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | ffdde5932042600c6807d46c1550b28b0db6a3bc | 127,081,756,076,041,860,000,000,000,000,000,000,000 | 5 | crypto: user - fix memory leak in crypto_report
In crypto_report, a new skb is created via nlmsg_new(). This skb should
be released if crypto_report_alg() fails.
Fixes: a38f7907b926 ("crypto: Add userspace configuration API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Sign... |
static void file_add_remove(struct diff_options *options,
int addremove, unsigned mode,
const unsigned char *sha1,
const char *base, const char *path)
{
int diff = REV_TREE_DIFFERENT;
/*
* Is it an add of a new file? It means that the old tree
* didn't have it at all, so we will turn "REV_TREE_... | 1 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 220,776,526,793,639,920,000,000,000,000,000,000,000 | 24 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
xmlFileMatch (const char *filename ATTRIBUTE_UNUSED) {
return(1);
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 69,839,524,229,298,190,000,000,000,000,000,000,000 | 3 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
load_cas_and_crls(krb5_context context,
pkinit_plg_crypto_context plg_cryptoctx,
pkinit_req_crypto_context req_cryptoctx,
pkinit_identity_crypto_context id_cryptoctx,
int catype,
char *filename)
{
STACK_OF(X509_INFO) *sk = NUL... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 224,353,522,698,224,420,000,000,000,000,000,000,000 | 158 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
static bool vmci_transport_stream_is_active(struct vsock_sock *vsk)
{
return !vmci_handle_is_invalid(vmci_trans(vsk)->qp_handle);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 197,250,545,374,337,400,000,000,000,000,000,000,000 | 4 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void unhash_nsid(struct net *net, struct net *last)
{
struct net *tmp;
/* This function is only called from cleanup_net() work,
* and this work is the only process, that may delete
* a net from net_namespace_list. So, when the below
* is executing, the list may only grow. Thus, we do not
* use for_each... | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 40,408,360,848,873,837,000,000,000,000,000,000,000 | 26 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
static int qcow2_refresh_limits(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
bs->bl.write_zeroes_alignment = s->cluster_sectors;
return 0;
} | 0 | [
"CWE-476"
] | qemu | 11b128f4062dd7f89b14abc8877ff20d41b28be9 | 218,409,806,848,529,700,000,000,000,000,000,000,000 | 8 | qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshot... |
NOEXPORT void reset(SOCKET fd, char *txt) { /* set lingering on a socket */
struct linger l;
l.l_onoff=1;
l.l_linger=0;
if(setsockopt(fd, SOL_SOCKET, SO_LINGER, (void *)&l, sizeof l))
log_error(LOG_DEBUG, get_last_socket_error(), txt);
} | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 58,954,415,352,840,860,000,000,000,000,000,000,000 | 8 | stunnel-5.57 |
forward_query(int bind_fd, struct query *q)
{
char buf[64*1024];
int len;
struct fw_query fwq;
struct sockaddr_in *myaddr;
in_addr_t newaddr;
len = dns_encode(buf, sizeof(buf), q, QR_QUERY, q->name, strlen(q->name));
if (len < 1) {
warnx("dns_encode doesn't fit");
return;
}
/* Store sockaddr for q->id */... | 0 | [] | iodine | b715be5cf3978fbe589b03b09c9398d0d791f850 | 75,140,690,485,289,490,000,000,000,000,000,000,000 | 33 | Fix authentication bypass bug
The client could bypass the password check by continuing after getting error
from the server and guessing the network parameters. The server would still
accept the rest of the setup and also network traffic.
Add checks for normal and raw mode that user has authenticated before allowing
a... |
KEY_Reload(void)
{
unsigned int i, line_number, key_length, cmac_key_length;
FILE *in;
char line[2048], *key_file, *key_value;
const char *key_type;
int hash_id;
Key key;
free_keys();
key_file = CNF_GetKeysFile();
line_number = 0;
if (!key_file)
return;
in = UTI_OpenFile(NULL, key_file, NU... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 309,877,297,308,977,000,000,000,000,000,000,000,000 | 89 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
PHP_MINIT_FUNCTION(ldap)
{
REGISTER_INI_ENTRIES();
/* Constants to be used with deref-parameter in php_ldap_do_search() */
REGISTER_LONG_CONSTANT("LDAP_DEREF_NEVER", LDAP_DEREF_NEVER, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_DEREF_SEARCHING", LDAP_DEREF_SEARCHING, CONST_PERSISTENT | CONST_CS);
R... | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 127,994,682,442,242,480,000,000,000,000,000,000,000 | 80 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
int ath6kl_wmi_ap_set_apsd(struct wmi *wmi, u8 if_idx, u8 enable)
{
struct wmi_ap_set_apsd_cmd *cmd;
struct sk_buff *skb;
skb = ath6kl_wmi_get_new_buf(sizeof(*cmd));
if (!skb)
return -ENOMEM;
cmd = (struct wmi_ap_set_apsd_cmd *)skb->data;
cmd->enable = enable;
return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WM... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 70,211,666,141,983,000,000,000,000,000,000,000,000 | 15 | 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... |
XPathIo::XPathIo(const std::string& orgPath) : FileIo(XPathIo::writeDataToFile(orgPath)) {
isTemp_ = true;
tempFilePath_ = path();
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 44,168,061,780,476,440,000,000,000,000,000,000,000 | 4 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static void rtl8139_CpCmd_write(RTL8139State *s, uint32_t val)
{
val &= 0xffff;
DPRINTF("C+ command register write(w) val=0x%04x\n", val);
s->cplus_enabled = 1;
/* mask unwritable bits */
val = SET_MASKED(val, 0xff84, s->CpCmd);
s->CpCmd = val;
} | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 200,286,140,210,564,140,000,000,000,000,000,000,000 | 13 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
static int vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,
int index, int fd,
uint64_t offset,
uint64_t size)
{
int ret;
struct VhostUserMsg msg = {
.request.slave = VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
.flags = VHOST_USER_VERSION | VHOST_USER_NEED_REPLY,
.siz... | 0 | [
"CWE-190"
] | dpdk | 3ae4beb079ce242240c34376a066bbccd0c0b23e | 231,089,904,949,343,660,000,000,000,000,000,000,000 | 33 | vhost: check log mmap offset and size overflow
vhost_user_set_log_base() is a message handler that is
called to handle the VHOST_USER_SET_LOG_BASE message.
Its payload contains a 64 bit size and offset. Both are
added up and used as a size when calling mmap().
There is no integer overflow check. If an integer overflo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.