func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
const unsigned char *sess_id, int sesslen,
SSL_SESSION **psess)
{
SSL_SESSION *sess;
unsigned char *sdec;
const unsigned char *p;
int slen, mlen, renew_ticket = 0;
unsigned char tick_hmac[EVP_MAX_MD_SIZE];
HMAC_CTX hctx;
EVP... | 1 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 200,321,866,793,627,540,000,000,000,000,000,000,000 | 91 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
bool atEOF() const { return isAtEof; } | 0 | [] | poppler | 81044c64b9ed9a10ae82a28bac753060bdfdac74 | 130,115,738,165,674,900,000,000,000,000,000,000,000 | 1 | Hints::readTables: bail out if we run out of file when reading
Fixes #1230 |
static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
{
struct sockaddr_at sat;
struct sock *sk = sock->sk;
struct atalk_sock *at = at_sk(sk);
if (sock_flag(sk, SOCK_ZAPPED))
if (atalk_autobind(sk) < 0)
return -ENOBUFS;
*uaddr_len = sizeof(struct sockaddr_at);
... | 0 | [
"CWE-200"
] | linux-2.6 | 3d392475c873c10c10d6d96b94d092a34ebd4791 | 179,767,459,463,602,500,000,000,000,000,000,000,000 | 31 | appletalk: fix atalk_getname() leak
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss,
__u32 *rcv_wnd, __u32 *window_clamp,
int wscale_ok, __u8 *rcv_wscale,
__u32 init_rcv_wnd)
{
unsigned int space = (__space < 0 ? 0 : __space);
/* If no clamp set the clamp to the max possible scaled window */
... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 330,570,003,048,900,360,000,000,000,000,000,000,000 | 44 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static double filter_lanczos3(const double x1)
{
const double x = x1 < 0.0 ? -x1 : x1;
#define R DEFAULT_LANCZOS3_RADIUS
if ( x == 0.0) return 1;
if ( x < R)
{
return R * sin(x*M_PI) * sin(x * M_PI / R) / (x * M_PI * x * M_PI);
}
return 0.0;
#undef R
} | 0 | [
"CWE-119"
] | php-src | 4bb422343f29f06b7081323844d9b52e1a71e4a5 | 47,779,698,028,130,700,000,000,000,000,000,000,000 | 14 | Fix bug #70976: fix boundary check on gdImageRotateInterpolated |
static int of_mdio_bus_match(struct device *dev, const void *mdio_bus_np)
{
return dev->of_node == mdio_bus_np;
} | 0 | [
"CWE-416"
] | linux | 6ff7b060535e87c2ae14dd8548512abfdda528fb | 77,260,596,076,263,430,000,000,000,000,000,000,000 | 4 | mdio_bus: Fix use-after-free on device_register fails
KASAN has found use-after-free in fixed_mdio_bus_init,
commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call
put_device on device_register() failure") call put_device()
while device_register() fails,give up the last reference
to the device and allow mdiobus_releas... |
static int bpf_adj_delta_to_imm(struct bpf_insn *insn, u32 pos, u32 delta,
u32 curr, const bool probe_pass)
{
const s64 imm_min = S32_MIN, imm_max = S32_MAX;
s64 imm = insn->imm;
if (curr < pos && curr + imm + 1 > pos)
imm += delta;
else if (curr > pos + delta && curr + imm + 1 <= pos + delta)
imm -= delta... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 18,229,752,702,368,204,000,000,000,000,000,000,000 | 16 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static void describe_balance_start_or_resume(struct btrfs_fs_info *fs_info)
{
u32 size_buf = 1024;
char tmp_buf[192] = {'\0'};
char *buf;
char *bp;
u32 size_bp = size_buf;
int ret;
struct btrfs_balance_control *bctl = fs_info->balance_ctl;
buf = kzalloc(size_buf, GFP_KERNEL);
if (!buf)
return;
bp = buf;
... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 277,048,430,113,503,760,000,000,000,000,000,000,000 | 55 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
rsvg_preserve_aspect_ratio (unsigned int aspect_ratio, double width,
double height, double *w, double *h, double *x, double *y)
{
double neww, newh;
if (aspect_ratio & ~RSVG_ASPECT_RATIO_SLICE) {
neww = *w;
newh = *h;
if ((height * *w > width * *h) == ((aspect... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 121,348,540,038,566,150,000,000,000,000,000,000,000 | 37 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
int rc = SQLITE_NOMEM;
if( zSql ){
sqlite3_stmt *pStmt = 0;
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
if( rc==SQLITE_OK ){
if( SQLITE_ROW==sqlite3_step(pStmt) ){
*piVal = sqlite3_column_int(pStmt, 0);
}
... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 92,544,170,547,782,620,000,000,000,000,000,000,000 | 14 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
term_send_eof(channel_T *ch)
{
term_T *term;
for (term = first_term; term != NULL; term = term->tl_next)
if (term->tl_job == ch->ch_job)
{
if (term->tl_eof_chars != NULL)
{
channel_send(ch, PART_IN, term->tl_eof_chars,
(int)STRLEN(term->tl_eof_chars), NULL);
channel_send(ch, PART_IN, (char... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 99,521,246,858,473,650,000,000,000,000,000,000,000 | 20 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
parser_append_breakpoint_info (parser_context_t *context_p, /**< context */
jerry_debugger_header_type_t type, /**< message type */
uint32_t value) /**< line or offset of the breakpoint */
{
JERRY_ASSERT (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CON... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 246,982,007,172,333,400,000,000,000,000,000,000,000 | 16 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
int tcp_abort(struct sock *sk, int err)
{
if (!sk_fullsock(sk)) {
if (sk->sk_state == TCP_NEW_SYN_RECV) {
struct request_sock *req = inet_reqsk(sk);
local_bh_disable();
inet_csk_reqsk_queue_drop_and_put(req->rsk_listener,
req);
local_bh_enable();
return 0;
}
return -EOPNOTSUPP;
}
/* D... | 0 | [
"CWE-399",
"CWE-835"
] | linux | ccf7abb93af09ad0868ae9033d1ca8108bdaec82 | 59,036,637,268,124,580,000,000,000,000,000,000,000 | 42 | tcp: avoid infinite loop in tcp_splice_read()
Splicing from TCP socket is vulnerable when a packet with URG flag is
received and stored into receive queue.
__tcp_splice_read() returns 0, and sk_wait_data() immediately
returns since there is the problematic skb in queue.
This is a nice way to burn cpu (aka infinite l... |
JSON::JSON_string::~JSON_string()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 197,242,078,631,834,760,000,000,000,000,000,000,000 | 3 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
void next_part_top(ha_rows rownum)
{
for (ha_rows i= 0; i < n_rows; i++)
{
if (cursor.fetch())
break;
remove_value_from_items();
if (cursor.next())
at_partition_end= true;
}
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 308,898,870,942,416,350,000,000,000,000,000,000,000 | 11 | 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... |
virtual bool val_native_result(THD *thd, Native *to)
{
return val_native(thd, to);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 73,472,894,144,511,130,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
void free_G_buffers(__G) /* releases all memory allocated in global vars */
__GDEF
{
#ifndef SFX
unsigned i;
#endif
#ifdef SYSTEM_SPECIFIC_DTOR
SYSTEM_SPECIFIC_DTOR(__G);
#endif
inflate_free(__G);
checkdir(__G__ (char *)NULL, END);
#ifdef DYNALLOC_CRCTAB
if (CRC_32_TAB) {
free_crc... | 1 | [
"CWE-400"
] | unzip | 47b3ceae397d21bf822bc2ac73052a4b1daf8e1c | 252,145,352,650,347,730,000,000,000,000,000,000,000 | 70 | Detect and reject a zip bomb using overlapped entries.
This detects an invalid zip file that has at least one entry that
overlaps with another entry or with the central directory to the
end of the file. A Fifield zip bomb uses overlapped local entries
to vastly increase the potential inflation ratio. Such an invalid
z... |
rsCStrConvertToNumber(cstr_t *pStr, number_t *pNumber)
{
DEFiRet;
number_t n;
int bIsNegative;
size_t i;
ASSERT(pStr != NULL);
ASSERT(pNumber != NULL);
if(pStr->iStrLen == 0) {
/* can be converted to 0! (by convention) */
pNumber = 0;
FINALIZE;
}
/* first skip whitespace (if present) */
for(i = 0 ; i... | 0 | [
"CWE-189"
] | rsyslog | 6bad782f154b7f838c7371bf99c13f6dc4ec4101 | 13,520,024,575,880,573,000,000,000,000,000,000,000 | 51 | bugfix: abort if imfile reads file line of more than 64KiB
Thanks to Peter Eisentraut for reporting and analysing this problem.
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=221 |
rsvg_art_affine_image (cairo_surface_t *img,
cairo_surface_t *intermediate,
cairo_matrix_t *affine,
double w,
double h)
{
cairo_matrix_t inv_affine, raw_inv_affine;
gint intstride;
gint basestride;
gint basex,... | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 325,434,105,687,475,000,000,000,000,000,000,000,000 | 101 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff)
{
if (onoff)
d->powered++;
else
d->powered--;
if (d->powered == 0 || (onoff && d->powered == 1)) { /* when switching from 1 to 0 or from 0 to 1 */
deb_info("power control: %d\n", onoff);
if (d->props.power_ctrl)
return d->props.power_ctrl... | 0 | [
"CWE-416"
] | linux | 6cf97230cd5f36b7665099083272595c55d72be7 | 136,979,219,579,665,310,000,000,000,000,000,000,000 | 14 | media: dvb: usb: fix use after free in dvb_usb_device_exit
dvb_usb_device_exit() frees and uses the device name in that order.
Fix by storing the name in a buffer before freeing it.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+26ec41e9f788b3eba396@syzkaller.appspotmail.com
Signed-off-by: Sean Y... |
static void handle_message(int sd)
{
struct ifsock *ifs;
LIST_FOREACH(ifs, &il, link) {
if (ifs->in != sd)
continue;
if (ifs->cb)
ifs->cb(sd);
}
} | 0 | [
"CWE-119",
"CWE-787"
] | ssdp-responder | ce04b1f29a137198182f60bbb628d5ceb8171765 | 338,071,129,457,251,540,000,000,000,000,000,000,000 | 12 | Fix #1: Ensure recv buf is always NUL terminated
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
TEST_F(ConnectionManagerUtilityTest, UserAgentSetNoIncomingUserAgent) {
connection_.stream_info_.downstream_address_provider_->setRemoteAddress(
std::make_shared<Network::Address::Ipv4Instance>("10.0.0.1"));
ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(true));
user_agent_ = "bar";
TestRequest... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 191,019,650,696,286,930,000,000,000,000,000,000,000 | 12 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
cssp_read_tsrequest(STREAM token, STREAM pubkey)
{
STREAM s;
int length;
int tagval;
struct stream packet;
s = tcp_recv(NULL, 4);
if (s == NULL)
return False;
// verify ASN.1 header
if (s->p[0] != (BER_TAG_SEQUENCE | BER_TAG_CONSTRUCTED))
{
logger(Protocol, Error,
"cssp_read_tsrequest(), expect... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 97,521,952,433,872,110,000,000,000,000,000,000,000 | 101 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
void default_memory_callback(void *,const char *file,const char *where)
{
fprintf (stderr,"%s: Out of memory in %s\n", file?file:"unknown file", where);
} | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 204,721,842,795,896,440,000,000,000,000,000,000,000 | 4 | fixed two more problems found by fuzzer |
static bool io_poll_rewait(struct io_kiocb *req, struct io_poll_iocb *poll)
__acquires(&req->ctx->completion_lock)
{
struct io_ring_ctx *ctx = req->ctx;
if (!req->result && !READ_ONCE(poll->canceled)) {
struct poll_table_struct pt = { ._key = poll->events };
req->result = vfs_poll(req->file, &pt) & poll->event... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 23,130,140,864,122,955,000,000,000,000,000,000,000 | 18 | 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... |
static int ntop_get_interface_dump_tap_name(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(!ntop_interface)
return(CONST_LUA_ERROR);
lua_pushstring(vm, ntop_interface->getDumpTrafficTapName());
ret... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 309,266,907,210,705,050,000,000,000,000,000,000,000 | 12 | Security fix: prevents empty host from being used |
clientAccessCheckDoneWrapper(Acl::Answer answer, void *data)
{
ClientRequestContext *calloutContext = (ClientRequestContext *) data;
if (!calloutContext->httpStateIsValid())
return;
calloutContext->clientAccessCheckDone(answer);
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 192,667,671,846,609,200,000,000,000,000,000,000,000 | 9 | Handle more Range requests (#790)
Also removed some effectively unused code. |
void dm_set_mdptr(struct mapped_device *md, void *ptr)
{
md->interface_ptr = ptr;
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 261,725,951,936,214,120,000,000,000,000,000,000,000 | 4 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
iobuf_temp_with_content (const char *buffer, size_t length)
{
iobuf_t a;
a = iobuf_alloc (3, length);
memcpy (a->d.buf, buffer, length);
a->d.len = length;
return a;
} | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 6,684,411,687,692,174,000,000,000,000,000,000,000 | 10 | 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 ... |
uint32 pack_length() const { return 1; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 147,043,101,102,910,230,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static enum dc_status build_mapped_resource(
const struct dc *dc,
struct dc_state *context,
struct dc_stream_state *stream)
{
struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
if (!pipe_ctx)
return DC_ERROR_UNEXPECTED;
if (!is_surface_pixel_format_supported(pipe_ctx,... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 59,706,037,572,066,795,000,000,000,000,000,000,000 | 22 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
void getReadBuffer(void** bufReturn, size_t* lenReturn) override {
*bufReturn = readbuf_ + bytesRead_;
*lenReturn = std::min(kMaxReadBufferSz, sizeof(readbuf_) - bytesRead_);
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 199,060,780,275,602,550,000,000,000,000,000,000,000 | 4 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
{
int error;
File fd;
char temp_file_path[FN_REFLEN];
DBUG_ENTER("dyn_string_cmp");
DBUG_PRINT("enter", ("fname: %s", fname));
if ((fd= create_temp_file(temp_file_path, TMPDIR,
"tmp", O_CREAT | O_SHARE | O_RDWR,
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 273,161,942,818,057,500,000,000,000,000,000,000,000 | 33 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
deliver_init(void)
{
#ifdef EXIM_TFO_PROBE
tfo_probe();
#else
tcp_fastopen_ok = TRUE;
#endif
if (!regex_PIPELINING) regex_PIPELINING =
regex_must_compile(US"\\n250[\\s\\-]PIPELINING(\\s|\\n|$)", FALSE, TRUE);
if (!regex_SIZE) regex_SIZE =
regex_must_compile(US"\\n250[\\s\\-]SIZE(\\s|\\n|$)", FALSE, TRUE);
if (!... | 0 | [
"CWE-78"
] | exim | d740d2111f189760593a303124ff6b9b1f83453d | 174,762,258,845,614,850,000,000,000,000,000,000,000 | 43 | Fix CVE-2019-10149 |
static js_Ast *objectliteral(js_State *J)
{
js_Ast *head, *tail;
if (J->lookahead == '}')
return NULL;
head = tail = LIST(propassign(J));
while (jsP_accept(J, ',')) {
if (J->lookahead == '}')
break;
tail = tail->b = LIST(propassign(J));
}
return jsP_list(head);
} | 0 | [
"CWE-674"
] | mujs | 4d45a96e57fbabf00a7378b337d0ddcace6f38c1 | 199,598,473,535,544,140,000,000,000,000,000,000,000 | 13 | Guard binary expressions from too much recursion. |
static int cx23888_ir_rx_shutdown(struct v4l2_subdev *sd)
{
struct cx23888_ir_state *state = to_state(sd);
struct cx23885_dev *dev = state->dev;
mutex_lock(&state->rx_params_lock);
/* Disable or slow down all IR Rx circuits and counters */
irqenable_rx(dev, 0);
control_rx_enable(dev, false);
control_rx_demodul... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 130,256,086,629,980,410,000,000,000,000,000,000,000 | 20 | media: rc: prevent memory leak in cx23888_ir_probe
In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
istrstr (char const *lookin, char const *lookfor)
{
char const *cp;
size_t len;
len = strlen(lookfor);
for (cp = lookin; *cp != '\0'; ++cp)
if (strncmp(cp, lookfor, len) == 0)
return (char *) cp;
return NULL;
} | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 50,250,209,238,226,275,000,000,000,000,000,000,000 | 11 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
count_chunks(struct regional* r)
{
size_t c = 1;
char* p = r->next;
while(p) {
c++;
p = *(char**)p;
}
return c;
} | 0 | [
"CWE-190"
] | unbound | 226298bbd36f1f0fd9608e98c2ae85988b7bbdb8 | 245,344,670,814,407,400,000,000,000,000,000,000,000 | 10 | - Fix Integer Overflow in Regional Allocator,
reported by X41 D-Sec. |
gst_rmdemux_descramble_audio (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
{
GstFlowReturn ret = GST_FLOW_ERROR;
GstBuffer *outbuf;
GstMapInfo outmap;
guint packet_size = stream->packet_size;
guint height = stream->subpackets->len;
guint leaf_size = stream->leaf_size;
guint p, x;
g_assert (stream->... | 0 | [] | gst-plugins-ugly | 9726aaf78e6643a5955864f444852423de58de29 | 334,117,300,418,595,900,000,000,000,000,000,000,000 | 70 | rmdemux: Make sure we have enough data available when parsing audio/video packets
Otherwise there will be out-of-bounds reads and potential crashes.
Thanks to Natalie Silvanovich for reporting.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37
Part-of: <https://gitlab.freedesktop.org/gstre... |
static int muscle_compute_signature(sc_card_t *card, const u8 *data,
size_t data_len, u8 * out, size_t outlen)
{
muscle_private_t* priv = MUSCLE_DATA(card);
u8 key_id;
int r;
key_id = priv->rsa_key_ref * 2; /* Private key */
if (outlen < data_len) {
sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "Output buffer too... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 96,755,405,018,669,280,000,000,000,000,000,000,000 | 25 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
int cmd_main(int argc, const char **argv)
{
unsigned int i;
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(fast_import_usage);
setup_git_directory();
reset_pack_idx_option(&pack_idx_opts);
git_pack_config();
alloc_objects(object_entry_alloc);
strbuf_init(&command_buf, 0);
atom_table = xcalloc(atom_table_sz... | 1 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 113,520,654,436,613,000,000,000,000,000,000,000,000 | 107 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
int samdb_reference_dn_is_our_ntdsa(struct ldb_context *ldb, struct ldb_dn *base,
const char *attribute, bool *is_ntdsa)
{
int ret;
struct ldb_dn *referenced_dn;
TALLOC_CTX *tmp_ctx = talloc_new(ldb);
if (tmp_ctx == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
ret = samdb_reference_dn(ldb, tmp_ctx, base, ... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 168,428,711,366,457,120,000,000,000,000,000,000,000 | 20 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
UsbHubCtrlGetHubDesc (
IN USB_DEVICE *HubDev,
OUT VOID *Buf,
IN UINTN Len
)
{
EFI_STATUS Status;
UINT8 DescType;
DescType = (HubDev->Speed == EFI_USB_SPEED_SUPER) ?
USB_DESC_TYPE_HUB_SUPER_SPEED :
... | 0 | [
"CWE-787"
] | edk2 | acebdf14c985c5c9f50b37ece0b15ada87767359 | 155,401,628,869,037,890,000,000,000,000,000,000,000 | 27 | MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973
HUB descriptor has variable length.
But the code uses stack (HubDesc in UsbHubInit) with fixed length
sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data.
It uses hard code length value... |
String *Item_func_uuid::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
char *s;
THD *thd= current_thd;
mysql_mutex_lock(&LOCK_uuid_generator);
if (! uuid_time) /* first UUID() call. initializing data */
{
ulong tmp=sql_rnd_with_mutex();
uchar mac[6];
int i;
if (my_gethwaddr(mac))
{
... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 327,362,097,634,883,500,000,000,000,000,000,000,000 | 116 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
static void check_raid56_incompat_flag(struct btrfs_fs_info *info, u64 type)
{
if (!(type & BTRFS_BLOCK_GROUP_RAID56_MASK))
return;
btrfs_set_fs_incompat(info, RAID56);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 136,678,335,966,920,700,000,000,000,000,000,000,000 | 7 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
std::pair<int, int> TileStringOneDimension(
const TfLiteIntArray& in_dimensions, const TfLiteTensor* in_data,
int in_data_index, const M* multipliers, DynamicBuffer* buffer,
int buffer_index, int dimension, TfLiteTensor* out_data) {
const int dimension_size = in_dimensions.data[dimension];
if (dimension... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 86,147,265,641,500,750,000,000,000,000,000,000,000 | 30 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
TiledInputFile::TiledInputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads):
_data (new Data (numThreads))
{
_data->_deleteStream=false;
//
// This constructor is called when a user
// explicitly wants to read a tiled file.
//
bool streamDataCreated = false;
try
{
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 239,075,946,919,843,620,000,000,000,000,000,000,000 | 57 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy,
struct brcmf_if *ifp, struct cfg80211_scan_request *request)
{
s32 err;
u32 passive_scan;
struct brcmf_scan_results *results;
struct escan_info *escan = &cfg->escan_info;
brcmf_dbg(SCAN, "Enter\n");
escan->ifp = ifp;
escan->wiphy = wip... | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 166,895,282,406,464,820,000,000,000,000,000,000,000 | 30 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
NO_PROTO mmdb_uint128_t get_uint128(const uint8_t *p, int length)
{
mmdb_uint128_t value = 0;
while (length-- > 0) {
value <<= 8;
value += *p++;
}
return value;
} | 0 | [] | libmaxminddb | 51255f113fe3c7b63ffe957636a7656a3ff9d1ff | 307,933,270,098,270,600,000,000,000,000,000,000,000 | 9 | Fix several segfaults from missing bounds checks
These were found using afl-fuzz. There are several more similar failure
that warrant investigation. If we want to add tests, I have several
corrupt databases we could add, but these are trivially reproducible
when using the existing test databases as input to afl-fuzz. |
static inline size_t bitmap_size(Bitmap *bm)
{
return bm ? sizeof(Bitmap) + bm->stride * bm->h : 0;
} | 0 | [
"CWE-125"
] | libass | f4f48950788b91c6a30029cc28a240b834713ea7 | 127,628,678,711,977,950,000,000,000,000,000,000,000 | 4 | Fix line wrapping mode 0/3 bugs
This fixes two separate bugs:
a) Don't move a linebreak into the first symbol. This results in a empty
line at the front, which does not help to equalize line lengths at all.
Instead, merge line with the second one.
b) When moving a linebreak into a symbol that already is a break... |
QPDFWriter::pushEncryptionFilter()
{
if (this->m->encrypted && (! this->m->cur_data_key.empty()))
{
Pipeline* p = 0;
if (this->m->encrypt_use_aes)
{
p = new Pl_AES_PDF(
"aes stream encryption", this->m->pipeline, true,
QUtil::unsigned_char_pointer(this->m->cur_data_key),
this->m->cur... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 204,612,631,867,442,400,000,000,000,000,000,000,000 | 24 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
InstanceKlass* InstanceKlass::compute_enclosing_class(bool* inner_is_member, TRAPS) const {
InstanceKlass* outer_klass = NULL;
*inner_is_member = false;
int ooff = 0, noff = 0;
bool has_inner_classes_attr = find_inner_classes_attr(&ooff, &noff, THREAD);
if (has_inner_classes_attr) {
constantPoolHandle i_c... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 265,944,394,842,198,260,000,000,000,000,000,000,000 | 44 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void fix_history(String *final_command)
{
int total_lines = 1;
char *ptr = final_command->c_ptr();
String fixed_buffer; /* Converted buffer */
char str_char = '\0'; /* Character if we are in a string or not */
/* find out how many lines we have and remove newlines */
while (*ptr != '\0')
{
... | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 19,741,799,480,015,213,000,000,000,000,000,000,000 | 51 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec) |
mrb_mod_attr_writer(mrb_state *mrb, mrb_value mod)
{
return mod_attr_define(mrb, mod, attr_writer, prepare_writer_name);
} | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 190,968,209,677,143,100,000,000,000,000,000,000,000 | 4 | class.c: clear method cache after `remove_method`. |
static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
u8 policy, u32 flags,
struct netlink_ext_ack *extack)
{
const struct nlattr * const *nla = ctx->nla;
struct nft_table *table = ctx->table;
struct nft_base_chain *basechain;
struct nft_stats __percpu *stats;
struct net *net ... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 24,590,560,417,026,880,000,000,000,000,000,000,000 | 137 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
inline void BatchToSpaceND(
const RuntimeShape& unextended_input1_shape, const T* input1_data,
const RuntimeShape& unextended_input2_shape, const int32* block_shape_data,
const RuntimeShape& unextended_input3_shape, const int32* crops_data,
const RuntimeShape& unextended_output_shape, T* output_data) {
... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 214,672,826,746,890,320,000,000,000,000,000,000,000 | 79 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
datetime_s__strptime(int argc, VALUE *argv, VALUE klass)
{
return date_s__strptime_internal(argc, argv, klass, "%FT%T%z");
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 242,233,295,733,363,400,000,000,000,000,000,000,000 | 4 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
Lookahead Parser::lookahead_for_value(const char* start)
{
// init result struct
Lookahead rv = Lookahead();
// get start position
const char* p = start ? start : position;
// match in one big "regex"
if (const char* q =
peek <
non_greedy <
alternatives <
... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 315,115,884,354,774,170,000,000,000,000,000,000,000 | 65 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
readfile(
char_u *fname,
char_u *sfname,
linenr_T from,
linenr_T lines_to_skip,
linenr_T lines_to_read,
exarg_T *eap, /* can be NULL! */
int flags)
{
int fd = 0;
int newfile = (flags & READ_NEW);
int check_readonly;
int filtering = (flags & READ_FILTER);
int read_... | 1 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 249,564,375,416,889,520,000,000,000,000,000,000,000 | 2,516 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
xfs_fs_nr_cached_objects(
struct super_block *sb,
struct shrink_control *sc)
{
return xfs_reclaim_inodes_count(XFS_M(sb));
} | 1 | [
"CWE-416"
] | linux | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 | 86,286,764,051,636,390,000,000,000,000,000,000,000 | 6 | xfs: clear sb->s_fs_info on mount failure
We recently had an oops reported on a 4.14 kernel in
xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage
and so the m_perag_tree lookup walked into lala land.
Essentially, the machine was under memory pressure when the mount
was being run, xfs_fs_fill_super() fa... |
static void k_self(struct vc_data *vc, unsigned char value, char up_flag)
{
k_unicode(vc, conv_8bit_to_uni(value), up_flag);
} | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 310,696,255,687,905,460,000,000,000,000,000,000,000 | 4 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
int active)
{
struct snd_kcontrol *kctl;
struct snd_kcontrol_volatile *vd;
unsigned int index_offset;
int ret;
down_write(&card->controls_rwsem);
kctl = snd_ctl_find_id(card, id);
if (kctl == NULL) {
ret = -ENOENT;
goto unlock;
}... | 0 | [
"CWE-190",
"CWE-189"
] | linux | ac902c112d90a89e59916f751c2745f4dbdbb4bd | 57,232,333,396,628,780,000,000,000,000,000,000,000 | 33 | ALSA: control: Handle numid overflow
Each control gets automatically assigned its numids when the control is created.
The allocation is done by incrementing the numid by the amount of allocated
numids per allocation. This means that excessive creation and destruction of
controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMO... |
int kvm_io_bus_read_cookie(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
int len, void *val, long cookie)
{
struct kvm_io_bus *bus;
struct kvm_io_range range;
range = (struct kvm_io_range) {
.addr = addr,
.len = len,
};
bus = srcu_dereference(kvm->buses[bus_idx], &kvm->srcu);
/* First try the de... | 0 | [
"CWE-20"
] | linux | 338c7dbadd2671189cec7faf64c84d01071b3f96 | 116,612,293,086,282,320,000,000,000,000,000,000,000 | 26 | KVM: Improve create VCPU parameter (CVE-2013-4587)
In multiple functions the vcpu_id is used as an offset into a bitfield. Ag
malicious user could specify a vcpu_id greater than 255 in order to set or
clear bits in kernel memory. This could be used to elevate priveges in the
kernel. This patch verifies that the vcp... |
void dispatch(const Buffer::Instance& data, ConnectionImpl& connection) {
buffer_.add(data);
if (!dispatching_) {
while (buffer_.length() > 0) {
dispatching_ = true;
connection.dispatch(buffer_);
dispatching_ = false;
}
}
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 113,536,916,835,493,930,000,000,000,000,000,000,000 | 10 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void test_nghttp2_submit_invalid_nv(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
nghttp2_nv empty_name_nv[] = {MAKE_NV("Version", "HTTP/1.1"),
MAKE_NV("", "empty name")};
/* Now invalid header name/value pair in HTTP/1.1 is accepted in
nghttp2 */
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 119,067,378,444,666,580,000,000,000,000,000,000,000 | 39 | Add nghttp2_option_set_max_outbound_ack |
event_set_no_set_filter_flag(struct trace_event_file *file)
{
file->flags |= EVENT_FILE_FL_NO_SET_FILTER;
} | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 292,625,777,152,566,870,000,000,000,000,000,000,000 | 4 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
int test_gf2m_mod_exp(BIO *bp, BN_CTX *ctx)
{
BIGNUM *a, *b[2], *c, *d, *e, *f;
int i, j, ret = 0;
int p0[] = { 163, 7, 6, 3, 0, -1 };
int p1[] = { 193, 15, 0, -1 };
a = BN_new();
b[0] = BN_new();
b[1] = BN_new();
c = BN_new();
d = BN_new();
e = BN_new();
f = BN_new();
... | 0 | [
"CWE-200"
] | openssl | d73cc256c8e256c32ed959456101b73ba9842f72 | 131,397,808,142,016,850,000,000,000,000,000,000,000 | 67 | bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193).
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107) |
my_decimal *val_decimal(my_decimal *)
{
return null_value ? NULL: &cached_value;
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 219,250,579,951,017,530,000,000,000,000,000,000,000 | 4 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static int _wait_for_starting_step(uint32_t job_id, uint32_t step_id)
{
static pthread_mutex_t dummy_lock = PTHREAD_MUTEX_INITIALIZER;
struct timespec ts = {0, 0};
struct timeval now;
starting_step_t starting_step;
int num_passes = 0;
starting_step.job_id = job_id;
starting_step.step_id = step_id;
while (li... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 281,000,054,873,693,100,000,000,000,000,000,000,000 | 45 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
void ProcessorGenerator::generate_class_definition() {
// Generate the dispatch methods
vector<t_function*> functions = service_->get_functions();
vector<t_function*>::iterator f_iter;
string parent_class;
if (service_->get_extends() != NULL) {
parent_class = extends_;
} else {
if (style_ == "Cob")... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 126,140,237,966,138,710,000,000,000,000,000,000,000 | 150 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
mysql_connect(MYSQL *mysql,const char *host,
const char *user, const char *passwd)
{
MYSQL *res;
mysql=mysql_init(mysql); /* Make it thread safe */
{
DBUG_ENTER("mysql_connect");
if (!(res=mysql_real_connect(mysql,host,user,passwd,NullS,0,NullS,0)))
{
if (mysql->free_me)
my_free(mysql)... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 43,715,259,977,684,420,000,000,000,000,000,000,000 | 16 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
Curl_ssl_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn,
int sockindex, bool *done)
{
CURLcode result;
#ifndef CURL_DISABLE_PROXY
if(conn->bits.proxy_ssl_connected[sockindex]) {
result = ssl_connect_init_proxy(conn, sockindex);
if(result)
return resu... | 0 | [
"CWE-416",
"CWE-295"
] | curl | 7f4a9a9b2a49547eae24d2e19bc5c346e9026479 | 13,653,017,001,082,534,000,000,000,000,000,000,000 | 24 | openssl: associate/detach the transfer from connection
CVE-2021-22901
Bug: https://curl.se/docs/CVE-2021-22901.html |
rsvg_metadata_props_enumerate (const char *key, const char *value, gpointer user_data)
{
GString *metadata = (GString *) user_data;
g_string_append_printf (metadata, "%s=\"%s\" ", key, value);
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 26,023,274,579,760,960,000,000,000,000,000,000,000 | 5 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static inline freelist_idx_t get_free_obj(struct page *page, unsigned int idx)
{
return ((freelist_idx_t *)page->freelist)[idx];
} | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 193,661,130,616,645,570,000,000,000,000,000,000,000 | 4 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
R_API RBinJavaAttrInfo *r_bin_java_local_variable_table_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) {
RBinJavaLocalVariableAttribute *lvattr;
ut64 curpos = 0, offset = 6;
RBinJavaAttrInfo *attr;
ut32 i = 0;
if (!buffer || sz < 1) {
return NULL;
}
attr = r_bin_java_default_attr_new (buffer, sz, buf_offset);... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 304,718,099,100,238,200,000,000,000,000,000,000,000 | 51 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
void ass_set_check_readorder(ASS_Track *track, int check_readorder)
{
track->parser_priv->check_readorder = check_readorder == 1;
} | 0 | [
"CWE-369",
"CWE-787"
] | libass | 017137471d0043e0321e377ed8da48e45a3ec632 | 216,777,091,157,374,540,000,000,000,000,000,000,000 | 4 | decode_font: fix subtraction broken by change to unsigned type
This caused a one-byte buffer overwrite and an assertion failure.
Regression in commit 910211f1c0078e37546f73e95306724358b89be2.
Discovered by OSS-Fuzz.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674.
Fixes https://bugs.chromium.org/p... |
display_debug_sup (struct dwarf_section * section,
void * file ATTRIBUTE_UNUSED)
{
unsigned char * start = section->start;
unsigned char * end = section->start + section->size;
unsigned int version;
char is_supplementary;
const unsigned char * sup_filename;
size_t sup_filename_len;
... | 0 | [
"CWE-269"
] | binutils-gdb | e98e7d9a70dcc987bff0e925f20b78cd4a2979ed | 146,970,044,143,660,120,000,000,000,000,000,000,000 | 73 | Fix NULL pointer indirection when parsing corrupt DWARF data.
PR 29290
* dwarf.c (read_and_display_attr_value): Check that debug_info_p
is set before dereferencing it. |
int main(int argc, char *argv[] ) {
int i, fails_count=0;
CU_pSuite cryptoUtilsTestSuite, parserTestSuite;
CU_pSuite *suites[] = {
&cryptoUtilsTestSuite,
&parserTestSuite,
NULL
};
if (argc>1) {
if (argv[1][0] == '-') {
if (strcmp(argv[1], "-verbose") == 0) {
verbose = 1;
} else {
printf ("U... | 1 | [
"CWE-254",
"CWE-787"
] | bzrtp | bbb1e6e2f467ee4bd7b9a8c800e4f07343d7d99b | 229,545,609,836,484,070,000,000,000,000,000,000,000 | 62 | Add ZRTP Commit packet hvi check on DHPart2 packet reception |
static bool is_spillable_regtype(enum bpf_reg_type type)
{
switch (type) {
case PTR_TO_MAP_VALUE:
case PTR_TO_MAP_VALUE_OR_NULL:
case PTR_TO_STACK:
case PTR_TO_CTX:
case PTR_TO_PACKET:
case PTR_TO_PACKET_META:
case PTR_TO_PACKET_END:
case PTR_TO_FLOW_KEYS:
case CONST_PTR_TO_MAP:
case PTR_TO_SOCKET:
case PTR... | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 201,845,643,591,318,340,000,000,000,000,000,000,000 | 35 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
const char *ntlmssp_t_str_i(const void *message, struct ntlmssp_buffer *buffer,
bool unicode)
{
unsigned int len = read_le16(&buffer->length);
const char *p = ((const char *) message) + read_le32(&buffer->offset);
string_t *str;
if (unicode)
len /= sizeof(ucs2le_t);
str = t_str_new(len);
while (len-- ... | 0 | [
"CWE-125"
] | core | fb246611e62ad8c5a95b0ca180a63f17aa34b0d8 | 325,036,171,677,655,740,000,000,000,000,000,000,000 | 19 | lib-ntlm: Check buffer length on responses
Add missing check for buffer length.
If this is not checked, it is possible to send message which
causes read past buffer bug.
Broken in c7480644202e5451fbed448508ea29a25cffc99c |
static MagickBooleanType TIFFGetProperties(TIFF *tiff,Image *image,
ExceptionInfo *exception)
{
char
message[MagickPathExtent],
*text;
MagickBooleanType
status;
uint32
count,
type;
text=(char *) NULL;
status=MagickTrue;
if ((TIFFGetField(tiff,TIFFTAG_ARTIST,&text) == 1) &&
(te... | 0 | [
"CWE-125"
] | ImageMagick | 824f344ceb823e156ad6e85314d79c087933c2a0 | 247,272,067,430,549,770,000,000,000,000,000,000,000 | 92 | Check the type of the field before performing the multiplication (details in #2132) |
dp_packet_batch_clone(struct dp_packet_batch *dst,
struct dp_packet_batch *src)
{
struct dp_packet *packet;
dp_packet_batch_init(dst);
DP_PACKET_BATCH_FOR_EACH (i, packet, src) {
dp_packet_batch_add(dst, dp_packet_clone(packet));
}
dst->trunc = src->trunc;
} | 0 | [
"CWE-400"
] | ovs | 53c1b8b166f3dd217bc391d707885f789e9ecc49 | 252,335,923,798,582,100,000,000,000,000,000,000,000 | 11 | 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... |
proxy_C_GenerateRandom (CK_X_FUNCTION_LIST *self,
CK_SESSION_HANDLE handle,
CK_BYTE_PTR random_data,
CK_ULONG random_len)
{
State *state = (State *)self;
Mapping map;
CK_RV rv;
rv = map_session_to_real (state->px, &handle, &map, NULL);
if (rv... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 223,509,839,932,359,560,000,000,000,000,000,000,000 | 14 | Check for arithmetic overflows before allocating |
void CtcpParser::reply(CoreNetwork *net, const QString &bufname, const QString &ctcpTag, const QString &message) {
QList<QByteArray> params;
params << net->serverEncode(bufname) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, message)));
net->putCmd("NOTICE", params);
} | 0 | [
"CWE-399"
] | quassel | da215fcb9cd3096a3e223c87577d5d4ab8f8518b | 305,247,043,407,735,500,000,000,000,000,000,000,000 | 5 | Fix core crash
Some CTCP requests triggered a bug in the parser; this fixes the issue. |
static unsigned int inf() { return max(); }
static unsigned int cut(const double val) { | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 186,025,217,131,761,100,000,000,000,000,000,000,000 | 2 | Fix other issues in 'CImg<T>::load_bmp()'. |
TfLiteRegistration* Register_MATRIX_DIAG() {
static TfLiteRegistration r = {nullptr, nullptr, matrix_diag::Prepare,
matrix_diag::Eval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 38,204,117,307,787,330,000,000,000,000,000,000,000 | 5 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
int fpm_children_free(struct fpm_child_s *child) /* {{{ */
{
struct fpm_child_s *next;
for (; child; child = next) {
next = child->next;
fpm_child_close(child, 0 /* in_event_loop */);
}
return 0;
} | 0 | [
"CWE-787"
] | php-src | fadb1f8c1d08ae62b4f0a16917040fde57a3b93b | 155,350,103,647,117,150,000,000,000,000,000,000,000 | 11 | Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
The main change is to store scoreboard procs directly to the variable sized
array rather than indirectly through the pointer.
Signed-off-by: Stanislav Malyshev <stas@php.net> |
void glib_message_syslog_redirect(const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
int level=LOG_DEBUG;
switch( log_level )
{
case G_LOG_FLAG_FATAL:
... | 0 | [
"CWE-119",
"CWE-787"
] | nbd | 3ef52043861ab16352d49af89e048ba6339d6df8 | 125,399,343,452,949,180,000,000,000,000,000,000,000 | 28 | Fix buffer size checking
Yes, this means we've re-introduced CVE-2005-3534. Sigh. |
static int tg3_rx_prodring_init(struct tg3 *tp,
struct tg3_rx_prodring_set *tpr)
{
tpr->rx_std_buffers = kzalloc(TG3_RX_STD_BUFF_RING_SIZE(tp),
GFP_KERNEL);
if (!tpr->rx_std_buffers)
return -ENOMEM;
tpr->rx_std = dma_alloc_coherent(&tp->pdev->dev,
TG3_RX_STD_RING_BYTES(tp),
&tpr->rx_std_... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 279,420,569,109,682,850,000,000,000,000,000,000,000 | 35 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
nbd_unlocked_set_opt_mode (struct nbd_handle *h, bool value)
{
h->opt_mode = value;
return 0;
} | 0 | [
"CWE-617"
] | libnbd | fb4440de9cc76e9c14bd3ddf3333e78621f40ad0 | 256,311,368,660,642,100,000,000,000,000,000,000,000 | 5 | opt_go: Tolerate unplanned server death
While debugging some experimental nbdkit code that was triggering an
assertion failure in nbdkit, I noticed a secondary failure of nbdsh
also dying from an assertion:
libnbd: debug: nbdsh: nbd_opt_go: transition: NEWSTYLE.OPT_GO.SEND -> DEAD
libnbd: debug: nbdsh: nbd_opt_go: op... |
xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
xmlErrorLevel errorLevel,
int error, xmlNodePtr node, int line, const char *msg,
const xmlChar *str1, const xmlChar *str2,
const xmlChar *str3, const xmlChar *str4)
{
xmlStructuredErrorFunc schannel = NULL;
xmlGenericErrorFunc channel = NULL;
... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 60,354,407,908,377,390,000,000,000,000,000,000,000 | 101 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static void do_nothing(void *unused)
{
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 87,172,457,445,265,060,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... |
directory_get_consensus_url(int supports_conditional_consensus)
{
char *url;
size_t len;
if (supports_conditional_consensus) {
char *authority_id_list;
smartlist_t *authority_digests = smartlist_create();
SMARTLIST_FOREACH(router_get_trusted_dir_servers(),
trusted_dir_server_t ... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 103,071,311,343,444,390,000,000,000,000,000,000,000 | 38 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
explicit StringView(ASCIIRef asciiRef)
: nonManagedStringPtr_(asciiRef.data()),
startIndex_(0),
isHandle_(false),
isASCII_(true),
length_(asciiRef.size()) {} | 0 | [
"CWE-416",
"CWE-703"
] | hermes | d86e185e485b6330216dee8e854455c694e3a36e | 67,558,329,610,798,530,000,000,000,000,000,000,000 | 6 | Fix a bug in transient object property assignment and getUTF16Ref
Summary:
The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by
appending more contents to the same allocator.
This case was encountered in `transientObjectPutErrorMessage`, resulting in
using free'd memory.
Reviewed By: tmikov
D... |
static int __init ipv4_proc_init(void)
{
return 0;
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 69,781,936,049,490,910,000,000,000,000,000,000,000 | 4 | 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... |
predicate_parse(const char *str, int nr_parens, int nr_preds,
parse_pred_fn parse_pred, void *data,
struct filter_parse_error *pe)
{
struct prog_entry *prog_stack;
struct prog_entry *prog;
const char *ptr = str;
char *inverts = NULL;
int *op_stack;
int *top;
int invert = 0;
int ret = -ENOMEM;
int len;
int... | 1 | [
"CWE-400",
"CWE-284",
"CWE-401"
] | linux | 96c5c6e6a5b6db592acae039fed54b5c8844cd35 | 137,674,465,839,413,760,000,000,000,000,000,000,000 | 179 | tracing: Have error path in predicate_parse() free its allocated memory
In predicate_parse, there is an error path that is not going to
out_free instead it returns directly which leads to a memory leak.
Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <nav... |
trace_free(void *arg, void *p_)
{
trace_info *info = (trace_info *) arg;
trace_header *p = (trace_header *)p_;
if (p == NULL)
return;
info->current -= p[-1].size;
free(&p[-1]);
} | 0 | [
"CWE-369",
"CWE-22"
] | mupdf | 22c47acbd52949421f8c7cb46ea1556827d0fcbf | 146,812,215,761,971,600,000,000,000,000,000,000,000 | 10 | Bug 704834: Fix division by zero for zero width pages in muraster. |
static BROTLI_INLINE BROTLI_BOOL BrotliPullByte(BrotliBitReader* const br) {
if (br->avail_in == 0) {
return BROTLI_FALSE;
}
br->val_ >>= 8;
#if (BROTLI_64_BITS)
br->val_ |= ((uint64_t)*br->next_in) << 56;
#else
br->val_ |= ((uint32_t)*br->next_in) << 24;
#endif
br->bit_pos_ -= 8;
--br->avail_in;
++... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 316,558,675,198,687,040,000,000,000,000,000,000,000 | 15 | 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 |
static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info, const char *progname)
{
int length = strnlen(unc_name, MAX_UNC_LEN);
const char *host, *share, *prepath;
size_t hostlen, sharelen, prepathlen;
if (length > (MAX_UNC_LEN - 1)) {
fprintf(stderr, "mount error: UNC name too long\n");
... | 0 | [
"CWE-78"
] | cifs-utils | 48a654e2e763fce24c22e1b9c695b42804bbdd4a | 156,810,952,718,797,850,000,000,000,000,000,000,000 | 66 | CVE-2020-14342: mount.cifs: fix shell command injection
A bug has been reported recently for the mount.cifs utility which is
part of the cifs-utils package. The tool has a shell injection issue
where one can embed shell commands via the username mount option. Those
commands will be run via popen() in the context of th... |
enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path)
{
enum ovl_path_type type = ovl_path_type(dentry);
if (type == OVL_PATH_LOWER)
ovl_path_lower(dentry, path);
else
ovl_path_upper(dentry, path);
return type;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 69c433ed2ecd2d3264efd7afec4439524b319121 | 193,820,970,230,591,380,000,000,000,000,000,000,000 | 12 | fs: limit filesystem stacking depth
Add a simple read-only counter to super_block that indicates how deep this
is in the stack of filesystems. Previously ecryptfs was the only stackable
filesystem and it explicitly disallowed multiple layers of itself.
Overlayfs, however, can be stacked recursively and also may be s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.