func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
Status explain(OperationContext* opCtx,
const OpMsgRequest& opMsgRequest,
ExplainOptions::Verbosity verbosity,
rpc::ReplyBuilderInterface* result) const override {
std::string dbname = opMsgRequest.getDatabase().toString();
const BSONObj& cmdO... | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 212,572,836,034,715,100,000,000,000,000,000,000,000 | 61 | SERVER-38275 ban find explain with UUID |
evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname)
{
int res;
if (!base)
base = current_base;
EVDNS_LOCK(base);
res = evdns_base_load_hosts_impl(base, hosts_fname);
EVDNS_UNLOCK(base);
return res;
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 109,821,499,767,773,260,000,000,000,000,000,000,000 | 10 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
explicit SparseFillEmptyRowsOp(OpKernelConstruction* context)
: OpKernel(context) {} | 0 | [
"CWE-476",
"CWE-703"
] | tensorflow | faa76f39014ed3b5e2c158593b1335522e573c7f | 229,708,862,694,855,550,000,000,000,000,000,000,000 | 2 | Fix heap-buffer-overflow issue with `tf.raw_ops.SparseFillEmptyRows`.
PiperOrigin-RevId: 372009178
Change-Id: Ia1a9e9691ecaa072f32fb39a0887b2aabd399210 |
// Insert code instructions for processing scalars.
unsigned int scalar() { // Insert new scalar in memory.
if (mempos>=mem._width) { mem.resize(-200,1,1,1,0); memtype.resize(mem._width,1,1,1,0); }
return mempos++; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 303,409,094,442,821,300,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
do_line()
{
/* Line continuation has already been handled by read_line() */
char *inlptr;
/* Expand any string variables in the current input line */
string_expand_macros();
/* Skip leading whitespace */
inlptr = gp_input_line;
while (isspace((unsigned char) *inlptr))
inlptr++;
/* Le... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 119,698,043,207,143,560,000,000,000,000,000,000,000 | 115 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
warn_if_hs_unreachable(const edge_connection_t *conn, uint8_t reason)
{
tor_assert(conn);
if (conn->base_.type == CONN_TYPE_EXIT &&
connection_edge_is_rendezvous_stream(conn) &&
(reason == END_STREAM_REASON_CONNECTREFUSED ||
reason == END_STREAM_REASON_TIMEOUT)) {
#define WARN_FAILED_HS_CONNECTI... | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 248,227,352,570,841,100,000,000,000,000,000,000,000 | 19 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
static int i8042_pm_restore(struct device *dev)
{
return i8042_controller_resume(false);
} | 0 | [
"CWE-476"
] | linux | 340d394a789518018f834ff70f7534fc463d3226 | 21,267,102,081,954,612,000,000,000,000,000,000,000 | 4 | Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_int... |
win_equal_rec(
win_T *next_curwin, /* pointer to current window to be or NULL */
int current, /* do only frame with current window */
frame_T *topfr, /* frame to set size off */
int dir, /* 'v', 'h' or 'b', see win_equal() */
int col, /* horizontal position for frame */
int row, /* verti... | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 178,067,894,842,255,620,000,000,000,000,000,000,000 | 316 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
static void vmxnet3_class_init(ObjectClass *class, void *data)
{
DeviceClass *dc = DEVICE_CLASS(class);
PCIDeviceClass *c = PCI_DEVICE_CLASS(class);
VMXNET3Class *vc = VMXNET3_DEVICE_CLASS(class);
c->realize = vmxnet3_pci_realize;
c->exit = vmxnet3_pci_uninit;
c->vendor_id = PCI_VENDOR_ID_VMWAR... | 0 | [
"CWE-416"
] | qemu | 6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8 | 326,688,733,519,975,720,000,000,000,000,000,000,000 | 23 | net: vmxnet3: check for device_active before write
Vmxnet3 device emulator does not check if the device is active,
before using it for write. It leads to a use after free issue,
if the vmxnet3_io_bar0_write routine is called after the device is
deactivated. Add check to avoid it.
Reported-by: Li Qiang <liqiang6-s@360... |
SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)
{
struct k_itimer *timr;
int overrun;
unsigned long flags;
timr = lock_timer(timer_id, &flags);
if (!timr)
return -EINVAL;
overrun = timr->it_overrun_last;
unlock_timer(timr, flags);
return overrun;
} | 1 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 304,086,855,164,084,270,000,000,000,000,000,000,000 | 15 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
static bool sssctl_backup_exist(const char **files)
{
int i;
for (i = 0; files[i] != NULL; i++) {
if (sssctl_backup_file_exists(files[i])) {
return true;
}
}
return false;
} | 0 | [
"CWE-78"
] | sssd | 7ab83f97e1cbefb78ece17232185bdd2985f0bbe | 142,185,963,329,527,700,000,000,000,000,000,000,000 | 12 | TOOLS: replace system() with execvp() to avoid execution of user supplied command
:relnote: A flaw was found in SSSD, where the sssctl command was
vulnerable to shell command injection via the logs-fetch and
cache-expire subcommands. This flaw allows an attacker to trick
the root user into running a specially crafted ... |
changed_line_abv_curs(void)
{
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE);
} | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 99,224,152,036,844,760,000,000,000,000,000,000,000 | 5 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
apr_byte_t oidc_util_json_validate_cnf_x5t_s256(request_rec *r,
int token_binding_policy, const char *x5t_256_str) {
const char *fingerprint = NULL;
fingerprint = oidc_util_get_client_cert_fingerprint(r);
if (fingerprint == NULL) {
oidc_debug(r, "no certificate (fingerprint) provided");
goto out_err;
}
if ... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 255,346,586,227,723,000,000,000,000,000,000,000,000 | 32 | Add a function to escape Javascript characters |
static inline void __init check_numabalancing_enable(void)
{
} | 0 | [
"CWE-388"
] | linux | cf01fb9985e8deb25ccf0ea54d916b8871ae0e62 | 283,952,581,792,305,480,000,000,000,000,000,000,000 | 3 | mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
In the case that compat_get_bitmap fails we do not want to copy the
bitmap to the user as it will contain uninitialized stack data and leak
sensitive data.
Signed-off-by: Chris Salls <salls@cs.ucsb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... |
xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
xmlElementContentPtr content ATTRIBUTE_UNUSED,
int englob ATTRIBUTE_UNUSED) {
} | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 6,759,270,582,994,264,000,000,000,000,000,000,000 | 4 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
nat_select_range_tuple(struct conntrack *ct, const struct conn *conn,
struct conn *nat_conn)
{
enum { MIN_NAT_EPHEMERAL_PORT = 1024,
MAX_NAT_EPHEMERAL_PORT = 65535 };
uint16_t min_port;
uint16_t max_port;
uint16_t first_port;
uint32_t hash = nat_range_hash(conn, ct... | 0 | [
"CWE-400"
] | ovs | 59b588604b89e85b463984ba08a99badb4fcba15 | 337,517,083,650,545,930,000,000,000,000,000,000,000 | 124 | 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... |
static NORETURN void die_nicely(const char *err, va_list params)
{
static int zombie;
char message[2 * PATH_MAX];
vsnprintf(message, sizeof(message), err, params);
fputs("fatal: ", stderr);
fputs(message, stderr);
fputc('\n', stderr);
if (!zombie) {
zombie = 1;
write_crash_report(message);
end_packfile()... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 182,413,600,959,149,050,000,000,000,000,000,000,000 | 19 | 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)... |
static pfunc check_literal(struct jv_parser* p) {
if (p->tokenpos == 0) return 0;
const char* pattern = 0;
int plen;
jv v;
switch (p->tokenbuf[0]) {
case 't': pattern = "true"; plen = 4; v = jv_true(); break;
case 'f': pattern = "false"; plen = 5; v = jv_false(); break;
case 'n': pattern = "null"; plen... | 1 | [
"CWE-119",
"CWE-787"
] | jq | 8eb1367ca44e772963e704a700ef72ae2e12babd | 224,256,725,157,612,950,000,000,000,000,000,000,000 | 29 | Heap buffer overflow in tokenadd() (fix #105)
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes. |
static int check_rename_constraints(struct ldb_message *msg,
struct samldb_ctx *ac,
struct ldb_dn *olddn, struct ldb_dn *newdn)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
struct ldb_dn *dn1, *dn2, *nc_root;
int32_t systemFlags;
bool move_op = false;
bool rename_op = false;
int ret... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 68,591,635,878,225,880,000,000,000,000,000,000,000 | 172 | 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... |
static enum rdma_link_layer hns_roce_get_link_layer(struct ib_device *device,
u8 port_num)
{
return IB_LINK_LAYER_ETHERNET;
} | 0 | [
"CWE-665"
] | kernel | 72be029e947510dd6cbbbaf51879622af26e4200 | 253,683,046,923,659,800,000,000,000,000,000,000,000 | 5 | RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427
FATE#326416).
suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a |
void MonClient::_send_command(MonCommand *r)
{
if (r->is_tell()) {
++r->send_attempts;
if (r->send_attempts > cct->_conf->mon_client_directed_command_retry) {
_finish_command(r, -ENXIO, "mon unavailable");
return;
}
// tell-style command
if (monmap.min_mon_release >= ceph_release_t::o... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 237,494,055,160,959,770,000,000,000,000,000,000,000 | 95 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
__sk_dst_set(struct sock *sk, struct dst_entry *dst)
{
struct dst_entry *old_dst;
sk_tx_queue_clear(sk);
/*
* This can be called while sk is owned by the caller only,
* with no state that can be checked in a rcu_dereference_check() cond
*/
old_dst = rcu_dereference_raw(sk->sk_dst_cache);
rcu_assign_pointer(... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 203,485,310,745,299,730,000,000,000,000,000,000,000 | 13 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static int set_config(struct usb_composite_dev *cdev,
const struct usb_ctrlrequest *ctrl, unsigned number)
{
struct usb_gadget *gadget = cdev->gadget;
struct usb_configuration *c = NULL;
int result = -EINVAL;
unsigned power = gadget_is_otg(gadget) ? 8 : 100;
int tmp;
if (number) {
list_for_each_entry(c,... | 0 | [
"CWE-476"
] | linux | 75e5b4849b81e19e9efe1654b30d7f3151c33c2c | 157,157,837,839,027,930,000,000,000,000,000,000,000 | 110 | USB: gadget: validate interface OS descriptor requests
Stall the control endpoint in case provided index exceeds array size of
MAX_CONFIG_INTERFACES or when the retrieved function pointer is null.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregk... |
ASN1_TIME *X509_time_adj(ASN1_TIME *s, long offset_sec, time_t *in_tm)
{
return X509_time_adj_ex(s, 0, offset_sec, in_tm);
} | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 329,183,413,789,228,600,000,000,000,000,000,000,000 | 4 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
unsigned long *jpegSize, unsigned char *dstBuf, int w, int h,
int subsamp, int jpegQual, char *fileName, int tilew,
int tileh)
{
char tempStr[1024], sizeStr[24] = "\0", qualStr[13] = "\0", *ptr;
F... | 0 | [
"CWE-787"
] | libjpeg-turbo | c30b1e72dac76343ef9029833d1561de07d29bad | 133,301,745,161,016,740,000,000,000,000,000,000,000 | 172 | 64-bit tjbench: Fix signed int overflow/segfault
... that occurred when attempting to decompress images with more than
715827882 (2048*1024*1024 / 3) pixels.
Fixes #388 |
int find_slot_by_number(pkcs11_handle_t *h, unsigned int slot_num, unsigned int *slotID)
{
SECMODModule *module = h->module;
int i;
/* if module is null,
* any of the PKCS #11 modules specified in the system config
* is available, find one */
if (module == NULL) {
PK11SlotList *list;
PK11SlotList... | 0 | [] | pam_pkcs11 | cc51b3e2720ea862d500cab2ea517518ff39a497 | 94,012,363,703,252,570,000,000,000,000,000,000,000 | 66 | verify using a nonce from the system, not the card
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problem. |
void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(SSL_CTX * ctx,SSL_SESSION *sess)
{
return ctx->remove_session_cb;
} | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 161,261,377,583,169,390,000,000,000,000,000,000,000 | 4 | Add SRP support. |
dump_destroy_nhwindow(win)
winid win UNUSED;
{
return;
} | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 222,078,772,955,339,300,000,000,000,000,000,000,000 | 5 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
struct perf_event *p_event)
{
/* The ftrace function trace is allowed only for root. */
if (ftrace_event_is_function(tp_event) &&
perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
return -EPERM;
/* No tracing, just counting, so no obv... | 1 | [
"CWE-284",
"CWE-264"
] | linux | 12ae030d54ef250706da5642fc7697cc60ad0df7 | 76,970,202,480,682,020,000,000,000,000,000,000,000 | 27 | perf/ftrace: Fix paranoid level for enabling function tracer
The current default perf paranoid level is "1" which has
"perf_paranoid_kernel()" return false, and giving any operations that
use it, access to normal users. Unfortunately, this includes function
tracing and normal users should not be allowed to enable func... |
cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v)
{
cmsNAMEDCOLORLIST* NewNC;
if (v == NULL) return NULL;
NewNC= cmsAllocNamedColorList(v ->ContextID, v -> nColors, v ->ColorantCount, v ->Prefix, v ->Suffix);
if (NewNC == NULL) return NULL;
// For really large tables w... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 237,811,360,955,553,300,000,000,000,000,000,000,000 | 20 | Fixes from coverity check |
has_innodb_buffer_pool_dump()
{
if ((server_flavor == FLAVOR_PERCONA_SERVER ||
server_flavor == FLAVOR_MYSQL) &&
mysql_server_version >= 50603) {
return(true);
}
if (server_flavor == FLAVOR_MARIADB && mysql_server_version >= 10000) {
return(true);
}
msg_ts("Server has no support for innodb_buffer_pool_du... | 0 | [
"CWE-200"
] | percona-xtrabackup | 7742f875bb289a874246fb4653b7cd9f14b588fe | 315,196,922,836,432,530,000,000,000,000,000,000,000 | 15 | PXB-2722 password is written into xtrabackup_info
https://jira.percona.com/browse/PXB-2722
Analysis:
password passed with -p option is written into backup tool_command in xtrabackup_info
Fix:
mask password before writting into xtrabackup_info |
static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item,
const char *page, size_t len)
{
u16 bcdUSB;
int ret;
ret = kstrtou16(page, 0, &bcdUSB);
if (ret)
return ret;
ret = is_valid_bcd(bcdUSB);
if (ret)
return ret;
to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB);
return len;
} | 0 | [
"CWE-125"
] | linux | 15753588bcd4bbffae1cca33c8ced5722477fe1f | 22,713,879,776,148,580,000,000,000,000,000,000,000 | 16 | USB: gadget: fix illegal array access in binding with UDC
FuzzUSB (a variant of syzkaller) found an illegal array access
using an incorrect index while binding a gadget with UDC.
Reference: https://www.spinics.net/lists/linux-usb/msg194331.html
This bug occurs when a size variable used for a buffer
is misused to acc... |
void PutByte(byte inByte)
{
if (counter >= outputLen || validOutput[counter] != inByte)
{
std::cerr << "incorrect output " << counter << ", " << (word16)validOutput[counter] << ", " << (word16)inByte << "\n";
fail = true;
CRYPTOPP_ASSERT(false);
}
counter++;
}
| 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 43,886,040,438,258,380,000,000,000,000,000,000,000 | 10 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
static void i2c_ddc_reset(DeviceState *ds)
{
I2CDDCState *s = I2CDDC(ds);
s->firstbyte = false;
s->reg = 0;
} | 0 | [
"CWE-125"
] | qemu | b05b267840515730dbf6753495d5b7bd8b04ad1c | 31,669,133,299,964,760,000,000,000,000,000,000,000 | 7 | i2c-ddc: fix oob read
Suggested-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190108102301.1957-1-kraxel@redhat.com |
compliance_failure(void)
{
char *ver="???";
switch(opt.compliance)
{
case CO_GNUPG:
ver="GnuPG";
break;
case CO_RFC4880:
ver="OpenPGP";
break;
case CO_RFC2440:
ver="OpenPGP (older)";
break;
case CO_PGP6:
ver="PGP 6.x";
break;
case CO_PGP7:... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 336,078,907,942,235,740,000,000,000,000,000,000,000 | 34 | 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 ... |
static int __init default_policy_setup(char *str)
{
ima_use_tcb = 1;
return 1;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 867c20265459d30a01b021a9c1e81fb4c5832aa9 | 171,380,102,804,479,130,000,000,000,000,000,000,000 | 5 | ima: fix add LSM rule bug
If security_filter_rule_init() doesn't return a rule, then not everything
is as fine as the return code implies.
This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.
Adding an empty LSM rule causes ima_match_rules() to always succeed,
ignoring any remaining rules.
defau... |
static int max() { return (int)(~0U>>1); } | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 24,873,659,725,961,000,000,000,000,000,000,000,000 | 1 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int init_server_name(SSL *s, unsigned int context)
{
if (s->server) {
s->servername_done = 0;
OPENSSL_free(s->ext.hostname);
s->ext.hostname = NULL;
}
return 1;
} | 0 | [
"CWE-476"
] | openssl | fb9fa6b51defd48157eeb207f52181f735d96148 | 195,940,367,944,925,400,000,000,000,000,000,000,000 | 11 | ssl sigalg extension: fix NULL pointer dereference
As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's
possible to crash an openssl tls secured server remotely by sending a
manipulated hello message in a rehandshake.
On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls
tls12_shared_s... |
static DIR *open_cwd(pid_t pid)
{
char buf[sizeof("/proc/%lu/cwd") + sizeof(long)*3];
sprintf(buf, "/proc/%lu/cwd", (long)pid);
DIR *cwd = opendir(buf);
if (cwd == NULL)
perror_msg("Can't open process's CWD for CompatCore");
return cwd;
} | 0 | [
"CWE-59"
] | abrt | 28ce40d8db91c1926a95f21ef19a980a8af88471 | 176,809,979,104,062,300,000,000,000,000,000,000,000 | 11 | ccpp: check for overflow in abrt coredump path creation
This issue was discovered by Florian Weimer of Red Hat Product Security.
Signed-off-by: Jakub Filak <jfilak@redhat.com> |
writeRead (const std::string &tempDir,
const Array2D<unsigned int> &pi,
const Array2D<half> &ph,
const Array2D<float> &pf,
int W,
int H,
LineOrder lorder,
Compression comp,
LevelRoundingMode rmode,
int dx, int dy,
int... | 1 | [
"CWE-770"
] | openexr | d80f11f4f55100d007ae80a162bf257ec291612c | 304,466,669,928,447,230,000,000,000,000,000,000,000 | 21 | More efficient handling of filled channels reading tiles with scanline API (#830)
* refactor channel filling in InputFile API with tiled source
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* handle edge-case of empty framebuffer
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
GF_Err fiel_box_dump(GF_Box *a, FILE * trace)
{
GF_FieldInfoBox *p = (GF_FieldInfoBox *) a;
gf_isom_box_dump_start(a, "FieldInfoBox", trace);
gf_fprintf(trace, "count=\"%d\" order=\"%d\">\n", p->field_count, p->field_order);
gf_isom_box_dump_done("FieldInfoBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 267,044,076,493,146,650,000,000,000,000,000,000,000 | 9 | fixed #2138 |
static inline u32 nfsd4_seek_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
{
return (op_encode_hdr_size + 3) * sizeof(__be32);
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 274,350,724,072,718,580,000,000,000,000,000,000,000 | 4 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
slot_handle_level(struct kvm *kvm, const struct kvm_memory_slot *memslot,
slot_level_handler fn, int start_level, int end_level,
bool flush_on_yield)
{
return slot_handle_level_range(kvm, memslot, fn, start_level,
end_level, memslot->base_gfn,
memslot->base_gfn + memslot->npages - 1,
flush_on_yield, f... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 151,908,768,279,797,020,000,000,000,000,000,000,000 | 9 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
void LIRGenerator::do_Convert(Convert* x) {
// flags that vary for the different operations and different SSE-settings
bool fixed_input = false, fixed_result = false, round_result = false, needs_stub = false;
switch (x->op()) {
case Bytecodes::_i2l: // fall through
case Bytecodes::_l2i: // fall through
... | 0 | [] | jdk11u-dev | 9a62b8af48af6c506d2fc4a3482116de26357f16 | 191,508,596,015,360,600,000,000,000,000,000,000,000 | 60 | 8272014: Better array indexing
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
int32_t cli_bcapi_map_done(struct cli_bc_ctx *ctx , int32_t id)
{
struct cli_map *s = get_hashtab(ctx, id);
if (!s)
return -1;
cli_map_delete(s);
if (id == ctx->nmaps-1) {
ctx->nmaps--;
if (!ctx->nmaps) {
free(ctx->maps);
ctx->maps = NULL;
} else {
s = cli_realloc(ctx->maps, ctx->nmap... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 86,098,910,285,749,980,000,000,000,000,000,000,000 | 19 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
static int __copy_siginfo_from_user32(int signo, struct kernel_siginfo *to,
const struct compat_siginfo __user *ufrom)
{
struct compat_siginfo from;
if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo)))
return -EFAULT;
from.si_signo = signo;
return post_copy_siginfo_from_user32(to, &from);
... | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 124,247,512,926,836,470,000,000,000,000,000,000,000 | 11 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
MagickPrivate void XColorBrowserWidget(Display *display,XWindows *windows,
const char *action,char *reply)
{
#define CancelButtonText "Cancel"
#define ColornameText "Name:"
#define ColorPatternText "Pattern:"
#define GrabButtonText "Grab"
#define ResetButtonText "Reset"
char
**colorlist,
primary_selec... | 1 | [] | ImageMagick | d95735d25a39300dd874f0227c430d5dbb1f83cc | 160,042,081,096,241,500,000,000,000,000,000,000,000 | 1,159 | https://github.com/ImageMagick/ImageMagick/issues/3333 |
const BigInt& EC_Group::get_g_x() const
{
return data().g_x();
} | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 167,550,942,579,796,140,000,000,000,000,000,000,000 | 4 | Address DSA/ECDSA side channel |
tiff_unmap_file (thandle_t handle, tdata_t data, toff_t offset)
{
} | 0 | [
"CWE-20"
] | gdk-pixbuf | 3bac204e0d0241a0d68586ece7099e6acf0e9bea | 282,636,363,375,997,680,000,000,000,000,000,000,000 | 3 | 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... |
CImgList<T>& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4,
const CImg<t5>& img5, const CImg<t6>& img6, const CImg<t7>& img7, const CImg<t8>& img8,
const bool is_shared=false) {
assign(8);
_data[0].assign(img... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 213,667,265,230,302,640,000,000,000,000,000,000,000 | 9 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
M_WriteFile
( char const* name,
void* source,
int length )
{
int handle;
int count;
handle = open ( name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
if (handle == -1)
return false;
count = write (handle, source, length);
close (handle);
if (count < length)
return false;
... | 0 | [
"CWE-120",
"CWE-787"
] | doom-vanille | 8a6d9a02fa991a91ff90ccdc73b5ceabaa6cb9ec | 267,459,861,950,410,400,000,000,000,000,000,000,000 | 21 | Fix buffer overflow in M_LoadDefaults
Too much data will most likely result in a crash or freeze, but you can overwrite the stack which can be used to do an arbitrary code execution. (https://twitter.com/notrevenant/status/1268654123903340544) |
gst_asf_demux_get_stream_video_format (asf_stream_video_format * fmt,
guint8 ** p_data, guint64 * p_size)
{
if (*p_size < (4 + 4 + 4 + 2 + 2 + 4 + 4 + 4 + 4 + 4 + 4))
return FALSE;
fmt->size = gst_asf_demux_get_uint32 (p_data, p_size);
/* Sanity checks */
if (fmt->size < 40) {
GST_WARNING ("Corrupt... | 0 | [
"CWE-125",
"CWE-787"
] | gst-plugins-ugly | d21017b52a585f145e8d62781bcc1c5fefc7ee37 | 159,263,281,162,772,500,000,000,000,000,000,000,000 | 28 | asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors
https://bugzilla.gnome.org/show_bug.cgi?id=777955 |
struct cgroup *task_cgroup_from_root(struct task_struct *task,
struct cgroup_root *root)
{
/*
* No need to lock the task - since we hold css_set_lock the
* task can't change groups.
*/
return cset_cgroup_from_root(task_css_set(task), root);
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 260,064,628,677,006,780,000,000,000,000,000,000,000 | 9 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
static void sched_feat_disable(int i)
{
if (static_key_enabled(&sched_feat_keys[i]))
static_key_slow_dec(&sched_feat_keys[i]);
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 204,625,932,193,311,470,000,000,000,000,000,000,000 | 5 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) {
xmlAttributeTablePtr table;
xmlAttributePtr cur;
xmlChar *uqname = NULL, *prefix = NULL;
if (dtd == NULL) return(NULL);
if (dtd->attributes == NULL) return(NULL);
table = (xmlAttributeTablePtr) dtd->attributes;
if... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 21,709,995,283,538,685,000,000,000,000,000,000,000 | 22 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
static void rtl8139_write_buffer(RTL8139State *s, const void *buf, int size)
{
PCIDevice *d = PCI_DEVICE(s);
if (s->RxBufAddr + size > s->RxBufferSize)
{
int wrapped = MOD2(s->RxBufAddr + size, s->RxBufferSize);
/* write packet data */
if (wrapped && !(s->RxBufferSize < 65536 && rt... | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 299,244,727,121,129,370,000,000,000,000,000,000,000 | 36 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
static const char *urlsection(cmd_parms *cmd, void *mconfig, const char *arg)
{
const char *errmsg;
const char *endp = ap_strrchr_c(arg, '>');
int old_overrides = cmd->override;
char *old_path = cmd->path;
core_dir_config *conf;
ap_regex_t *r = NULL;
const command_rec *thiscmd = cmd->cmd;
... | 0 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 242,533,514,496,341,000,000,000,000,000,000,000,000 | 71 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
int TfLiteIntArrayEqual(const TfLiteIntArray* a, const TfLiteIntArray* b) {
if (a == b) return 1;
if (a == NULL || b == NULL) return 0;
return TfLiteIntArrayEqualsArray(a, b->size, b->data);
} | 0 | [
"CWE-190"
] | tensorflow | 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5 | 68,959,748,762,670,620,000,000,000,000,000,000,000 | 5 | Fix a dangerous integer overflow and a malloc of negative size.
PiperOrigin-RevId: 371254154
Change-Id: I250a98a3df26328770167025670235a963a72da0 |
star_fixup_header (struct tar_sparse_file *file)
{
/* NOTE! st_size was initialized from the header
which actually contains archived size. The following fixes it */
off_t realsize = OFF_FROM_HEADER (current_header->star_in_header.realsize);
file->stat_info->archive_file_size = file->stat_info->stat.st_size;
... | 0 | [] | tar | c15c42ccd1e2377945fd0414eca1a49294bff454 | 327,694,903,339,996,840,000,000,000,000,000,000,000 | 9 | Fix CVE-2018-20482
* NEWS: Update.
* src/sparse.c (sparse_dump_region): Handle short read condition.
(sparse_extract_region,check_data_region): Fix dumped_size calculation.
Handle short read condition.
(pax_decode_header): Fix dumped_size calculation.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likew... |
static inline struct page *dev_alloc_page(void)
{
return dev_alloc_pages(0); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 178,195,793,881,014,030,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static ssize_t iowarrior_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{
struct iowarrior *dev;
int read_idx;
int offset;
dev = file->private_data;
/* verify that the device wasn't unplugged */
if (!dev || !dev->present)
return -ENODEV;
dev_dbg(&dev->interface->dev, "mino... | 0 | [
"CWE-416"
] | linux | edc4746f253d907d048de680a621e121517f484b | 337,305,622,275,388,720,000,000,000,000,000,000,000 | 61 | USB: iowarrior: fix use-after-free on disconnect
A recent fix addressing a deadlock on disconnect introduced a new bug
by moving the present flag out of the critical section protected by the
driver-data mutex. This could lead to a racing release() freeing the
driver data before disconnect() is done with it.
Due to in... |
ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
struct ps_data *ps;
/*
* broadcast/multicast frame
*
* If any of the associated/peer stations is in power save mode,
... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 154,962,554,391,871,830,000,000,000,000,000,000,000 | 63 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
qf_parse_fmt_k(regmatch_T *rmp, int midx, qffields_T *fields)
{
if (rmp->startp[midx] == NULL)
return QF_FAIL;
fields->end_col = (int)atol((char *)rmp->startp[midx]);
return QF_OK;
} | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 129,195,799,042,936,500,000,000,000,000,000,000,000 | 7 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
gamma (half h, float m)
{
//
// Conversion from half to unsigned char pixel data,
// with gamma correction. The conversion is the same
// as in the exrdisplay program's ImageView class,
// except with defog, kneeLow, and kneeHigh fixed
// at 0.0, 0.0, and 5.0 respectively.
//
float x =... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 212,678,898,283,179,000,000,000,000,000,000,000,000 | 19 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct inode *inode = file_inode(file);
struct vc_data *vc;
struct vcs_poll_data *poll;
long pos, read;
int attr, uni_mode, row, col, maxcol, viewed;
unsigned short *org = NULL;
ssize_t ret;
char *con_buf;
con_buf = (char *) __get_fre... | 0 | [
"CWE-125"
] | tty | 0c9acb1af77a3cb8707e43f45b72c95266903cee | 297,247,948,997,435,260,000,000,000,000,000,000,000 | 201 | vcs: prevent write access to vcsu devices
Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded
against using devices containing attributes as this is not yet
implemented. It however failed to guard against writes to any devices
as this is also unimplemented.
Reported-by: Or Cohen <orcohen@paloalton... |
static inline bool cpu_has_vmx_apicv(void)
{
return cpu_has_vmx_apic_register_virt() &&
cpu_has_vmx_virtual_intr_delivery() &&
cpu_has_vmx_posted_intr();
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 25,674,877,048,260,900,000,000,000,000,000,000,000 | 6 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
Tensor Tensor::SubSlice(int64_t index) const {
CHECK_GE(dims(), 1); // Crash ok.
CHECK_LE(0, index); // Crash ok.
int64_t dim0_size = shape_.dim_size(0);
CHECK_LE(index, dim0_size); // Crash ok.
Tensor ret;
ret.shape_ = shape_;
ret.shape_.RemoveDim(0);
ret.set_dtype(dtype());
ret.buf_ = nullptr;
... | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 9,944,327,875,258,772,000,000,000,000,000,000,000 | 21 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
encode_NOTE(const struct ofpact_note *note,
enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out)
{
size_t start_ofs = out->size;
struct nx_action_note *nan;
put_NXAST_NOTE(out);
out->size = out->size - sizeof nan->note;
ofpbuf_put(out, note->data, note->length);
pad_ofpat(o... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 97,417,207,261,621,700,000,000,000,000,000,000,000 | 12 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
mail_parser_run (EMailParser *parser,
EMailPartList *part_list,
GCancellable *cancellable)
{
EMailExtensionRegistry *reg;
CamelMimeMessage *message;
EMailPart *mail_part;
GQueue *parsers;
GQueue mail_part_queue = G_QUEUE_INIT;
GList *iter;
GString *part_id;
if (cancellable)
... | 1 | [
"CWE-347"
] | evolution | 9c55a311325f5905d8b8403b96607e46cf343f21 | 15,442,193,154,534,747,000,000,000,000,000,000,000 | 75 | I#120 - Show security bar above message headers
Closes https://gitlab.gnome.org/GNOME/evolution/issues/120 |
ff_layout_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
int how, struct nfs_commit_info *cinfo)
{
return pnfs_generic_commit_pagelist(inode, mds_pages, how, cinfo,
ff_layout_initiate_commit);
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 28,148,689,638,313,914,000,000,000,000,000,000,000 | 6 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
static int inotify_update_existing_watch(struct fsnotify_group *group,
struct inode *inode,
u32 arg)
{
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
__u32 old_mask, new_mask;
__u32 mask;
int add = (arg & IN_MASK_ADD);
int create = (arg & IN_MASK_CREATE);
int ret;
mask = inotify... | 0 | [
"CWE-401"
] | linux-fs | 62c9d2674b31d4c8a674bee86b7edc6da2803aea | 10,661,820,551,041,424,000,000,000,000,000,000,000 | 54 | inotify: Fix fsnotify_mark refcount leak in inotify_update_existing_watch()
Commit 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for
inotify_add_watch()") forgot to call fsnotify_put_mark() with
IN_MASK_CREATE after fsnotify_find_mark()
Fixes: 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inotify_add_... |
dir_policy_permits_address(const tor_addr_t *addr)
{
return addr_policy_permits_tor_addr(addr, 1, dir_policy);
} | 0 | [
"CWE-119"
] | tor | 43414eb98821d3b5c6c65181d7545ce938f82c8e | 227,549,464,853,113,650,000,000,000,000,000,000,000 | 4 | Fix bounds-checking in policy_summarize
Found by piebeer. |
conntrack_clear(struct dp_packet *packet)
{
/* According to pkt_metadata_init(), ct_state == 0 is enough to make all of
* the conntrack fields invalid. */
packet->md.ct_state = 0;
} | 0 | [
"CWE-400"
] | ovs | 53c1b8b166f3dd217bc391d707885f789e9ecc49 | 53,582,976,647,843,150,000,000,000,000,000,000,000 | 6 | 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... |
asmlinkage long sys_symlinkat(const char __user *oldname,
int newdfd, const char __user *newname)
{
int error = 0;
char * from;
char * to;
struct dentry *dentry;
struct nameidata nd;
from = getname(oldname);
if(IS_ERR(from))
return PTR_ERR(from);
to = getname(newname);
error = PTR_ERR(to);
if (IS_... | 0 | [
"CWE-120"
] | linux-2.6 | d70b67c8bc72ee23b55381bd6a884f4796692f77 | 283,489,915,514,039,870,000,000,000,000,000,000,000 | 41 | [patch] vfs: fix lookup on deleted directory
Lookup can install a child dentry for a deleted directory. This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.
This isn't a big problem normally, since memory pressure or umount
will clea... |
poppler_document_class_init (PopplerDocumentClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = poppler_document_finalize;
gobject_class->get_property = poppler_document_get_property;
gobject_class->set_property = poppler_document_set_property;
/**
* PopplerDoc... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 107,764,113,973,656,930,000,000,000,000,000,000,000 | 231 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
njs_iterator_to_array(njs_vm_t *vm, njs_value_t *iterator)
{
int64_t length;
njs_int_t ret;
njs_iterator_args_t args;
njs_memzero(&args, sizeof(njs_iterator_args_t));
ret = njs_object_length(vm, iterator, &length);
if (njs_slow_path(ret != NJS_OK)) {
return NUL... | 1 | [] | njs | c756e23eb09dac519fe161c88587cc034306630f | 107,907,821,832,273,330,000,000,000,000,000,000,000 | 29 | Fixed njs_iterator_to_array() with sparse arrays.
This closes #524 issue on Github. |
static int ntop_redis_get_host_id(lua_State* vm) {
char *host_name;
Redis *redis = ntop->getRedis();
char daybuf[32];
time_t when = time(NULL);
bool new_key;
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_l... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 169,991,303,254,570,550,000,000,000,000,000,000,000 | 18 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
{
BIO *in;
X509 *x=NULL;
X509_NAME *xn=NULL;
STACK_OF(X509_NAME) *ret = NULL,*sk;
sk=sk_X509_NAME_new(xname_cmp);
in=BIO_new(BIO_s_file_internal());
if ((sk == NULL) || (in == NULL))
{
SSLerr(SSL_F_SSL_LOAD_CLIENT_CA_FILE,ERR_R_MALLOC_FAILURE... | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 279,115,906,387,005,060,000,000,000,000,000,000,000 | 59 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
check_envvar (void)
{
const gchar *envvar;
envvar = g_getenv ("NO_AT_BRIDGE");
if (envvar && atoi (envvar) == 1)
return FALSE;
else
return TRUE;
} | 0 | [] | at-spi2-atk | e4f3eee2e137cd34cd427875365f458c65458164 | 8,332,235,866,577,848,000,000,000,000,000,000,000 | 11 | Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir
If we use XDG_RUNTIME_DIR, then the directory should be owned by the
appropriate user, so it should not need to be world-writable. Hopefully this
won't break accessibility for administrative apps on some distro.
https://bugzilla.gnome.org/show_... |
child_setup (gpointer user_data)
{
GArray *fd_array = user_data;
int i;
/* If no fd_array was specified, don't care. */
if (fd_array == NULL)
return;
/* Otherwise, mark not - close-on-exec all the fds in the array */
for (i = 0; i < fd_array->len; i++)
fcntl (g_array_index (fd_array, int, i), F_SE... | 0 | [
"CWE-20"
] | flatpak | 902fb713990a8f968ea4350c7c2a27ff46f1a6c4 | 122,296,813,217,615,770,000,000,000,000,000,000,000 | 13 | Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty. |
static CURLcode smtp_done(struct connectdata *conn, CURLcode status,
bool premature)
{
struct SessionHandle *data = conn->data;
struct FTP *smtp = data->state.proto.smtp;
CURLcode result = CURLE_OK;
ssize_t bytes_written;
(void)premature;
if(!smtp)
/* When the easy handle is r... | 0 | [
"CWE-89"
] | curl | 75ca568fa1c19de4c5358fed246686de8467c238 | 148,338,716,318,075,370,000,000,000,000,000,000,000 | 54 | URL sanitize: reject URLs containing bad data
Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a
decoded manner now use the new Curl_urldecode() function to reject URLs
with embedded control codes (anything that is or decodes to a byte value
less than 32).
URLs containing such codes could easily oth... |
int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,
struct ath_tx_control *txctl)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ath_frame_info *fi = get_frame_info(skb);
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_buf *bf;
int padpos, padsize;
pa... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 15,461,120,242,469,760,000,000,000,000,000,000,000 | 42 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
UpdateWaitHandles(LPHANDLE *handles_ptr, LPDWORD count,
HANDLE io_event, HANDLE exit_event, list_item_t *threads)
{
static DWORD size = 10;
static LPHANDLE handles = NULL;
DWORD pos = 0;
if (handles == NULL)
{
handles = malloc(size * sizeof(HANDLE));
*handles_ptr =... | 0 | [
"CWE-415"
] | openvpn | 1394192b210cb3c6624a7419bcf3ff966742e79b | 175,312,727,697,273,400,000,000,000,000,000,000,000 | 47 | Fix potential double-free() in Interactive Service (CVE-2018-9336)
Malformed input data on the service pipe towards the OpenVPN interactive
service (normally used by the OpenVPN GUI to request openvpn instances
from the service) can result in a double free() in the error handling code.
This usually only leads to a pr... |
static void sub_remove(struct idr *idp, int shift, int id)
{
struct idr_layer *p = idp->top;
struct idr_layer **pa[MAX_IDR_LEVEL];
struct idr_layer ***paa = &pa[0];
struct idr_layer *to_free;
int n;
*paa = NULL;
*++paa = &idp->top;
while ((shift > 0) && p) {
n = (id >> shift) & IDR_MASK;
__clear_bit(n, &p... | 1 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 160,423,979,510,555,230,000,000,000,000,000,000,000 | 36 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
void _moddeinit(module_unload_intent_t intent)
{
service_named_unbind_command("chanserv", &cs_flags);
} | 1 | [
"CWE-284"
] | atheme | c597156adc60a45b5f827793cd420945f47bc03b | 4,581,328,154,741,107,000,000,000,000,000,000,000 | 4 | chanserv/flags: make Anope FLAGS compatibility an option
Previously, ChanServ FLAGS behavior could be modified by registering or
dropping the keyword nicks "LIST", "CLEAR", and "MODIFY".
Now, a configuration option is available that when turned on (default),
disables registration of these keyword nicks and enables thi... |
struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
struct zone *zone)
{
int nid = zone_to_nid(zone);
int zid = zone_idx(zone);
struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(memcg, nid, zid);
return &mz->reclaim_stat;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 321,168,209,584,130,740,000,000,000,000,000,000,000 | 9 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx)
{
if (group->meth->point_set_Jprojective_coordinates_GFp == 0)
{
ECerr(EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0... | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 168,376,880,658,851,280,000,000,000,000,000,000,000 | 15 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
int bearer_id, struct sk_buff_head *xmitq)
{
struct tipc_msg *hdr = buf_msg(skb);
int usr = msg_user(hdr);
int mtyp = msg_type(hdr);
u16 oseqno = msg_seqno(hdr);
u16 exp_pkts = msg_msgcnt(hdr);
u16 rcv_nxt, syncpt, dlv_nxt, inputq_l... | 0 | [] | linux | 0217ed2848e8538bcf9172d97ed2eeb4a26041bb | 47,776,099,743,076,800,000,000,000,000,000,000,000 | 143 | tipc: better validate user input in tipc_nl_retrieve_key()
Before calling tipc_aead_key_size(ptr), we need to ensure
we have enough data to dereference ptr->keylen.
We probably also want to make sure tipc_aead_key_size()
wont overflow with malicious ptr->keylen values.
Syzbot reported:
BUG: KMSAN: uninit-value in _... |
StatusWith<PrivilegeVector> AuthorizationSessionImpl::getPrivilegesForAggregate(
const NamespaceString& nss, const BSONObj& cmdObj, bool isMongos) {
if (!nss.isValid()) {
return Status(ErrorCodes::InvalidNamespace,
mongoutils::str::stream() << "Invalid input namespace, " << nss.ns(... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 254,917,000,525,025,500,000,000,000,000,000,000,000 | 48 | SERVER-38984 Validate unique User ID on UserCache hit |
static ssize_t iwl_dbgfs_rfkill_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_trans *trans = file->private_data;
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
char buf[100];
int pos;
pos = scnprintf(buf, sizeof(buf), "debug: %d\nhw... | 0 | [
"CWE-476"
] | linux | 8188a18ee2e48c9a7461139838048363bfce3fef | 77,690,510,614,235,780,000,000,000,000,000,000,000 | 16 | iwlwifi: pcie: fix rb_allocator workqueue allocation
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sig... |
static void ixgbe_clear_vmvir(struct ixgbe_adapter *adapter, u32 vf)
{
struct ixgbe_hw *hw = &adapter->hw;
IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), 0);
} | 0 | [
"CWE-20"
] | linux | 63e39d29b3da02e901349f6cd71159818a4737a6 | 13,244,672,732,872,193,000,000,000,000,000,000,000 | 6 | ixgbe: fix large MTU request from VF
Check that the MTU value requested by the VF is in the supported
range of MTUs before attempting to set the VF large packet enable,
otherwise reject the request. This also avoids unnecessary
register updates in the case of the 82599 controller.
Fixes: 872844ddb9e4 ("ixgbe: Enable ... |
initialize_environment(void)
{
putenv("PGAPPNAME=pg_regress");
if (nolocale)
{
/*
* Clear out any non-C locale settings
*/
unsetenv("LC_COLLATE");
unsetenv("LC_CTYPE");
unsetenv("LC_MONETARY");
unsetenv("LC_NUMERIC");
unsetenv("LC_TIME");
unsetenv("LANG");
/* On Windows the default locale cann... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 111,273,641,222,411,080,000,000,000,000,000,000,000 | 182 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
g_make_token_header(gss_OID_const mech,
unsigned int body_size,
unsigned char **buf,
unsigned int totallen)
{
int ret = 0;
unsigned int hdrsize;
unsigned char *p = *buf;
hdrsize = 1 + gssint_der_length_size(mech->length) + mech->length;
*(*buf)++ = HEADER_ID;
if ((ret = gssint_put_der_length(h... | 0 | [
"CWE-415"
] | krb5 | f18ddf5d82de0ab7591a36e465bc24225776940f | 105,219,876,877,780,000,000,000,000,000,000,000,000 | 22 | Fix double-free in SPNEGO [CVE-2014-4343]
In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the
pointer sc->internal_mech became an alias into sc->mech_set->elements,
which should be considered constant for the duration of the SPNEGO
context. So don't free it.
CVE-2014-4343:
In MIT krb5 releases 1.1... |
rsvg_state_inherit_run (RsvgState * dst, const RsvgState * src,
const InheritanceFunction function, const gboolean inherituninheritables)
{
gint i;
if (function (dst->has_current_color, src->has_current_color))
dst->current_color = src->current_color;
if (function (dst->has_... | 1 | [
"CWE-20"
] | librsvg | d1c9191949747f6dcfd207831d15dd4ba00e31f2 | 134,237,730,731,253,370,000,000,000,000,000,000,000 | 121 | state: Store mask as reference
Instead of immediately looking up the mask, store the reference and look
it up on use. |
void or_bits(REP_SET *to,REP_SET *from)
{
reg1 uint i;
for (i=0 ; i < to->size_of_bits ; i++)
to->bits[i]|=from->bits[i]; | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 265,904,500,929,529,250,000,000,000,000,000,000,000 | 7 | WL#9072: Backport WL#8785 to 5.5 |
static inline NPIdentifierInfo *npidentifier_info_new(void)
{
return NPW_MemNew(NPIdentifierInfo, 1);
} | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 37,943,446,421,343,462,000,000,000,000,000,000,000 | 4 | Support all the new variables added |
static void init_page(page_obj_t *page, const char *name, const char *title)
{
page->name = name;
page->title = title;
} | 0 | [
"CWE-200"
] | libreport | 257578a23d1537a2d235aaa2b1488ee4f818e360 | 110,217,667,205,843,420,000,000,000,000,000,000,000 | 5 | wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was passed to the bugzilla bug
report.
report-gtk saves the first text view buffer and then reloads data from the
reported problem directory... |
static void mov_update_dts_shift(MOVStreamContext *sc, int duration)
{
if (duration < 0) {
if (duration == INT_MIN) {
av_log(NULL, AV_LOG_WARNING, "mov_update_dts_shift(): dts_shift set to %d\n", INT_MAX);
duration++;
}
sc->dts_shift = FFMAX(sc->dts_shift, -duration);... | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 9cb4eb772839c5e1de2855d126bf74ff16d13382 | 246,832,858,396,549,800,000,000,000,000,000,000,000 | 10 | avformat/mov: Fix DoS in read_tfra()
Fixes: Missing EOF check in loop
No testcase
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
{
struct dm_md_mempools *p = dm_table_get_md_mempools(t);
if (md->bs) {
/* The md already has necessary mempools. */
if (dm_table_bio_based(t)) {
/*
* Reload bioset because front_pad may have changed
* because a different table ... | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 111,458,691,362,044,400,000,000,000,000,000,000,000 | 37 | 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
... |
void free_blobs(TABLE *table)
{
uint *ptr, *end;
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;
ptr != end ;
ptr++)
{
/*
Reduced TABLE objects which are used by row-based replication for
type conversion might have some fields missing. Skip freeing BLOB
buffer... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 94,190,117,326,399,960,000,000,000,000,000,000,000 | 16 | 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. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.