func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int kvm_vm_ioctl_clear_dirty_log(struct kvm *kvm,
struct kvm_clear_dirty_log *log)
{
int r;
mutex_lock(&kvm->slots_lock);
r = kvm_clear_dirty_log_protect(kvm, log);
mutex_unlock(&kvm->slots_lock);
return r; | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 295,512,583,303,334,200,000,000,000,000,000,000,000 | 12 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static struct ucma_context *ucma_get_ctx_dev(struct ucma_file *file, int id)
{
struct ucma_context *ctx = ucma_get_ctx(file, id);
if (IS_ERR(ctx))
return ctx;
if (!ctx->cm_id->device) {
ucma_put_ctx(ctx);
return ERR_PTR(-EINVAL);
}
return ctx;
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | cb2595c1393b4a5211534e6f0a0fbad369e21ad8 | 127,179,742,981,885,940,000,000,000,000,000,000,000 | 12 | infiniband: fix a possible use-after-free bug
ucma_process_join() will free the new allocated "mc" struct,
if there is any error after that, especially the copy_to_user().
But in parallel, ucma_leave_multicast() could find this "mc"
through idr_find() before ucma_process_join() frees it, since it
is already published... |
static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm)
{
return 0;
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 34,670,342,473,313,313,000,000,000,000,000,000,000 | 4 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_local *local = rx->local;
struct net_device *dev = sdata->dev;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
__le16 fc = hdr->frame_control;
bool port_control;
int err;
if ... | 0 | [] | linux | 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f | 304,371,262,619,511,640,000,000,000,000,000,000,000 | 79 | mac80211: drop robust management frames from unknown TA
When receiving a robust management frame, drop it if we don't have
rx->sta since then we don't have a security association and thus
couldn't possibly validate the frame.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
OPJ_BOOL opj_jp2_decode_tile(opj_jp2_t * p_jp2,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager... | 0 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 10,055,536,857,159,193,000,000,000,000,000,000,000 | 11 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
end_clause()
{
if (clause_depth == 0)
int_error(c_token, "unexpected }");
else
clause_depth--;
c_token++;
return;
} | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 112,457,778,450,498,050,000,000,000,000,000,000,000 | 9 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
reload_vrrp_thread(__attribute__((unused)) thread_t * thread)
{
log_message(LOG_INFO, "Reloading");
/* Use standard scheduling while reloading */
reset_process_priorities();
/* set the reloading flag */
SET_RELOAD;
/* Terminate all script process */
script_killall(master, SIGTERM, false);
if (vrrp_data->vrr... | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 245,453,105,375,389,080,000,000,000,000,000,000,000 | 72 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
static struct file *do_open_execat(int fd, struct filename *name, int flags)
{
struct file *file;
int err;
struct open_flags open_exec_flags = {
.open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
.acc_mode = MAY_EXEC | MAY_OPEN,
.intent = LOOKUP_OPEN,
.lookup_flags = LOOKUP_FOLLOW,
};
if ((flags & ~(AT_S... | 0 | [
"CWE-362"
] | linux | 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 | 318,098,935,583,987,160,000,000,000,000,000,000,000 | 43 | fs: take i_mutex during prepare_binprm for set[ug]id executables
This prevents a race between chown() and execve(), where chowning a
setuid-user binary to root would momentarily make the binary setuid
root.
This patch was mostly written by Linus Torvalds.
Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Linu... |
BOOL nla_verify_header(wStream* s)
{
if ((s->pointer[0] == 0x30) && (s->pointer[1] & 0x80))
return TRUE;
return FALSE;
} | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 323,631,590,968,621,070,000,000,000,000,000,000,000 | 7 | nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished. |
string_center(PyStringObject *self, PyObject *args)
{
Py_ssize_t marg, left;
Py_ssize_t width;
char fillchar = ' ';
if (!PyArg_ParseTuple(args, "n|c:center", &width, &fillchar))
return NULL;
if (PyString_GET_SIZE(self) >= width && PyString_CheckExact(self)) {
Py_INCREF(self);
... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 191,406,702,358,575,540,000,000,000,000,000,000,000 | 19 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
adv_error adv_png_write_rns(
unsigned pix_width, unsigned pix_height, unsigned pix_pixel,
const unsigned char* pix_ptr, int pix_pixel_pitch, int pix_scanline_pitch,
const unsigned char* pal_ptr, unsigned pal_size,
const unsigned char* rns_ptr, unsigned rns_size,
adv_bool fast,
adv_fz* f, unsigned* count)
{
if (a... | 0 | [
"CWE-119"
] | advancecomp | 78a56b21340157775be2462a19276b4d31d2bd01 | 191,286,979,093,170,050,000,000,000,000,000,000 | 21 | Fix a buffer overflow caused by invalid images |
int Option::validate(const Option::value_t &new_value, std::string *err) const
{
// Generic validation: min
if (!boost::get<boost::blank>(&(min))) {
if (new_value < min) {
std::ostringstream oss;
oss << "Value '" << new_value << "' is below minimum " << min;
*err = oss.str();
return -EIN... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 107,905,653,057,041,640,000,000,000,000,000,000,000 | 39 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
_zip_file_exists(zip_source_t *src, zip_error_t *error)
{
struct zip_stat st;
zip_stat_init(&st);
if (zip_source_stat(src, &st) != 0) {
zip_error_t *src_error = zip_source_error(src);
if (zip_error_code_zip(src_error) == ZIP_ER_READ && zip_error_code_system(src_error) == ENOENT) {
retu... | 0 | [
"CWE-119",
"CWE-770",
"CWE-787"
] | libzip | 9b46957ec98d85a572e9ef98301247f39338a3b5 | 47,234,739,504,109,980,000,000,000,000,000,000,000 | 16 | Make eocd checks more consistent between zip and zip64 cases. |
mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index,
char *pFilename, mz_uint filename_buf_size) {
mz_uint n;
const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
if (!p) {
if (filename_buf_size) pFilename[0] = '\0';
return 0;
}
n = MZ... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 303,994,373,405,965,170,000,000,000,000,000,000,000 | 16 | Make line_no with too large value(2**20) invalid. Fixes #124 |
static int proc_pid_schedstat(struct task_struct *task, char *buffer)
{
return sprintf(buffer, "%llu %llu %lu\n",
(unsigned long long)task->se.sum_exec_runtime,
(unsigned long long)task->sched_info.run_delay,
task->sched_info.pcount);
} | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 146,865,734,449,799,300,000,000,000,000,000,000,000 | 7 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
ProxyProtocolTest()
: api_(Api::createApiForTest(stats_store_)),
dispatcher_(api_->allocateDispatcher("test_thread")),
socket_(std::make_shared<Network::TcpListenSocket>(
Network::Test::getCanonicalLoopbackAddress(GetParam()), nullptr, true)),
connection_handler_(new Server::... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 75,316,700,242,880,660,000,000,000,000,000,000,000 | 16 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int __init ccid_initialize_builtins(void)
{
int i, err = tfrc_lib_init();
if (err)
return err;
for (i = 0; i < ARRAY_SIZE(ccids); i++) {
err = ccid_activate(ccids[i]);
if (err)
goto unwind_registrations;
}
return 0;
unwind_registrations:
while(--i >= 0)
ccid_deactivate(ccids[i]);
tfrc_lib_exit();
... | 0 | [
"CWE-476"
] | linux-2.6 | 8ed030dd0aa400d18c63861c2c6deb7c38f4edde | 27,432,973,520,972,867,000,000,000,000,000,000,000 | 20 | dccp: fix bug in cache allocation
This fixes a bug introduced in commit de4ef86cfce60d2250111f34f8a084e769f23b16
("dccp: fix dccp rmmod when kernel configured to use slub", 17 Jan): the
vsnprintf used sizeof(slab_name_fmt), which became truncated to 4 bytes, since
slab_name_fmt is now a 4-byte pointer and no longer a ... |
static int proc_sys_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags)
{
struct inode *inode = d_inode(path->dentry);
struct ctl_table_header *head = grab_header(inode);
struct ctl_table *table = PROC_I(inode)->sysctl_entry;
if (IS_ERR(head))
return PTR_ERR(he... | 0 | [
"CWE-476"
] | linux | 23da9588037ecdd4901db76a5b79a42b529c4ec3 | 308,836,954,479,464,950,000,000,000,000,000,000,000 | 17 | fs/proc/proc_sysctl.c: fix NULL pointer dereference in put_links
Syzkaller reports:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)... |
static void nhmldump_send_header(GF_NHMLDumpCtx *ctx)
{
GF_FilterPacket *dst_pck;
char nhml[1024];
u32 size;
u8 *output;
const GF_PropertyValue *p;
ctx->szRootName = "NHNTStream";
if (ctx->dims) {
ctx->szRootName = "DIMSStream";
}
if (!ctx->filep) {
sprintf(nhml, "<?xml version=\"1.0\" encoding=\"UTF-8\"... | 0 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 192,488,898,754,254,960,000,000,000,000,000,000,000 | 155 | fixed #1565 |
sd_markdown_new(
unsigned int extensions,
size_t max_nesting,
const struct sd_callbacks *callbacks,
void *opaque)
{
struct sd_markdown *md = NULL;
assert(max_nesting > 0 && callbacks);
md = malloc(sizeof(struct sd_markdown));
if (!md)
return NULL;
memcpy(&md->cb, callbacks, sizeof(struct sd_callbacks));
... | 0 | [] | redcarpet | e5a10516d07114d582d13b9125b733008c61c242 | 307,592,278,170,251,260,000,000,000,000,000,000,000 | 63 | Avoid rewinding previous inline when auto-linking
When a bit like "_foo_1@bar.com" is processed, first the emphasis is
rendered, then the 1 is output verbatim. When the `@` is encountered,
Redcarpet tries to find the "local part" of the address and stops when
it encounters an invalid char (i.e. here the `!`).
The pro... |
void RSA_Private_Decoder::Decode(RSA_PrivateKey& key)
{
ReadHeader();
if (source_.GetError().What()) return;
// public
key.SetModulus(GetInteger(Integer().Ref()));
key.SetPublicExponent(GetInteger(Integer().Ref()));
// private
key.SetPrivateExponent(GetInteger(Integer().Ref()));
key.Set... | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 16,644,339,753,683,346,000,000,000,000,000,000,000 | 16 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
str_replace (char *str,
const char *chars_to_replace,
char replacement)
{
gboolean success;
int i;
success = FALSE;
for (i = 0; str[i] != '\0'; i++) {
if (strchr (chars_to_replace, str[i])) {
success = TRUE;
str[i] = replacement;
}
}
return success;
} | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 248,973,553,462,723,820,000,000,000,000,000,000,000 | 17 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
tokenexec_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save)
{
os_ptr op = osp;
int code;
/* Since we might free pstate below, and we're dealing with
* gc memory referenced by the stack, we need to explicitly
* remove the reference to pstate from the stack, otherwise
* the garbager... | 0 | [] | ghostpdl | 671fd59eb657743aa86fbc1895cb15872a317caa | 47,033,312,241,768,610,000,000,000,000,000,000,000 | 55 | Bug 698158: prevent trying to reloc a freed object
In the token reader, we pass the scanner state structure around as a
t_struct ref on the Postscript operand stack.
But we explicitly free the scanner state when we're done, which leaves a
dangling reference on the operand stack and, unless that reference gets
overwri... |
class ColorTrafo *LineBitmapRequester::ColorTrafoOf(bool encoding,bool disabletorgb)
{
return m_pFrame->TablesOf()->ColorTrafoOf(m_pFrame,NULL,PixelTypeOf(),
encoding,disabletorgb);
} | 0 | [
"CWE-476"
] | libjpeg | 51c3241b6da39df30f016b63f43f31c4011222c7 | 333,280,466,734,244,820,000,000,000,000,000,000,000 | 5 | Fixed a NULL-pointer access in the line-based reconstruction process
in case no valid scan was found and no data is present. |
static inline void layout_symtab(struct module *mod, struct load_info *info)
{
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 154,958,210,195,473,430,000,000,000,000,000,000,000 | 3 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
get_display_info_cb(gint fd, GIOCondition condition, gpointer user_data)
{
struct virtio_gpu_resp_display_info dpy_info = { {} };
VuGpu *vg = user_data;
struct virtio_gpu_ctrl_command *cmd = QTAILQ_LAST(&vg->fenceq);
g_debug("disp info cb");
assert(cmd->cmd_hdr.type == VIRTIO_GPU_CMD_GET_DISPLAY_IN... | 0 | [] | qemu | 86dd8fac2acc366930a5dc08d3fb1b1e816f4e1e | 184,018,983,040,111,000,000,000,000,000,000,000,000 | 21 | vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' (CVE-2021-3544)
Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
Fixes: CVE-2021-3544
Reported-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Marc-And... |
static AddrRange addrrange_make(Int128 start, Int128 size)
{
return (AddrRange) { start, size };
} | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 257,291,178,538,943,650,000,000,000,000,000,000,000 | 4 | Fix crash when mapping a big memory and calling uc_close |
static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
struct brcmf_scan_results *bss_list;
struct brcmf_bss_info_le *bi = NULL; /* must be initialized */
s32 err = 0;
int i;
bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
if (bss_list->count !... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 317,022,420,001,423,480,000,000,000,000,000,000,000 | 24 | brcmfmac: assure SSID length from firmware is limited
The SSID length as received from firmware should not exceed
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by:... |
frag6_print(netdissect_options *ndo, register const u_char *bp, register const u_char *bp2)
{
register const struct ip6_frag *dp;
register const struct ip6_hdr *ip6;
dp = (const struct ip6_frag *)bp;
ip6 = (const struct ip6_hdr *)bp2;
ND_TCHECK(*dp);
if (ndo->ndo_vflag) {
ND_PRINT((ndo, "frag (0x%08x:%d|%ld)... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 2d669862df7cd17f539129049f6fb70d17174125 | 91,099,372,855,770,860,000,000,000,000,000,000,000 | 35 | CVE-2017-13031/Check for the presence of the entire IPv6 fragment header.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't be rejected as an invalid capture.
Clean up some whitespace in test... |
static inline int ok_jpg_load_next_bits(ok_jpg_decoder *decoder, int num_bits) {
ok_jpg_load_bits(decoder, num_bits);
int mask = (1 << num_bits) - 1;
decoder->input_buffer_bit_count -= num_bits;
return (int)(decoder->input_buffer_bits >> decoder->input_buffer_bit_count) & mask;
} | 0 | [
"CWE-787"
] | ok-file-formats | a9cc1711dd4ed6a215038f1c5c03af0ef52c3211 | 112,717,507,630,813,940,000,000,000,000,000,000,000 | 6 | ok_jpg: Fix invalid DHT (#11) |
void tty_flip_buffer_push(struct tty_struct *tty)
{
unsigned long flags;
spin_lock_irqsave(&tty->buf.lock, flags);
if (tty->buf.tail != NULL)
tty->buf.tail->commit = tty->buf.tail->used;
spin_unlock_irqrestore(&tty->buf.lock, flags);
if (tty->low_latency)
flush_to_ldisc(&tty->buf.work);
else
schedule_work(... | 0 | [] | linux | c56a00a165712fd73081f40044b1e64407bb1875 | 248,086,565,363,781,060,000,000,000,000,000,000,000 | 13 | tty: hold lock across tty buffer finding and buffer filling
tty_buffer_request_room is well protected, but while after it returns,
it releases the port->lock. tty->buf.tail might be modified
by either irq handler or other threads. The patch adds more protection
by holding the lock across tty buffer finding and buffer... |
void nntp_hash_destructor(int type, void *obj, intptr_t data)
{
nntp_data_free(obj);
} | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | 304,996,051,661,254,730,000,000,000,000,000,000,000 | 4 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. |
static int sisusb_send_bulk_msg(struct sisusb_usb_data *sisusb, int ep, int len,
char *kernbuffer, const char __user *userbuffer, int index,
ssize_t *bytes_written, unsigned int tflags, int async)
{
int result = 0, retry, count = len;
int passsize, thispass, transferred_len = 0;
int fromuser = (userbuffer != NUL... | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 44,773,397,759,197,225,000,000,000,000,000,000,000 | 111 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
static int ntop_update_host_traffic_policy(lua_State* vm) {
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
char *host_ip;
u_int16_t vlan_id = 0;
char buf[64];
Host *h;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRI... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 86,654,112,734,929,190,000,000,000,000,000,000,000 | 22 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
extend_input_line()
{
if (gp_input_line_len == 0) {
/* first time */
gp_input_line = gp_alloc(MAX_LINE_LEN, "gp_input_line");
gp_input_line_len = MAX_LINE_LEN;
gp_input_line[0] = NUL;
#ifdef OS2_IPC
sprintf( mouseSharedMemName, "\\SHAREMEM\\GP%i_Mouse_Input", getpid() );
if (DosAllocSharedMem((PVOID) & input... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 50,983,162,692,680,620,000,000,000,000,000,000,000 | 23 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
static u8 tcp_sacktag_one(struct sock *sk,
struct tcp_sacktag_state *state, u8 sacked,
u32 start_seq, u32 end_seq,
int dup_sack, int pcount,
const struct skb_mstamp *xmit_time)
{
struct tcp_sock *tp = tcp_sk(sk);
int fack_count = state->fack_count;
/* Account D-SACK for retransmitted packet. */
... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 161,452,046,081,839,940,000,000,000,000,000,000,000 | 83 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
shape_desc *bind_shape(char *name, node_t * np)
{
shape_desc *ptr, *rv = NULL;
const char *str;
str = safefile(agget(np, "shapefile"));
/* If shapefile is defined and not epsf, set shape = custom */
if (str && !streq(name, "epsf"))
name = "custom";
if (!streq(name, "custom")) {
for (ptr = Sha... | 0 | [
"CWE-120"
] | graphviz | 784411ca3655c80da0f6025ab20634b2a6ff696b | 228,606,245,648,697,370,000,000,000,000,000,000,000 | 21 | 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... |
bool destroyed() const { return state_.destroyed_; } | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 306,026,410,850,007,240,000,000,000,000,000,000,000 | 1 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
unsigned long cflag)
{
long l;
int ret = 0, i;
char *m = NULL, mlch = ' ';
int nmindent = 0;
ASN1_INTEGER *bs;
EVP_PKEY *pkey = NULL;
const char *neg;
if ((nmflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) ... | 0 | [
"CWE-125"
] | openssl | d9d838ddc0ed083fb4c26dd067e71aad7c65ad16 | 220,694,221,776,536,500,000,000,000,000,000,000,000 | 173 | Fix a read buffer overrun in X509_aux_print().
The ASN1_STRING_get0_data(3) manual explitely cautions the reader
that the data is not necessarily NUL-terminated, and the function
X509_alias_set1(3) does not sanitize the data passed into it in any
way either, so we must assume the return value from X509_alias_get0(3)
i... |
void Compute(OpKernelContext* ctx) override {
const Tensor* inputs;
const Tensor* labels_indices;
const Tensor* labels_values;
const Tensor* seq_len;
OP_REQUIRES_OK(ctx, ctx->input("inputs", &inputs));
OP_REQUIRES_OK(ctx, ctx->input("labels_indices", &labels_indices));
OP_REQUIRES_OK(ctx, ... | 0 | [
"CWE-665"
] | tensorflow | 14607c0707040d775e06b6817325640cb4b5864c | 181,245,892,044,849,270,000,000,000,000,000,000,000 | 128 | Fix nullptr deref in `tf.raw_ops.CTCLoss`.
PiperOrigin-RevId: 372266334
Change-Id: Ic52c3e9f13a38f54482d670907eda1688450862b |
txt_shift_text_currentpoint(textw_text_enum_t *penum, gs_point *wpt)
{
return gs_moveto_aux(penum->pgs, gx_current_path(penum->pgs),
fixed2float(penum->origin.x) + wpt->x,
fixed2float(penum->origin.y) + wpt->y);
} | 0 | [
"CWE-476"
] | ghostpdl | 407c98a38c3a6ac1681144ed45cc2f4fc374c91f | 261,194,264,268,542,580,000,000,000,000,000,000,000 | 6 | txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values
Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref"
Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph
name or Unicode code point from the glyph ID, as this is not a valid
ID. |
static int read_id_table(long long *table_start)
{
/*
* Note on overflow limits:
* Size of SBlk.s.no_ids is 2^16 (unsigned short)
* Max size of bytes is 2^16*4 or 256K
* Max indexes is (2^16*4)/8K or 32
* Max length is ((2^16*4)/8K)*8 or 256
*/
int res, i;
int bytes = SQUASHFS_ID_BYTES(sBlk.s.no_ids);
i... | 0 | [
"CWE-22"
] | squashfs-tools | 79b5a555058eef4e1e7ff220c344d39f8cd09646 | 124,964,703,413,217,550,000,000,000,000,000,000,000 | 64 | Unsquashfs: fix write outside destination directory exploit
An issue on Github (https://github.com/plougher/squashfs-tools/issues/72)
shows how some specially crafted Squashfs filesystems containing
invalid file names (with '/' and ..) can cause Unsquashfs to write
files outside of the destination directory.
This com... |
int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *hp,
const struct sk_buff *skb, unsigned int header_len)
{
struct scatterlist sg;
const struct tcphdr *tp = tcp_hdr(skb);
struct hash_desc *desc = &hp->md5_desc;
unsigned int i;
const unsigned int head_data_len = skb_headlen(skb) > header_len ?
skb_head... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 321,863,324,440,564,500,000,000,000,000,000,000,000 | 35 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static inline int __pskb_trim(struct sk_buff *skb, unsigned int len)
{
if (skb->data_len)
return ___pskb_trim(skb, len);
__skb_trim(skb, len);
return 0; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 249,696,768,660,114,430,000,000,000,000,000,000,000 | 7 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static int mailbox_delete_carddav(struct mailbox *mailbox)
{
struct carddav_db *carddavdb = NULL;
carddavdb = carddav_open_mailbox(mailbox);
if (carddavdb) {
const mbentry_t mbentry = { .name = (char *)mailbox_name(mailbox),
.uniqueid = (char *)mailbox_uniqueid(m... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 238,428,100,860,250,150,000,000,000,000,000,000,000 | 15 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static void
e1000e_vm_state_change(void *opaque, int running, RunState state)
{
E1000ECore *core = opaque;
if (running) {
trace_e1000e_vm_state_running();
e1000e_intrmgr_resume(core);
e1000e_autoneg_resume(core);
} else {
trace_e1000e_vm_state_stopped();
e1000e_auton... | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 24,541,824,895,269,088,000,000,000,000,000,000,000 | 14 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
char **lxc_string_split_quoted(char *string)
{
char *nextword = string, *p, state;
char **result = NULL;
size_t result_capacity = 0;
size_t result_count = 0;
if (!string || !*string)
return calloc(1, sizeof(char *));
// TODO I'm *not* handling escaped quote
state = ' ';
for (p = string; *p; p++) {
switch(... | 0 | [
"CWE-417"
] | lxc | c1cf54ebf251fdbad1e971679614e81649f1c032 | 252,954,524,246,042,700,000,000,000,000,000,000,000 | 48 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
static int decode_block(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr)
{
EXRContext *s = avctx->priv_data;
AVFrame *const p = s->picture;
EXRThreadData *td = &s->thread_data[threadnr];
const uint8_t *channel_buffer[4] = { 0 };
const uint8_t *buf = s->buf;
ui... | 0 | [
"CWE-20",
"CWE-129"
] | FFmpeg | 26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777 | 301,334,367,618,255,430,000,000,000,000,000,000,000 | 304 | avcodec/exr: More strictly check dc_count
Fixes: out of array access
Fixes: exr/deneme
Found-by: Burak Çarıkçı <burakcarikci@crypttech.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
{
int cx, cy;
int px, py;
int fline;
cx = 0;
cy = 0;
#ifdef CHARSET_EBCDIC
c = ASC (c);
#endif /*CHARSET_EBCDIC */
if ((c < f->offset) || (c >= (f->offset + f->nchars)))
{
return;
}
fline = (c - f->o... | 0 | [
"CWE-190"
] | libgd | cfee163a5e848fc3e3fb1d05a30d7557cdd36457 | 132,561,768,005,802,520,000,000,000,000,000,000,000 | 29 | - #18, Removed invalid gdFree call when overflow2 fails
- #17, Free im->pixels as well on error |
void test_nghttp2_session_reprioritize_stream_with_idle_stream_dep(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
nghttp2_stream *stream;
nghttp2_priority_spec pri_spec;
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
callbacks.send_callback = block_count_send_callback;
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 272,392,462,305,990,530,000,000,000,000,000,000,000 | 30 | Add nghttp2_option_set_max_outbound_ack |
bytestring_to_str(wmem_allocator_t *scope, const guint8 *ad, const guint32 len, const char punct)
{
gchar *buf;
guint32 buflen = len;
gchar *buf_ptr;
int truncated = 0;
if (len == 0)
return wmem_strdup(scope, "");
if (!ad)
REPORT_DISSECTOR_BUG("Null pointer passed to bytestring_to_str()");
if (!punct)
r... | 0 | [
"CWE-125"
] | wireshark | d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1 | 54,978,328,335,822,900,000,000,000,000,000,000,000 | 32 | epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958. |
static void virtnet_config_changed(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
schedule_work(&vi->config_work);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 | 208,841,214,079,977,920,000,000,000,000,000,000,000 | 6 | virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.
A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.
Drop NETIF_F_FRA... |
static void Run(OpKernelContext *ctx, typename TTypes<T>::Scalar &s, const typename TTypes<T>::UnalignedVec &v) {
s.device(ctx->eigen_cpu_device()) = v.sum();
} | 0 | [
"CWE-125"
] | tensorflow | 87158f43f05f2720a374f3e6d22a7aaa3a33f750 | 14,352,629,159,288,104,000,000,000,000,000,000,000 | 3 | Prevent heap OOB in sparse reduction ops.
PiperOrigin-RevId: 387934524
Change-Id: I894aa30f1e454f09b471d565b4a325da49322c1a |
static const char *wsgi_set_group_authoritative(cmd_parms *cmd, void *mconfig,
const char *f)
{
WSGIDirectoryConfig *dconfig = NULL;
dconfig = (WSGIDirectoryConfig *)mconfig;
if (strcasecmp(f, "Off") == 0)
dconfig->group_authoritative = 0;
else if... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 202,676,134,441,652,100,000,000,000,000,000,000,000 | 15 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static inline struct inet_timewait_sock *tw_next(struct inet_timewait_sock *tw)
{
return !is_a_nulls(tw->tw_node.next) ?
hlist_nulls_entry(tw->tw_node.next, typeof(*tw), tw_node) : NULL;
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 208,342,800,436,177,080,000,000,000,000,000,000,000 | 5 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
static int io_timeout_remove_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
struct io_timeout_rem *tr = &req->timeout_rem;
if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
return -EINVAL;
if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT)))
return -EINVAL;
if (sqe->iopr... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 243,115,776,930,166,560,000,000,000,000,000,000,000 | 26 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
R_API void r_bin_java_stack_frame_free(void /*RBinJavaStackMapFrame*/ *o) {
RBinJavaStackMapFrame *obj = o;
if (obj) {
r_list_free (obj->local_items);
r_list_free (obj->stack_items);
free (obj->metas);
free (obj);
}
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 183,038,342,938,310,200,000,000,000,000,000,000,000 | 9 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
RZ_API int rz_core_print_bb_gml(RzCore *core, RzAnalysisFunction *fcn) {
RzAnalysisBlock *bb;
RzListIter *iter;
if (!fcn) {
return false;
}
int id = 0;
HtUUOptions opt = { 0 };
HtUU *ht = ht_uu_new_opt(&opt);
rz_cons_printf("graph\n[\n"
"hierarchic 1\n"
"label \"\"\n"
"directed 1\n... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 252,785,632,283,436,000,000,000,000,000,000,000,000 | 120 | 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... |
int subselect_uniquesubquery_engine::index_lookup()
{
DBUG_ENTER("subselect_uniquesubquery_engine::index_lookup");
int error;
TABLE *table= tab->table;
if (!table->file->inited)
table->file->ha_index_init(tab->ref.key, 0);
error= table->file->ha_index_read_map(table->record[0],
... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 209,183,160,042,314,500,000,000,000,000,000,000,000 | 33 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
void saio_box_del(GF_Box *s)
{
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox*)s;
if (ptr == NULL) return;
if (ptr->offsets) gf_free(ptr->offsets);
if (ptr->cached_data) gf_free(ptr->cached_data);
gf_free(ptr);
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 32,761,446,866,594,940,000,000,000,000,000,000,000 | 8 | fixed #2255 |
Item_int::Item_int(THD *thd, const char *str_arg, size_t length):
Item_num(thd)
{
char *end_ptr= (char*) str_arg + length;
int error;
value= my_strtoll10(str_arg, &end_ptr, &error);
max_length= (uint) (end_ptr - str_arg);
name.str= str_arg;
/*
We can't trust max_length as in show_routine_code we are u... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 297,022,181,462,953,200,000,000,000,000,000,000,000 | 15 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
GF_Err sdp_Read(GF_Box *s, GF_BitStream *bs)
{
u32 length;
GF_SDPBox *ptr = (GF_SDPBox *)s;
if (ptr == NULL) return GF_BAD_PARAM;
length = (u32) (ptr->size);
//sdp text has no delimiter !!!
ptr->sdpText = (char*)gf_malloc(sizeof(char) * (length+1));
if (!ptr->sdpText) return GF_OUT_OF_MEM;
gf_bs_read_data(bs,... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 149,245,555,899,707,150,000,000,000,000,000,000,000 | 15 | prevent dref memleak on invalid input (#1183) |
static int opt_show_versions(const char *opt, const char *arg)
{
mark_section_show_entries(SECTION_ID_PROGRAM_VERSION, 1, NULL);
mark_section_show_entries(SECTION_ID_LIBRARY_VERSION, 1, NULL);
return 0;
} | 0 | [
"CWE-476"
] | FFmpeg | 837cb4325b712ff1aab531bf41668933f61d75d2 | 161,365,277,529,502,550,000,000,000,000,000,000,000 | 6 | ffprobe: Fix null pointer dereference with color primaries
Found-by: AD-lab of venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd,
opj_image_t* p_output_image)
{
OPJ_UINT32 i, j;
OPJ_UINT32 l_width_src, l_height_src;
OPJ_UINT32 l_width_dest, l_height_dest;
OPJ_INT32 l_offset_x0_src, l_offset_y0_src, l_offset_x1_src, l_offset_y1_src;
OPJ_SIZE_T l_start_offset_s... | 0 | [
"CWE-20"
] | openjpeg | 73fdf28342e4594019af26eb6a347a34eceb6296 | 109,887,170,465,419,600,000,000,000,000,000,000,000 | 216 | opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only) |
relay_websocket_send_http (struct t_relay_client *client,
const char *http)
{
char *message;
int length;
length = 32 + strlen (http) + 1;
message = malloc (length);
if (message)
{
snprintf (message, length, "HTTP/1.1 %s\r\n\r\n", http);
relay_client_se... | 0 | [
"CWE-125"
] | weechat | 8b1331f98de1714bae15a9ca2e2b393ba49d735b | 3,218,075,622,556,710,600,000,000,000,000,000,000 | 16 | relay: fix crash when decoding a malformed websocket frame |
Network::Socket::Type socketType() const override { return socket_->socketType(); } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 95,628,227,934,616,700,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int get_pad_width(const int ngram_width) const {
// Ngrams can be padded with either a fixed pad width or a dynamic pad
// width depending on the 'pad_width' arg, but in no case should the padding
// ever be wider than 'ngram_width' - 1.
return std::min(pad_width_ < 0 ? ngram_width - 1 : pad_width_,
... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | ba424dd8f16f7110eea526a8086f1a155f14f22b | 230,136,420,433,988,200,000,000,000,000,000,000,000 | 7 | Enhance validation of ngram op and handle case of 0 tokens.
PiperOrigin-RevId: 369940178
Change-Id: Ia82f42c09d14efe76e7dc013505b832a42282f0b |
cdio_generic_read (void *user_data, void *buf, size_t size)
{
generic_img_private_t *p_env = user_data;
return read(p_env->fd, buf, size);
} | 0 | [
"CWE-415"
] | libcdio | dec2f876c2d7162da213429bce1a7140cdbdd734 | 160,465,779,293,914,120,000,000,000,000,000,000,000 | 5 | Removed wrong line |
static struct sk_buff *fq_tin_dequeue(struct fq *fq,
struct fq_tin *tin,
fq_tin_dequeue_t dequeue_func)
{
struct fq_flow *flow;
struct list_head *head;
struct sk_buff *skb;
lockdep_assert_held(&fq->lock);
begin:
head = &tin->new_flows;
if (list_empty(head)) {
head = &tin->old_flows;
if (... | 0 | [
"CWE-330"
] | linux | 55667441c84fa5e0911a0aac44fb059c15ba6da2 | 151,725,938,701,259,040,000,000,000,000,000,000,000 | 46 | net/flow_dissector: switch to siphash
UDP IPv6 packets auto flowlabels are using a 32bit secret
(static u32 hashrnd in net/core/flow_dissector.c) and
apply jhash() over fields known by the receivers.
Attackers can easily infer the 32bit secret and use this information
to identify a device and/or user, since this 32bi... |
CountChars(c)
int c;
{
StrCost++;
return c;
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 9,371,097,651,588,571,000,000,000,000,000,000,000 | 6 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
autoar_extractor_step_decide_destination (AutoarExtractor *self)
{
/* Step 2: Decide destination */
GList *files = NULL;
GList *l;
GFile *new_destination = NULL;
g_autofree char *destination_name;
for (l = self->files_list; l != NULL; l = l->next) {
char *relative_path;
GFile *file;
relative_... | 0 | [
"CWE-22"
] | gnome-autoar | adb067e645732fdbe7103516e506d09eb6a54429 | 61,082,107,917,067,050,000,000,000,000,000,000,000 | 71 | AutoarExtractor: Do not extract files outside the destination dir
Currently, a malicious archive can cause that the files are extracted
outside of the destination dir. This can happen if the archive contains
a file whose parent is a symbolic link, which points outside of the
destination dir. This is potentially a secu... |
void Context::setDecoderFilterCallbacks(Envoy::Http::StreamDecoderFilterCallbacks& callbacks) {
decoder_callbacks_ = &callbacks;
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 184,985,365,101,907,270,000,000,000,000,000,000,000 | 3 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
const char *end() const { return str + length + is_quoted(); } | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 312,278,987,010,072,400,000,000,000,000,000,000,000 | 1 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static int acm_tty_get_icount(struct tty_struct *tty,
struct serial_icounter_struct *icount)
{
struct acm *acm = tty->driver_data;
icount->dsr = acm->iocount.dsr;
icount->rng = acm->iocount.rng;
icount->dcd = acm->iocount.dcd;
icount->frame = acm->iocount.frame;
icount->overrun = acm->iocount.overrun;
icou... | 0 | [
"CWE-416"
] | linux | c52873e5a1ef72f845526d9f6a50704433f9c625 | 250,424,841,862,727,970,000,000,000,000,000,000,000 | 15 | usb: cdc-acm: make sure a refcount is taken early enough
destroy() will decrement the refcount on the interface, so that
it needs to be taken so early that it never undercounts.
Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: ... |
int unexpected(DviContext *dvi, int opcode)
{
dvierr(dvi, _("unexpected opcode %d\n"), opcode);
return -1;
} | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 68,952,234,594,631,880,000,000,000,000,000,000,000 | 5 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags)
{
char *csp = current_security();
struct socket_smack *ssp;
ssp = kzalloc(sizeof(struct socket_smack), gfp_flags);
if (ssp == NULL)
return -ENOMEM;
ssp->smk_in = csp;
ssp->smk_out = csp;
ssp->smk_packet[0] = '\0';
sk->sk_secur... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 179,350,751,653,330,250,000,000,000,000,000,000,000 | 17 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
NORET_TYPE void do_exit(long code)
{
struct task_struct *tsk = current;
int group_dead;
profile_task_exit(tsk);
WARN_ON(atomic_read(&tsk->fs_excl));
if (unlikely(in_interrupt()))
panic("Aiee, killing interrupt handler!");
if (unlikely(!tsk->pid))
panic("Attempted to kill the idle task!");
tracehook_repor... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | linux | b69f2292063d2caf37ca9aec7d63ded203701bf3 | 338,485,346,983,087,950,000,000,000,000,000,000,000 | 136 | block: Fix io_context leak after failure of clone with CLONE_IO
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never
decremented whenever copy_process() fails afterwards, which prevents
exit_io_context() from calling IO schedulers exit functions.
Give a task_struct to exit_io_context(), and call exi... |
void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len);
static inline void skb_free_datagram_locked(struct sock *sk,
struct sk_buff *skb)
{
__skb_free_datagram_locked(sk, skb, 0); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 65,148,270,407,341,730,000,000,000,000,000,000,000 | 5 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static void zend_error_va(int type, const char *file, uint lineno, const char *format, ...) /* {{{ */
{
va_list args;
va_start(args, format);
zend_error_cb(type, file, lineno, format, args);
va_end(args);
} | 0 | [] | php-src | a894a8155fab068d68a04bf181dbaddfa01ccbb0 | 313,633,724,532,951,250,000,000,000,000,000,000,000 | 8 | More fixes for bug #69152 |
write32 (FILE *f,
guint32 *data,
gint count)
{
gint i;
for (i = 0; i < count; i++)
data[i] = GUINT32_TO_LE (data[i]);
return write8 (f, (guint8*) data, count * 4);
} | 0 | [
"CWE-787"
] | gdk-pixbuf | 88af50a864195da1a4f7bda5f02539704fbda599 | 96,544,123,685,908,500,000,000,000,000,000,000,000 | 11 | ico: Be more careful when parsing headers
There is some redundancy between the ico directory and the
bitmap image header. If the two disagree on the icon dimensions,
just toss the image, instead of risking crashes or OOM later. Also
add some more debug spew that helped in tracking this down, and
make error messages mo... |
static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path)
{
int k, l = path->p_depth;
ext_debug("path:");
for (k = 0; k <= l; k++, path++) {
if (path->p_idx) {
ext_debug(" %d->%llu", le32_to_cpu(path->p_idx->ei_block),
ext4_idx_pblock(path->p_idx));
} else if (path->p_ext) {
... | 0 | [
"CWE-362"
] | linux-2.6 | dee1f973ca341c266229faa5a1a5bb268bed3531 | 56,094,061,843,982,430,000,000,000,000,000,000,000 | 20 | ext4: race-condition protection for ext4_convert_unwritten_extents_endio
We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map->m_len] because
it was already split during submission. But this may not be true due to
a race between writeback vs fa... |
static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */
{
if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
zval *obj;
MAKE_STD_ZVAL(obj);
if (Z_OBJ_HANDLER_P(*arg, cast_object)(*arg, obj, type TSRMLS_CC) == SUCCESS) {
zval_ptr_dtor(arg);
*arg = obj;
*pl = Z_STRLEN_PP(... | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 327,761,518,546,504,300,000,000,000,000,000,000,000 | 42 | Fix bug #73147: Use After Free in PHP7 unserialize() |
static char ssl_next_proto_validate(unsigned char *d, unsigned len)
{
unsigned int off = 0;
while (off < len) {
if (d[off] == 0)
return 0;
off += d[off];
off++;
}
return off == len;
} | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 196,696,704,964,627,560,000,000,000,000,000,000,000 | 13 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c |
static int item_val_int(struct st_mysql_value *value, long long *buf)
{
Item *item= ((st_item_value_holder*)value)->item;
*buf= item->val_int();
if (item->is_null())
return 1;
return 0;
} | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 318,559,720,795,476,760,000,000,000,000,000,000,000 | 8 | MDEV-26323 use-after-poison issue of MariaDB server |
uint64_t smb_roundup(connection_struct *conn, uint64_t val)
{
uint64_t rval = lp_allocation_roundup_size(SNUM(conn));
/* Only roundup for Windows clients. */
enum remote_arch_types ra_type = get_remote_arch();
if (rval && (ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
val = SMB_ROUNDUP(val,rval);
}
return ... | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 131,758,393,273,664,440,000,000,000,000,000,000,000 | 11 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
static int bpf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct inode *inode;
if (bpf_dname_reserved(dentry))
return -EPERM;
inode = bpf_get_inode(dir->i_sb, dir, mode | S_IFDIR);
if (IS_ERR(inode))
return PTR_ERR(inode);
inode->i_op = &bpf_dir_iops;
inode->i_fop = &simple_dir_operati... | 0 | [
"CWE-703"
] | linux | 92117d8443bc5afacc8d5ba82e541946310f106e | 161,028,141,806,735,700,000,000,000,000,000,000,000 | 22 | bpf: fix refcnt overflow
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK,
the malicious application may overflow 32-bit bpf program refcnt.
It's also possible to overflow map refcnt on 1Tb system.
Impose 32k hard limit which means that the same bpf program or
map cannot be shared by more than ... |
void gf_bs_prevent_dispatch(GF_BitStream *bs, Bool prevent_dispatch)
{
if (!bs) return;
if (prevent_dispatch) {
bs->prevent_dispatch ++;
return;
}
if (!bs->prevent_dispatch) return;
bs->prevent_dispatch --;
if (bs->on_block_out && !bs->prevent_dispatch) {
assert(bs->position >= bs->bytes_out);
if (bs->po... | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 19,279,048,744,489,270,000,000,000,000,000,000,000 | 18 | fixed #2165 |
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes)
/*[clinic end generated code: output=28602e586f524e82 input=88811b09dfbc2988]*/
{
return do_argstrip(self, LEFTSTRIP, bytes);
} | 0 | [
"CWE-190"
] | cpython | fd8614c5c5466a14a945db5b059c10c0fb8f76d9 | 119,085,472,523,933,660,000,000,000,000,000,000,000 | 5 | bpo-30657: Fix CVE-2017-1000158 (#4664)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
int security_task_setioprio(struct task_struct *p, int ioprio)
{
return security_ops->task_setioprio(p, ioprio);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 145,773,552,185,037,300,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
vmod_regsub(VRT_CTX, VCL_HTTP hp, VCL_REGEX re,
VCL_STRING sub, VCL_BOOL all)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
AN(re);
for (unsigned u = HTTP_HDR_FIRST; u < hp->nhd; u++) {
const char *hdr;
VCL_STRING rewrite;
Tcheck(hp->hd[u]);
hdr = hp->hd[u].b;
if (!VRT_... | 0 | [
"CWE-476"
] | varnish-modules | 2c120e576ebb73bc247790184702ba58dc0afc39 | 261,053,922,707,714,360,000,000,000,000,000,000,000 | 24 | Check VRT_StrandsWS() return value
Fixes: VSV00006 |
**/
CImg<T>& load_pfm(const char *const filename) {
return _load_pfm(0,filename); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 155,178,225,184,449,190,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int check_kill_permission(int sig, struct kernel_siginfo *info,
struct task_struct *t)
{
struct pid *sid;
int error;
if (!valid_signal(sig))
return -EINVAL;
if (!si_fromuser(info))
return 0;
error = audit_signal_info(sig, t); /* Let audit system see the signal */
if (error)
return error;
if... | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 91,227,278,621,405,300,000,000,000,000,000,000,000 | 35 | 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... |
zend_function *spl_filesystem_object_get_method_check(zend_object **object, zend_string *method, const zval *key) /* {{{ */
{
spl_filesystem_object *fsobj = spl_filesystem_from_obj(*object);
if (fsobj->u.dir.dirp == NULL && fsobj->orig_path == NULL) {
zend_function *func;
zend_string *tmp = zend_string_init("_ba... | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 300,540,077,702,147,130,000,000,000,000,000,000,000 | 14 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
void __cpuinit init_idle(struct task_struct *idle, int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long flags;
raw_spin_lock_irqsave(&rq->lock, flags);
__sched_fork(idle);
idle->state = TASK_RUNNING;
idle->se.exec_start = sched_clock();
cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu));
/*
* We're having... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 23,757,380,416,944,440,000,000,000,000,000,000,000 | 44 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
getline_equal(
char_u *(*fgetline)(int, void *, int),
void *cookie UNUSED, /* argument for fgetline() */
char_u *(*func)(int, void *, int))
{
#ifdef FEAT_EVAL
char_u *(*gp)(int, void *, int);
struct loop_cookie *cp;
/* When "fgetline" is "get_loop_line()" use the "cookie" to find the
* f... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 89,586,100,044,232,010,000,000,000,000,000,000,000 | 24 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
double js_tonumber(js_State *J, int idx)
{
return jsV_tonumber(J, stackidx(J, idx));
} | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 120,115,160,408,631,730,000,000,000,000,000,000,000 | 4 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
static int query_raw_packet_qp_rq_state(struct mlx5_ib_dev *dev,
struct mlx5_ib_rq *rq,
u8 *rq_state)
{
void *out;
void *rqc;
int inlen;
int err;
inlen = MLX5_ST_SZ_BYTES(query_rq_out);
out = kvzalloc(inlen, GFP_KERNEL);
if (!out)
return -ENOMEM;
err = mlx5_core_query_rq(dev->mdev, rq->base.mqp.qp... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 5,531,552,518,647,873,000,000,000,000,000,000,000 | 26 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
dummy_callback (gpointer data)
{
return G_SOURCE_CONTINUE;
} | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 19,525,196,826,345,528,000,000,000,000,000,000,000 | 4 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
bool TLSWrap::IsClosing() {
return underlying_stream()->IsClosing();
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 101,174,024,115,042,660,000,000,000,000,000,000,000 | 3 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
gdk_pixbuf_loader_get_type (void)
{
static GType loader_type = 0;
if (!loader_type)
{
static const GTypeInfo loader_info = {
sizeof (GdkPixbufLoaderClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_pixbuf_loader_class_init,
NULL, ... | 0 | [
"CWE-20"
] | gdk-pixbuf | 3bac204e0d0241a0d68586ece7099e6acf0e9bea | 74,402,747,947,637,290,000,000,000,000,000,000,000 | 26 | Initial stab at getting the focus code to work.
Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at
getting the focus code to work.
(gtk_tree_view_class_init): Add a bunch of keybindings.
* gtk/gtktreeviewcolumn.c
(gtk_tree_view_column_set_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.