func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
gif_prepare_lzw (GifContext *context)
{
gint i;
if (!gif_read (context, &(context->lzw_set_code_size), 1)) {
/*g_message (_("GIF: EOF / read error on image data\n"));*/
return -1;
}
context->lzw_code_size = context->lzw_set_code_size + 1;
context->lzw_clear_code = 1 << context->lzw_set_code_size;
context->l... | 1 | [
"CWE-20"
] | gdk-pixbuf | 3bac204e0d0241a0d68586ece7099e6acf0e9bea | 199,042,645,679,168,100,000,000,000,000,000,000,000 | 32 | 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... |
Image::AutoPtr newPsdInstance(BasicIo::AutoPtr io, bool /*create*/)
{
Image::AutoPtr image(new PsdImage(io));
if (!image->good())
{
image.reset();
}
return image;
} | 0 | [
"CWE-125"
] | exiv2 | 68966932510213b5656fcf433ab6d7e26f48e23b | 218,329,519,395,951,500,000,000,000,000,000,000,000 | 9 | PSD: Use Safe::add for preventing overflows in PSD files |
bool open_and_lock_internal_tables(TABLE *table, bool lock_table)
{
THD *thd= table->in_use;
TABLE_LIST *tl;
MYSQL_LOCK *save_lock,*new_lock;
DBUG_ENTER("open_and_lock_internal_tables");
/* remove pointer to old select_lex which is already destroyed */
for (tl= table->internal_tables ; tl ; tl= tl->next_gl... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 138,228,437,694,752,900,000,000,000,000,000,000,000 | 43 | 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. |
void init(READ_RECORD *info)
{
cursor.init(info);
at_partition_end= false;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 252,836,814,669,712,240,000,000,000,000,000,000,000 | 5 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
void nego_process_negotiation_request(rdpNego* nego, wStream* s)
{
BYTE flags;
UINT16 length;
Stream_Read_UINT8(s, flags);
Stream_Read_UINT16(s, length);
Stream_Read_UINT32(s, nego->RequestedProtocols);
WLog_DBG(TAG, "RDP_NEG_REQ: RequestedProtocol: 0x%08" PRIX32 "", nego->RequestedProtocols);
nego->state = NEGO... | 1 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 159,600,546,744,618,120,000,000,000,000,000,000,000 | 10 | Fixed oob read in irp_write and similar |
TEST(AsyncSSLSocketTest, SNITestChangeServerName) {
EventBase eventBase;
std::shared_ptr<SSLContext> clientCtx(new SSLContext);
std::shared_ptr<SSLContext> dfServerCtx(new SSLContext);
// Use the same SSLContext to continue the handshake after
// tlsext_hostname match.
std::shared_ptr<SSLContext> hskServerC... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 220,514,703,641,890,350,000,000,000,000,000,000,000 | 27 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
R_API int r_sys_usleep(int usecs) {
#if HAS_CLOCK_NANOSLEEP
struct timespec rqtp;
rqtp.tv_sec = usecs / 1000000;
rqtp.tv_nsec = (usecs - (rqtp.tv_sec * 1000000)) * 1000;
return clock_nanosleep (CLOCK_MONOTONIC, 0, &rqtp, NULL);
#elif __UNIX__
return usleep (usecs);
#else
// w32 api uses milliseconds
usecs /= 100... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 284,732,418,405,873,900,000,000,000,000,000,000,000 | 15 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
ssh_buffer_get_ssh_string(struct ssh_buffer_struct *buffer)
{
uint32_t stringlen;
uint32_t hostlen;
struct ssh_string_struct *str = NULL;
int rc;
rc = ssh_buffer_get_u32(buffer, &stringlen);
if (rc == 0) {
return NULL;
}
hostlen = ntohl(stringlen);
/* verify if there is enou... | 0 | [
"CWE-476"
] | libssh-mirror | 10b3ebbe61a7031a3dae97f05834442220447181 | 286,608,627,432,206,100,000,000,000,000,000,000,000 | 31 | buffer: Reformat ssh_buffer_add_data()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com> |
CNF_GetKeysFile(void)
{
return keys_file;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 304,658,508,299,392,130,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
explicit RandomBinomialOp(OpKernelConstruction* context)
: OpKernel(context) {} | 0 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 261,713,795,931,584,850,000,000,000,000,000,000,000 | 2 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
cachedb_get_funcblock(void)
{
return &cachedb_block;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 288,785,892,339,171,500,000,000,000,000,000,000,000 | 4 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
int DCTStream::getChars(int nChars, unsigned char *buffer)
{
for (int i = 0; i < nChars;) {
if (current == limit) {
if (!readLine())
return i;
}
int left = limit - current;
if (left + i > nChars)
left = nChars - i;
memcpy(buffer + i, cu... | 0 | [
"CWE-787"
] | poppler | ae614bf8ab42c9d0c7ac57ecdfdcbcfc4ff6c639 | 266,553,708,621,182,700,000,000,000,000,000,000,000 | 16 | Fix DCTStream::getChars we're reading past the buffer check
I wonder how this had never crashed before :S
Fixes #1011 |
static void bnx2x_cnic_cfc_comp(struct bnx2x *bp, int cid, u8 err)
{
struct cnic_ctl_info ctl = {0};
/* first we tell CNIC and only then we count this as a completion */
ctl.cmd = CNIC_CTL_COMPLETION_CMD;
ctl.data.comp.cid = cid;
ctl.data.comp.error = err;
bnx2x_cnic_ctl_send_bh(bp, &ctl);
bnx2x_cnic_sp_post(b... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 5,386,906,663,055,229,000,000,000,000,000,000,000 | 12 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static tsize_t tiff_readproc(thandle_t clientdata, tdata_t data, tsize_t size)
{
tiff_handle *th = (tiff_handle *)clientdata;
gdIOCtx *ctx = th->ctx;
size = (ctx->getBuf)(ctx, data, size);
return size;
} | 0 | [
"CWE-125"
] | libgd | 4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae | 254,508,691,780,386,000,000,000,000,000,000,000,000 | 9 | Fix invalid read in gdImageCreateFromTiffPtr()
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, bu... |
ofputil_encode_ofp12_packet_in(const struct ofputil_packet_in *pin,
enum ofp_version version)
{
enum ofpraw raw = (version >= OFP13_VERSION
? OFPRAW_OFPT13_PACKET_IN
: OFPRAW_OFPT12_PACKET_IN);
struct ofpbuf *msg;
/* The final arg... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 125,598,174,813,023,670,000,000,000,000,000,000,000 | 28 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void __fastcall TSCPFileSystem::CopyToRemote(TStrings * FilesToCopy,
const UnicodeString TargetDir, const TCopyParamType * CopyParam,
int Params, TFileOperationProgressType * OperationProgress,
TOnceDoneOperation & OnceDoneOperation)
{
// scp.c: source(), toremote()
DebugAssert(FilesToCopy && OperationP... | 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 307,550,112,403,443,800,000,000,000,000,000,000,000 | 218 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
bool Item_param::can_return_value() const
{
// There's no "default". See comments in Item_param::save_in_field().
switch (state) {
case SHORT_DATA_VALUE:
case LONG_DATA_VALUE:
return true;
case IGNORE_VALUE:
case DEFAULT_VALUE:
invalid_default_param();
// fall through
case NULL_VALUE:
retu... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 240,693,066,757,842,870,000,000,000,000,000,000,000 | 20 | 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. |
static void clear_jmp_history(struct bpf_verifier_state *state)
{
kfree(state->jmp_history);
state->jmp_history = NULL;
state->jmp_history_cnt = 0;
} | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 299,963,914,856,486,170,000,000,000,000,000,000,000 | 6 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
ClientHttpRequest::handleAdaptedHeader(HttpMsg *msg)
{
assert(msg);
if (HttpRequest *new_req = dynamic_cast<HttpRequest*>(msg)) {
// update the new message to flag whether URL re-writing was done on it
if (request->effectiveRequestUri() != new_req->effectiveRequestUri())
new_req->f... | 0 | [
"CWE-116"
] | squid | e7cf864f938f24eea8af0692c04d16790983c823 | 106,412,313,623,098,340,000,000,000,000,000,000,000 | 42 | Handle more Range requests (#790)
Also removed some effectively unused code. |
dummy_data_cb (void *opaque, const void *buffer, size_t length)
{
(void)opaque;
(void)buffer;
(void)length;
return 0;
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 248,251,126,027,224,730,000,000,000,000,000,000,000 | 7 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
calcTabPos(void)
{
TabBuffer *tab;
#if 0
int lcol = 0, rcol = 2, col;
#else
int lcol = 0, rcol = 0, col;
#endif
int n1, n2, na, nx, ny, ix, iy;
#ifdef USE_MOUSE
lcol = mouse_action.menu_str ? mouse_action.menu_width : 0;
#endif
if (nTab <= 0)
return;
n1 = (COLS - rcol - lcol) / TabCols;
... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 78,892,580,090,782,560,000,000,000,000,000,000,000 | 55 | Make temporary directory safely when ~/.w3m is unwritable |
void __hci_req_update_adv_data(struct hci_request *req, u8 instance)
{
struct hci_dev *hdev = req->hdev;
u8 len;
if (!hci_dev_test_flag(hdev, HCI_LE_ENABLED))
return;
if (ext_adv_capable(hdev)) {
struct hci_cp_le_set_ext_adv_data cp;
memset(&cp, 0, sizeof(cp));
len = create_instance_adv_data(hdev, insta... | 0 | [
"CWE-362"
] | linux | e2cb6b891ad2b8caa9131e3be70f45243df82a80 | 264,791,715,796,854,530,000,000,000,000,000,000,000 | 49 | bluetooth: eliminate the potential race condition when removing the HCI controller
There is a possible race condition vulnerability between issuing a HCI
command and removing the cont. Specifically, functions hci_req_sync()
and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | th... |
static void show_subtitle(WriterContext *w, AVSubtitle *sub, AVStream *stream,
AVFormatContext *fmt_ctx)
{
AVBPrint pbuf;
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
writer_print_section_header(w, SECTION_ID_SUBTITLE);
print_str ("media_type", "subtitle");
... | 0 | [
"CWE-476"
] | FFmpeg | 837cb4325b712ff1aab531bf41668933f61d75d2 | 136,148,791,756,821,680,000,000,000,000,000,000,000 | 22 | ffprobe: Fix null pointer dereference with color primaries
Found-by: AD-lab of venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
log_maybe(
u_int *pnerr,
const char *fmt ,
...)
{
va_list ap;
if (++(*pnerr) <= nerr_loglimit) {
va_start(ap, fmt);
mvsyslog(LOG_ERR, fmt, ap);
va_end(ap);
}
} | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 225,141,119,861,026,170,000,000,000,000,000,000,000 | 12 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
static int snd_timer_user_pause(struct file *file)
{
int err;
struct snd_timer_user *tu;
tu = file->private_data;
if (!tu->timeri)
return -EBADFD;
err = snd_timer_pause(tu->timeri);
if (err < 0)
return err;
return 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | e7af6307a8a54f0b873960b32b6a644f2d0fbd97 | 104,999,715,100,340,010,000,000,000,000,000,000,000 | 13 | ALSA: timer: Fix incorrectly assigned timer instance
The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in
snd_timer_open()") unified the error handling code paths with the
standard goto, but it introduced a subtle bug: the timer instance is
stored in snd_timer_open() incorrectly even if it returns an... |
TPMS_SIG_SCHEME_RSASSA_Unmarshal(TPMS_SIG_SCHEME_RSASSA *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPMS_SCHEME_HASH_Unmarshal(target, buffer, size);
}
return rc;
} | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 47,602,974,699,943,870,000,000,000,000,000,000,000 | 9 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static void try_to_generate_entropy(void)
{
struct {
unsigned long now;
struct timer_list timer;
} stack;
stack.now = random_get_entropy();
/* Slow counter - or none. Don't even bother */
if (stack.now == random_get_entropy())
return;
timer_setup_on_stack(&stack.timer, entropy_timer, 0);
while (!crng_re... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 30,985,833,458,309,357,000,000,000,000,000,000,000 | 26 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
proto_reg_handoff_dnp3(void)
{
/* register as heuristic dissector for both TCP and UDP */
heur_dissector_add("tcp", dissect_dnp3_tcp_heur, "DNP 3.0 over TCP", "dnp3_tcp", proto_dnp3, HEURISTIC_DISABLE);
heur_dissector_add("udp", dissect_dnp3_udp_heur, "DNP 3.0 over UDP", "dnp3_udp", proto_dnp3, HEURISTIC_DISABLE)... | 0 | [
"CWE-835"
] | wireshark | 618661b22e34a59b21117db723d8ff91e064d4ba | 990,064,621,296,611,400,000,000,000,000,000,000 | 12 | dnp: plug a memory leak.
If we're throwing away the data, *throw away the data* - free it, as
we're not using it as the backing data for a tvbuff. |
SetenvFin2(buf, len, data)
char *buf;
int len;
char *data; /* dummy */
{
if (!len || !display)
return;
debug2("SetenvFin2: setenv '%s' '%s'\n", setenv_var, buf);
xsetenv(setenv_var, buf);
MakeNewEnv();
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 18,337,914,537,015,900,000,000,000,000,000,000,000 | 11 | 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 ... |
HttpStateData::reusableReply(HttpStateData::ReuseDecision &decision)
{
HttpReply const *rep = finalReply();
HttpHeader const *hdr = &rep->header;
const char *v;
#if USE_HTTP_VIOLATIONS
const RefreshPattern *R = NULL;
/* This strange looking define first looks up the refresh pattern
* and then... | 0 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 105,362,147,464,180,590,000,000,000,000,000,000,000 | 252 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... |
static void remove_value(gpointer data, gpointer user_data)
{
char *value = data;
g_free(value);
} | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 309,612,740,145,849,060,000,000,000,000,000,000,000 | 5 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
static void LoadOpenCLDevices(MagickCLEnv clEnv)
{
cl_context_properties
properties[3];
cl_device_id
*devices;
cl_int
status;
cl_platform_id
*platforms;
cl_uint
i,
j,
next,
number_devices,
number_platforms;
size_t
length;
number_platforms=0;
if (openCL_libra... | 1 | [
"CWE-476"
] | ImageMagick | de5deab202c340162b65f65bafbbe17b1eda2c1a | 34,307,562,535,127,460,000,000,000,000,000,000,000 | 156 | https://github.com/ImageMagick/ImageMagick/issues/794 |
struct dump_dir *dd_create_skeleton(const char *dir, uid_t uid, mode_t mode, int flags)
{
/* a little trick to copy read bits from file mode to exec bit of dir mode*/
mode_t dir_mode = mode | ((mode & 0444) >> 2);
struct dump_dir *dd = dd_init();
dd->mode = mode;
/* Unlike dd_opendir, can't use re... | 1 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 226,482,461,782,609,030,000,000,000,000,000,000,000 | 100 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
void evalGenericCommandWithDebugging(client *c, int evalsha) {
if (ldbStartSession(c)) {
evalGenericCommand(c,evalsha);
ldbEndSession(c);
} else {
ldbDisable(c);
}
} | 0 | [
"CWE-703",
"CWE-125"
] | redis | 6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd | 306,614,797,326,831,830,000,000,000,000,000,000,000 | 8 | Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672)
The protocol parsing on 'ldbReplParseCommand' (LUA debugging)
Assumed protocol correctness. This means that if the following
is given:
*1
$100
test
The parser will try to read additional 94 unallocated bytes after
the client buffer.
This commit fixes this ... |
dns_message_reset(dns_message_t *msg, unsigned int intent) {
REQUIRE(DNS_MESSAGE_VALID(msg));
REQUIRE(intent == DNS_MESSAGE_INTENTPARSE
|| intent == DNS_MESSAGE_INTENTRENDER);
msgreset(msg, false);
msg->from_to_wire = intent;
} | 0 | [
"CWE-617"
] | bind9 | 6ed167ad0a647dff20c8cb08c944a7967df2d415 | 177,920,796,679,222,250,000,000,000,000,000,000,000 | 8 | Always keep a copy of the message
this allows it to be available even when dns_message_parse()
returns a error. |
void Server::handleCommand_InventoryFields(NetworkPacket* pkt)
{
std::string client_formspec_name;
u16 num;
*pkt >> client_formspec_name >> num;
StringMap fields;
for (u16 k = 0; k < num; k++) {
std::string fieldname;
*pkt >> fieldname;
fields[fieldname] = pkt->readLongString();
}
session_t peer_id = pk... | 0 | [
"CWE-276"
] | minetest | 3693b6871eba268ecc79b3f52d00d3cefe761131 | 130,568,749,627,203,570,000,000,000,000,000,000,000 | 63 | Prevent players accessing inventories of other players (#10341) |
pdf_writer_begin_page(fz_context *ctx, fz_document_writer *wri_, const fz_rect *mediabox)
{
pdf_writer *wri = (pdf_writer*)wri_;
wri->mediabox = *mediabox;
return pdf_page_write(ctx, wri->pdf, &wri->mediabox, &wri->resources, &wri->contents);
} | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 222,734,046,852,586,700,000,000,000,000,000,000,000 | 6 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
int l2tp_packet_send(int sock, struct l2tp_packet_t *pack)
{
uint8_t *buf = mempool_alloc(buf_pool);
struct l2tp_avp_t *avp;
struct l2tp_attr_t *attr;
uint8_t *ptr;
int n;
int len = sizeof(pack->hdr);
if (!buf) {
log_emerg("l2tp: out of memory\n");
return -1;
}
memset(buf, 0, L2TP_MAX_PACKET_SIZE);
ptr... | 1 | [
"CWE-119",
"CWE-125",
"CWE-120"
] | accel-ppp | 2324bcd5ba12cf28f47357a8f03cd41b7c04c52b | 304,682,554,037,266,400,000,000,000,000,000,000,000 | 77 | l2tp: fix RCE through buffer overflow & fix LE/BE compatibility
Unsufficent checks of valid l2tp header & avp length cause possible
RCE through buffer overflow, reported by https://github.com/WinMin
swings & leommxj, Chaitin Security Research Lab. Add missed header
length and avp length validation to fix the issue.
O... |
static struct workqueue_attrs *wq_sysfs_prep_attrs(struct workqueue_struct *wq)
{
struct workqueue_attrs *attrs;
lockdep_assert_held(&wq_pool_mutex);
attrs = alloc_workqueue_attrs(GFP_KERNEL);
if (!attrs)
return NULL;
copy_workqueue_attrs(attrs, wq->unbound_attrs);
return attrs;
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 216,334,972,625,582,360,000,000,000,000,000,000,000 | 13 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
dissect_fp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_tree *fp_tree;
proto_item *ti;
gint offset = 0;
struct fp_info *p_fp_info;
rlc_info *rlcinf;
conversation_t *p_conv;
umts_fp_conversation_info_t *p_conv_data = NULL... | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 11,178,655,105,667,605,000,000,000,000,000,000,000 | 264 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key) {
_cleanup_(dns_transaction_freep) DnsTransaction *t = NULL;
int r;
assert(ret);
assert(s);
assert(key);
/* Don't allow looking up invalid or pseudo RRs */
if (!dns_type_is_valid_que... | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 130,993,563,588,064,500,000,000,000,000,000,000,000 | 67 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
MagickExport void ConvertLCHuvToRGB(const double luma,const double chroma,
const double hue,Quantum *red,Quantum *green,Quantum *blue)
{
double
X,
Y,
Z;
/*
Convert LCHuv to RGB colorspace.
*/
assert(red != (Quantum *) NULL);
assert(green != (Quantum *) NULL);
assert(blue != (Quantum *) NULL... | 0 | [
"CWE-369"
] | ImageMagick6 | 90255f0834eead08d59f46b0bda7b1580451cc0f | 161,470,942,383,681,740,000,000,000,000,000,000,000 | 17 | https://github.com/ImageMagick/ImageMagick/issues/3077 |
void Gfx::opEOFillStroke(Object args[], int numArgs) {
if (!state->isCurPt()) {
//error(getPos(), "No path in eofill/stroke");
return;
}
if (state->isPath() && !contentIsHidden()) {
if (state->getFillColorSpace()->getMode() == csPattern) {
doPatternFill(gTrue);
} else {
out->eoFill(sta... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 60,313,248,466,105,680,000,000,000,000,000,000,000 | 19 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
int line_size)
{
int i;
/* read the pixels */
for(i=0;i<8;i++) {
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
pix... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 189,718,269,266,752,600,000,000,000,000,000,000,000 | 19 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void ext4_destroy_inode(struct inode *inode)
{
if (!list_empty(&(EXT4_I(inode)->i_orphan))) {
ext4_msg(inode->i_sb, KERN_ERR,
"Inode %lu (%p): orphan list check failed!",
inode->i_ino, EXT4_I(inode));
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 16, 4,
EXT4_I(inode), sizeof(struct ext4_ino... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 163,351,259,935,282,880,000,000,000,000,000,000,000 | 12 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
s32 gf_hevc_read_sps_ex(char *data, u32 size, HEVCState *hevc, u32 *vui_flag_pos)
{
GF_BitStream *bs;
s32 sps_id = -1;
u8 layer_id;
if (vui_flag_pos) *vui_flag_pos = 0;
bs = gf_bs_new(data, size, GF_BITSTREAM_READ);
if (!bs) goto exit;
gf_bs_enable_emulation_byte_removal(bs, GF_TRUE);
if (!hevc_parse_nal_hea... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 83,842,435,132,691,220,000,000,000,000,000,000,000 | 19 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
static u8 mcps_data_request(
u8 src_addr_mode,
u8 dst_address_mode,
u16 dst_pan_id,
union macaddr *dst_addr,
u8 msdu_length,
u8 *msdu,
u8 msdu_handle,
u8 tx_options,
struct secspec *security,
void *de... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 6402939ec86eaf226c8b8ae00ed983936b164908 | 28,505,409,225,307,120,000,000,000,000,000,000,000 | 58 | ieee802154: ca8210: prevent memory leak
In ca8210_probe the allocated pdata needs to be assigned to
spi_device->dev.platform_data before calling ca8210_get_platform_data.
Othrwise when ca8210_get_platform_data fails pdata cannot be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lor... |
static int nlmsg_populate_fdb_fill(struct sk_buff *skb,
struct net_device *dev,
u8 *addr, u32 pid, u32 seq,
int type, unsigned int flags,
int nlflags)
{
struct nlmsghdr *nlh;
struct ndmsg *ndm;
nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndm), nlflags);
if (!nlh)
return -EMSGSIZE;
... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 128,450,133,418,448,520,000,000,000,000,000,000,000 | 31 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
{
struct hci_ev_auth_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn)
... | 1 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 91,946,002,193,154,120,000,000,000,000,000,000,000 | 69 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
static struct hlist_head *nl_pid_hash_zalloc(size_t size)
{
if (size <= PAGE_SIZE)
return kzalloc(size, GFP_ATOMIC);
else
return (struct hlist_head *)
__get_free_pages(GFP_ATOMIC | __GFP_ZERO,
get_order(size));
} | 0 | [
"CWE-287",
"CWE-284"
] | linux | e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea | 163,194,399,022,743,970,000,000,000,000,000,000,000 | 9 | af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially NetworkManager accept spoofed Netlink messages because of a
kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data
to the receiver if the sender did not provide such data, instead of not
includ... |
static void find_refs(RCore *core, const char *glob) {
char cmd[128];
ut64 curseek = core->offset;
while (*glob == ' ') glob++;
if (!*glob) {
glob = "str.";
}
if (*glob == '?') {
eprintf ("Usage: axF [flag-str-filter]\n");
return;
}
eprintf ("Finding references of flags matching '%s'...\n", glob);
snprin... | 0 | [
"CWE-703",
"CWE-908"
] | radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | 261,190,074,643,699,580,000,000,000,000,000,000,000 | 18 | Fix segfault in adf (#16230) |
do_block_io_op(struct xen_blkif *blkif)
{
union blkif_back_rings *blk_rings = &blkif->blk_rings;
int more_to_do;
do {
more_to_do = __do_block_io_op(blkif);
if (more_to_do)
break;
RING_FINAL_CHECK_FOR_REQUESTS(&blk_rings->common, more_to_do);
} while (more_to_do);
return more_to_do;
} | 0 | [
"CWE-20"
] | linux-2.6 | 604c499cbbcc3d5fe5fb8d53306aa0fae1990109 | 22,906,450,155,625,580,000,000,000,000,000,000,000 | 15 | xen/blkback: Check device permissions before allowing OP_DISCARD
We need to make sure that the device is not RO or that
the request is not past the number of sectors we want to
issue the DISCARD operation for.
This fixes CVE-2013-2140.
Cc: stable@vger.kernel.org
Acked-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Ia... |
inline void Mul(const ArithmeticParams& params,
const RuntimeShape& input1_shape, const int32* input1_data,
const RuntimeShape& input2_shape, const int32* input2_data,
const RuntimeShape& output_shape, int32* output_data) {
ruy::profiler::ScopeLabel label("Mul/int32/act... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 201,917,174,817,768,660,000,000,000,000,000,000,000 | 16 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
static ZIPARCHIVE_METHOD(statName)
{
struct zip *intern;
zval *self = getThis();
zend_long flags = 0;
struct zip_stat sb;
zend_string *name;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|l", &name, &flags) == FAILURE) {
return;
}
PHP_ZIP_STA... | 0 | [
"CWE-190"
] | php-src | 3b8d4de300854b3517c7acb239b84f7726c1353c | 66,813,726,480,491,010,000,000,000,000,000,000,000 | 22 | Fix bug #71923 - integer overflow in ZipArchive::getFrom* |
Status V1UserDocumentParser::initializeUserRolesFromUserDocument(User* user,
const BSONObj& privDoc,
StringData dbname) const {
if (!privDoc.hasField("roles")) {
_initializeUserR... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 180,160,846,802,488,900,000,000,000,000,000,000,000 | 10 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
dse_add_plugin(Slapi_Entry *entry, char *returntext)
{
int rc = LDAP_SUCCESS;
if (!slapi_entry_attr_hasvalue(entry, SLAPI_ATTR_OBJECTCLASS, "nsSlapdPlugin") ||
!config_get_dynamic_plugins()) {
/*
* This is not a plugin, or we are not allowing dynamic updates.
*/
return... | 0 | [
"CWE-200",
"CWE-203"
] | 389-ds-base | b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32 | 128,573,327,189,465,180,000,000,000,000,000,000,000 | 15 | 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 ut8 bin_reloc_size(RBinReloc *reloc) {
#define CASE(T) case R_BIN_RELOC_ ## T: return (T) / 8
switch (reloc->type) {
CASE(8);
CASE(16);
CASE(32);
CASE(64);
}
return 0;
#undef CASE
} | 0 | [
"CWE-78"
] | radare2 | 5411543a310a470b1257fb93273cdd6e8dfcb3af | 30,875,681,461,004,960,000,000,000,000,000,000,000 | 11 | More fixes for the CVE-2019-14745 |
iasecc_card_ctl(struct sc_card *card, unsigned long cmd, void *ptr)
{
struct sc_context *ctx = card->ctx;
struct iasecc_sdo *sdo = (struct iasecc_sdo *) ptr;
switch (cmd) {
case SC_CARDCTL_GET_SERIALNR:
return iasecc_get_serialnr(card, (struct sc_serial_number *)ptr);
case SC_CARDCTL_IASECC_SDO_CREATE:
sc_log... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 72,998,734,851,917,170,000,000,000,000,000,000,000 | 38 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
virtual void updateFillOverprint(GfxState * /*state*/) {} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 14,929,907,564,296,175,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
maximum_visible_length_plain(char *str, int offset)
{
visible_length_offset = offset;
return visible_length_plain(str);
} | 0 | [
"CWE-119"
] | w3m | 67a3db378f5ee3047c158eae4342f7e3245a2ab1 | 53,929,188,817,587,010,000,000,000,000,000,000,000 | 5 | Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19
Bug-Debian: https://github.com/tats/w3m/issues/8 |
static void pxa3xx_gcu_debug_timedout(struct timer_list *unused)
{
struct pxa3xx_gcu_priv *priv = debug_timer_priv;
QERROR("Timer DUMP");
mod_timer(&pxa3xx_gcu_debug_timer, jiffies + 5 * HZ);
} | 0 | [
"CWE-190",
"CWE-703"
] | linux | a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7 | 73,145,557,552,808,400,000,000,000,000,000,000,000 | 8 | video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of
type int. Then, copy_from_user() may cause a heap overflow because it is used
as the third argument of copy_from_user().
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed... |
static PHP_FUNCTION(preg_last_error)
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
return;
}
RETURN_LONG(PCRE_G(error_code));
} | 0 | [
"CWE-119"
] | php-src | c351b47ce85a3a147cfa801fa9f0149ab4160834 | 21,940,730,316,065,190,000,000,000,000,000,000,000 | 8 | Initialize the offset table - PCRE may sometimes miss offsets |
static inline void security_sb_post_remount(struct vfsmount *mnt,
unsigned long flags, void *data)
{ } | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 278,165,021,946,586,850,000,000,000,000,000,000,000 | 3 | 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... |
void EvalNamedColorPCS(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
if (index >= NamedColorList-> nColors) {
cmsSigna... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 18,744,185,627,336,826,000,000,000,000,000,000,000 | 16 | Fixes from coverity check |
parse_bindacqaddress(char *line)
{
IPAddr ip;
check_number_of_args(line, 1);
if (UTI_StringToIP(line, &ip)) {
if (ip.family == IPADDR_INET4)
bind_acq_address4 = ip;
else if (ip.family == IPADDR_INET6)
bind_acq_address6 = ip;
} else {
command_parse_error();
}
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 321,219,518,737,261,240,000,000,000,000,000,000,000 | 14 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
print_bidi_string (
/* input */
const FriBidiCharType *bidi_types,
const FriBidiStrIndex len
)
{
register FriBidiStrIndex i;
fribidi_assert (bidi_types);
MSG (" Org. types : ");
for (i = 0; i < len; i++)
MSG2 ("%s ", fribidi_get_bidi_type_name (bidi_types[i]));
MSG ("\n");
} | 0 | [
"CWE-120",
"CWE-787"
] | fribidi | 034c6e9a1d296286305f4cfd1e0072b879f52568 | 107,516,701,319,720,320,000,000,000,000,000,000,000 | 15 | Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL |
static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct mesh_config cfg;
struct mesh_setup setup;
int err;
/* start with default */
memcpy(&cfg, &default_mesh_config, sizeof(cfg));... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 323,202,594,661,073,600,000,000,000,000,000,000,000 | 119 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
tcp_set_state(sk, TCP_ESTABLISHED);
if (skb != NULL) {
icsk->icsk_af_ops->sk_rx_dst_set(sk, skb);
security_inet_conn_established(sk, skb);
}
/* Make sure socke... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 313,938,101,352,656,180,000,000,000,000,000,000,000 | 39 | 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... |
proxy_C_SignInit (CK_X_FUNCTION_LIST *self,
CK_SESSION_HANDLE handle,
CK_MECHANISM_PTR mechanism,
CK_OBJECT_HANDLE key)
{
State *state = (State *)self;
Mapping map;
CK_RV rv;
rv = map_session_to_real (state->px, &handle, &map, NULL);
if (rv != CKR_OK)
return... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 281,658,310,066,384,160,000,000,000,000,000,000,000 | 14 | Check for arithmetic overflows before allocating |
void CLASS phase_one_load_raw_c()
{
static const int length[] = {8, 7, 6, 9, 11, 10, 5, 12, 14, 13};
int *offset, len[2], pred[2], row, col, i, j;
ushort *pixel;
short(*c_black)[2], (*r_black)[2];
#ifdef LIBRAW_LIBRARY_BUILD
if (ph1.format == 6)
throw LIBRAW_EXCEPTION_IO_CORRUPT;
#endif
pixel = (ushort... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 70,726,589,631,775,830,000,000,000,000,000,000,000 | 102 | Secunia SA75000 advisory: several buffer overruns |
void HeaderMapImpl::verifyByteSizeInternalForTest() const {
// Computes the total byte size by summing the byte size of the keys and values.
uint64_t byte_size = 0;
for (const HeaderEntryImpl& header : headers_) {
byte_size += header.key().size();
byte_size += header.value().size();
}
ASSERT(cached_by... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 186,875,024,385,336,900,000,000,000,000,000,000,000 | 9 | 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... |
inline bool get_glyph (hb_codepoint_t unicode,
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph) const
{
if (unlikely (variation_selector))
{
switch (this->uvs_table->get_glyph_variant (unicode,
variation_selector,
glyph))
{
case OT::GLYPH_VARIANT_NOT_FOUND: re... | 0 | [
"CWE-703"
] | harfbuzz | 63ef0b41dc48d6112d1918c1b1de9de8ea90adb5 | 1,946,584,353,459,826,000,000,000,000,000,000,000 | 18 | [ot-font] Fix hmtx wrong table length check
Discovered by libFuzzer. Ouch!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957 |
static MagickBooleanType CorrectPSDAlphaBlend(const ImageInfo *image_info,
Image *image,ExceptionInfo* exception)
{
const char
*option;
MagickBooleanType
status;
ssize_t
y;
if (image->alpha_trait != BlendPixelTrait || image->colorspace != sRGBColorspace)
return(MagickTrue);
option=GetImag... | 0 | [
"CWE-835"
] | ImageMagick | 73d59a74e0b0a864c1a9581b8a4bdbee427125e2 | 177,571,307,249,012,600,000,000,000,000,000,000,000 | 64 | Different fix for #869. |
static struct sock *sctp_v6_create_accept_sk(struct sock *sk,
struct sctp_association *asoc,
bool kern)
{
struct sock *newsk;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct sctp6_sock *newsctp6sk;
struct ipv6_txoptions *opt;
newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_pro... | 1 | [
"CWE-241"
] | linux | fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8 | 245,301,681,633,625,280,000,000,000,000,000,000,000 | 51 | sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit
ipv6_mc_list from parent"), otherwise bad things can happen.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <a... |
void ItemStackMetadata::updateToolCapabilities()
{
if (contains(TOOLCAP_KEY)) {
toolcaps_overridden = true;
toolcaps_override = ToolCapabilities();
std::istringstream is(getString(TOOLCAP_KEY));
toolcaps_override.deserializeJson(is);
} else {
toolcaps_overridden = false;
}
} | 0 | [
"CWE-74"
] | minetest | b5956bde259faa240a81060ff4e598e25ad52dae | 249,032,365,163,321,930,000,000,000,000,000,000,000 | 11 | Sanitize ItemStack meta text |
static bool nl80211_valid_wpa_versions(u32 wpa_versions)
{
return !(wpa_versions & ~(NL80211_WPA_VERSION_1 |
NL80211_WPA_VERSION_2)); | 0 | [
"CWE-362",
"CWE-119"
] | linux | 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 | 245,769,395,039,889,660,000,000,000,000,000,000,000 | 5 | nl80211: fix check for valid SSID size in scan operations
In both trigger_scan and sched_scan operations, we were checking for
the SSID length before assigning the value correctly. Since the
memory was just kzalloc'ed, the check was always failing and SSID with
over 32 characters were allowed to go through.
This was... |
static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
{
#ifdef CONFIG_VMAP_STACK
void *stack;
int i;
for (i = 0; i < NR_CACHED_STACKS; i++) {
struct vm_struct *s;
s = this_cpu_xchg(cached_stacks[i], NULL);
if (!s)
continue;
/* Clear stale pointers from reused stack. */
mem... | 0 | [
"CWE-362"
] | linux | 7b55851367136b1efd84d98fea81ba57a98304cf | 215,047,680,405,055,600,000,000,000,000,000,000,000 | 49 | fork: record start_time late
This changes the fork(2) syscall to record the process start_time after
initializing the basic task structure but still before making the new
process visible to user-space.
Technically, we could record the start_time anytime during fork(2). But
this might lead to scenarios where a start_... |
onig_name_to_backref_number(regex_t* reg, const UChar* name,
const UChar* name_end, const OnigRegion *region)
{
int i, n, *nums;
n = onig_name_to_group_numbers(reg, name, name_end, &nums);
if (n < 0)
return n;
else if (n == 0)
return ONIGERR_PARSER_BUG;
else if (n == 1)
return nums[0];
e... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 252,049,906,226,713,300,000,000,000,000,000,000,000 | 22 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
static int fuse_unlink(struct inode *dir, struct dentry *entry)
{
int err;
struct fuse_mount *fm = get_fuse_mount(dir);
FUSE_ARGS(args);
if (fuse_is_bad(dir))
return -EIO;
args.opcode = FUSE_UNLINK;
args.nodeid = get_node_id(dir);
args.in_numargs = 1;
args.in_args[0].size = entry->d_name.len + 1;
args.in_a... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 118,538,667,428,979,360,000,000,000,000,000,000,000 | 38 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
dp_packet_rss_invalidate(struct dp_packet *p)
{
#ifdef DPDK_NETDEV
p->mbuf.ol_flags &= ~PKT_RX_RSS_HASH;
#else
p->rss_hash_valid = false;
#endif
} | 0 | [
"CWE-400"
] | ovs | ad0d22f6435b43ecfc30c0e877d490d36721f200 | 309,912,346,439,811,700,000,000,000,000,000,000,000 | 8 | 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... |
RZ_API ut64 MACH0_(vaddr_to_paddr)(struct MACH0_(obj_t) * bin, ut64 addr) {
if (bin->segs) {
size_t i;
for (i = 0; i < bin->nsegs; i++) {
const ut64 segment_base = (ut64)bin->segs[i].vmaddr;
const ut64 segment_size = (ut64)bin->segs[i].vmsize;
if (addr >= segment_base && addr < segment_base + segment_size... | 0 | [
"CWE-787"
] | rizin | 348b1447d1452f978b69631d6de5b08dd3bdf79d | 289,973,356,747,976,300,000,000,000,000,000,000,000 | 13 | fix #2956 - oob write in mach0.c |
static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile)
{
jpc_dec_tcomp_t *tcomp;
int compno;
unsigned rlvlno;
jpc_dec_rlvl_t *rlvl;
jpc_dec_band_t *band;
jpc_dec_prc_t *prc;
int bndno;
jpc_tsfb_band_t *bnd;
int bandno;
jpc_dec_ccp_t *ccp;
int prccnt;
jpc_dec_cblk_t *cblk;
int cblkcnt;
uint_fast... | 0 | [
"CWE-617"
] | jasper | 1b1c591306817e46e1e6a3300f714992b32f972b | 157,905,153,764,648,290,000,000,000,000,000,000,000 | 305 | jpc_dec: fix another integer overflow in SIZ
Validate the width and height values first, before doing anything
else. This prevents integer overflows in the `numhtiles` /
`numvtiles` calculation below, triggering assertion failures.
Fixes CVE-2017-13750
Closes https://github.com/mdadams/jasper/issues/165
Closes http... |
static void udp_chr_close(CharDriverState *chr)
{
NetCharDriver *s = chr->opaque;
remove_fd_in_watch(chr);
if (s->ioc) {
object_unref(OBJECT(s->ioc));
}
g_free(s);
qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 285,622,291,144,852,320,000,000,000,000,000,000,000 | 11 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
R_API void r_bin_java_do_nothing_free(void /*RBinJavaCPTypeObj*/ *obj) {
return;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 84,237,164,026,273,040,000,000,000,000,000,000,000 | 3 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
is_referral_req(kdc_realm_t *kdc_active_realm, krb5_kdc_req *request)
{
krb5_boolean ret = FALSE;
char *stype = NULL;
char *hostbased = kdc_active_realm->realm_hostbased;
char *no_referral = kdc_active_realm->realm_no_referral;
if (!(request->kdc_options & KDC_OPT_CANONICALIZE))
return FALS... | 0 | [
"CWE-476"
] | krb5 | d775c95af7606a51bf79547a94fa52ddd1cb7f49 | 120,535,825,403,696,710,000,000,000,000,000,000,000 | 39 | Fix KDC null deref on TGS inner body null server
After the KDC decodes a FAST inner body, it does not check for a null
server. Prior to commit 39548a5b17bbda9eeb63625a201cfd19b9de1c5b this
would typically result in an error from krb5_unparse_name(), but with
the addition of get_local_tgt() it results in a null derefe... |
virConnectNumOfDomains(virConnectPtr conn)
{
VIR_DEBUG("conn=%p", conn);
virResetLastError();
virCheckConnectReturn(conn, -1);
if (conn->driver->connectNumOfDomains) {
int ret = conn->driver->connectNumOfDomains(conn);
if (ret < 0)
goto error;
return ret;
}
... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 218,158,976,220,354,400,000,000,000,000,000,000,000 | 20 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
WandExport void DrawPathClose(DrawingWand *wand)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
(void) MVGAutoWrapPrintf(wand,"%s",wand->path_mode == AbsolutePathMode ... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 319,890,063,386,092,300,000,000,000,000,000,000,000 | 9 | https://github.com/ImageMagick/ImageMagick/issues/716 |
static void pcnet_start(PCNetState *s)
{
#ifdef PCNET_DEBUG
printf("pcnet_start\n");
#endif
if (!CSR_DTX(s)) {
s->csr[0] |= 0x0010; /* set TXON */
}
if (!CSR_DRX(s)) {
s->csr[0] |= 0x0020; /* set RXON */
}
s->csr[0] &= ~0x0004; /* clear STOP bit */
s->csr[0] |= 0... | 0 | [
"CWE-835"
] | qemu | 99ccfaa1edafd79f7a3a0ff7b58ae4da7c514928 | 85,583,715,784,699,360,000,000,000,000,000,000,000 | 18 | pcnet: 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/1917085
R... |
void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t length,
unsigned client)
{
if (length == 0)
return;
cpu_physical_memory_clear_dirty_range_type(start, length, client);
if (tcg_enabled()) {
tlb_reset_dirty_range_all(start, length);
}
... | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 50,317,791,206,820,860,000,000,000,000,000,000,000 | 11 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
void tr_variantInitQuark(tr_variant* v, tr_quark const q)
{
tr_variantInit(v, TR_VARIANT_TYPE_STR);
tr_variant_string_set_quark(&v->val.s, q);
} | 0 | [
"CWE-416",
"CWE-284"
] | transmission | 2123adf8e5e1c2b48791f9d22fc8c747e974180e | 78,427,587,684,743,100,000,000,000,000,000,000,000 | 5 | CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk
In libtransmission/variant.c, function tr_variantWalk, when the variant
stack is reallocated, a pointer to the previously allocated memory
region is kept. This address is later accessed (heap use-after-free)
while walking back down the stack, causing the applic... |
static BROTLI_INLINE void BrotliTakeBits(
BrotliBitReader* const br, uint32_t n_bits, uint32_t* val) {
*val = (uint32_t)BrotliGetBitsUnmasked(br) & BitMask(n_bits);
BROTLI_LOG(("[BrotliTakeBits] %d %d %d val: %6x\n",
(int)br->avail_in, (int)br->bit_pos_, (int)n_bits, (int)*val));
BrotliDropBits(br, n_bit... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 72,217,717,890,555,540,000,000,000,000,000,000,000 | 7 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
TEST_F(QuantizedConv2DTest, SmallWithNoZero) {
const int stride = 1;
TF_ASSERT_OK(NodeDefBuilder("quantized_conv_op", "QuantizedConv2D")
.Input(FakeInput(DT_QUINT8))
.Input(FakeInput(DT_QUINT8))
.Input(FakeInput(DT_FLOAT))
.Input(FakeInput(... | 1 | [
"CWE-20",
"CWE-476"
] | tensorflow | 0f0b080ecde4d3dfec158d6f60da34d5e31693c4 | 68,236,173,643,035,650,000,000,000,000,000,000,000 | 61 | Fix undefined behavior in QuantizedConv2D
Added more input validation and tests. Prior to this, we could get
`nullptr` exceptions when attempting to access 0th elements of 0-sized
inputs, leading to security vulnerability bugs.
Also needed to modify `quantized_conv_ops_test.cc` for consistency.
Previously the CPU ke... |
static intset *intsetResize(intset *is, uint32_t len) {
uint64_t size = (uint64_t)len*intrev32ifbe(is->encoding);
assert(size <= SIZE_MAX - sizeof(intset));
is = zrealloc(is,sizeof(intset)+size);
return is;
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 63,921,080,588,576,580,000,000,000,000,000,000,000 | 6 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
krb5_gss_localname(OM_uint32 *minor,
const gss_name_t pname,
const gss_const_OID mech_type,
gss_buffer_t localname)
{
krb5_context context;
krb5_error_code code;
krb5_gss_name_t kname;
char lname[BUFSIZ];
code = krb5_gss_init_context(&context... | 0 | [
"CWE-703"
] | krb5 | 82dc33da50338ac84c7b4102dc6513d897d0506a | 193,933,307,310,996,200,000,000,000,000,000,000,000 | 33 | Fix gss_process_context_token() [CVE-2014-5352]
[MITKRB5-SA-2015-001] The krb5 gss_process_context_token() should not
actually delete the context; that leaves the caller with a dangling
pointer and no way to know that it is invalid. Instead, mark the
context as terminated, and check for terminated contexts in the GSS... |
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf)
{
return ASN1_i2d_bio_of(PKCS8_PRIV_KEY_INFO,i2d_PKCS8_PRIV_KEY_INFO,bp,
p8inf);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 37,506,288,549,924,505,000,000,000,000,000,000,000 | 5 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
bool capable_wrt_inode_uidgid(const struct inode *inode, int cap)
{
struct user_namespace *ns = current_user_ns();
return ns_capable(ns, cap) && kuid_has_mapping(ns, inode->i_uid) &&
kgid_has_mapping(ns, inode->i_gid);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 6,464,857,245,400,192,000,000,000,000,000,000,000 | 7 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
bool in_entry_stack(unsigned long *stack, struct stack_info *info)
{
struct entry_stack *ss = cpu_entry_stack(smp_processor_id());
void *begin = ss;
void *end = ss + 1;
if ((void *)stack < begin || (void *)stack >= end)
return false;
info->type = STACK_TYPE_ENTRY;
info->begin = begin;
info->end = end;
info... | 0 | [
"CWE-20"
] | linux | 342db04ae71273322f0011384a9ed414df8bdae4 | 324,139,902,568,894,480,000,000,000,000,000,000,000 | 17 | x86/dumpstack: Don't dump kernel memory based on usermode RIP
show_opcodes() is used both for dumping kernel instructions and for dumping
user instructions. If userspace causes #PF by jumping to a kernel address,
show_opcodes() can be reached with regs->ip controlled by the user,
pointing to kernel code. Make sure th... |
rb_str_freeze(VALUE str)
{
if (STR_ASSOC_P(str)) {
VALUE ary = RSTRING(str)->as.heap.aux.shared;
OBJ_FREEZE(ary);
}
return rb_obj_freeze(str);
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 6,640,283,988,645,462,000,000,000,000,000,000,000 | 8 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unused)),
const void *buf, size_t nb)
{
int m = 0, rv = 0, looks_text = 0;
int mime = ms->flags & MAGIC_MIME;
const unsigned char *ubuf = CAST(const unsigned char *, buf);
unichar *u8buf = NULL;
size_t ulen;
const char *code = NULL;
... | 1 | [
"CWE-755"
] | file | cc9e74dfeca5265ad725acc926ef0b8d2a18ee70 | 335,524,362,768,355,520,000,000,000,000,000,000,000 | 138 | count indirect recursion as recursion. |
static int uninstantiate(RAND_DRBG *drbg)
{
int ret = drbg == NULL ? 1 : RAND_DRBG_uninstantiate(drbg);
ERR_clear_error();
return ret;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 226,630,538,633,179,800,000,000,000,000,000,000,000 | 7 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.