func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void xt_compat_unlock(int af)
{
mutex_unlock(&xt[af].compat_mutex);
} | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 8,014,819,838,078,479,000,000,000,000,000,000,000 | 4 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
_archive_read_next_header2(struct archive *_a, struct archive_entry *entry)
{
struct archive_read *a = (struct archive_read *)_a;
int r1 = ARCHIVE_OK, r2;
archive_check_magic(_a, ARCHIVE_READ_MAGIC,
ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
"archive_read_next_header");
archive_entry_clear(entry);
arch... | 0 | [
"CWE-125"
] | libarchive | e6c9668f3202215ddb71617b41c19b6f05acf008 | 24,308,637,703,512,155,000,000,000,000,000,000,000 | 64 | Add a check to archive_read_filter_consume to reject any
attempts to move the file pointer by a negative amount.
Note: Either this or commit 3865cf2 provides a fix for
Issue 394. |
int main(
int argc,
char **argv) /* pbs_track */
{
int ArgIndex;
int NumErrs = 0;
char *Args[MAXARGS];
int aindex = 0;
int rc;
int pid;
char tmpJobID[PBS_MAXCLTJOBID]; /* from the command line */
char JobID[PBS_MAXCLTJOBID]; /* modified job ID for MOM/server consumption */
... | 1 | [
"CWE-264"
] | torque | f2f4c950f3d461a249111c8826da3beaafccace9 | 263,352,489,502,947,600,000,000,000,000,000,000,000 | 187 | TRQ-2885 - limit tm_adopt() to only adopt a session id that
is owned by the calling user. |
static BOOL rdp_print_input_capability_set(wStream* s, UINT16 length)
{
UINT16 inputFlags;
UINT16 pad2OctetsA;
UINT32 keyboardLayout;
UINT32 keyboardType;
UINT32 keyboardSubType;
UINT32 keyboardFunctionKey;
WLog_INFO(TAG, "InputCapabilitySet (length %" PRIu16 ")", length);
if (length < 88)
return FALSE;
St... | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 92,834,056,900,707,880,000,000,000,000,000,000,000 | 28 | Fixed #6011: Bounds check in rdp_read_font_capability_set |
int dsdb_find_dn_by_guid(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
const struct GUID *guid,
uint32_t dsdb_flags,
struct ldb_dn **dn)
{
int ret;
struct ldb_result *res;
const char *attrs[] = { NULL };
char *guid_str = GUID_string(mem_ctx, guid);
if (!guid_str) {
return ldb_operr(ldb);
}
r... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 44,790,912,514,858,230,000,000,000,000,000,000,000 | 30 | 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... |
xmlFileOpenW (const char *filename) {
const char *path = NULL;
FILE *fd;
if (!strcmp(filename, "-")) {
fd = stdout;
return((void *) fd);
}
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filena... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 324,199,731,747,646,060,000,000,000,000,000,000,000 | 36 | 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. |
nfa_regatom(void)
{
int c;
int charclass;
int equiclass;
int collclass;
int got_coll_char;
char_u *p;
char_u *endp;
char_u *old_regparse = regparse;
int extra = 0;
int emit_range;
int negated;
int result;
int startc = -1;
int save_prev_at_start = prev_a... | 0 | [
"CWE-122"
] | vim | 65b605665997fad54ef39a93199e305af2fe4d7f | 185,667,819,130,638,200,000,000,000,000,000,000,000 | 819 | patch 8.2.3409: reading beyond end of line with invalid utf-8 character
Problem: Reading beyond end of line with invalid utf-8 character.
Solution: Check for NUL when advancing. |
\param dz Checked image depth.
\param dc Checked image spectrum.
**/
bool is_sameXYZC(const unsigned int dx, const unsigned int dy,
const unsigned int dz, const unsigned int dc) const {
bool res = true; | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 48,084,417,557,981,450,000,000,000,000,000,000,000 | 6 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static MonoMethod*
methodbuilder_to_mono_method (MonoClass *klass, MonoReflectionMethodBuilder* mb)
{
ReflectionMethodBuilder rmb;
MonoMethodSignature *sig;
mono_loader_lock ();
sig = method_builder_to_signature (klass->image, mb);
mono_loader_unlock ();
reflection_methodbuilder_from_method_builder (&rmb, mb);
... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 142,638,642,538,075,650,000,000,000,000,000,000,000 | 21 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
int HttpDownstreamConnection::write_first() {
int rv;
process_blocked_request_buf();
if (conn_.tls.ssl) {
rv = write_tls();
} else {
rv = write_clear();
}
if (rv != 0) {
return SHRPX_ERR_RETRY;
}
if (conn_.tls.ssl) {
on_write_ = &HttpDownstreamConnection::write_tls;
} else {
on... | 1 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 132,537,534,933,043,510,000,000,000,000,000,000,000 | 29 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct net *tgt_net = net;
struct ifinfomsg *ifm;
char ifname[IFNAMSIZ];
struct nlattr *tb[IFLA_MAX+1];
struct net_device *dev = NULL;
struct sk_buff *nskb;
int netnsid = ... | 1 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 30,732,359,302,526,444,000,000,000,000,000,000,000 | 65 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
httpGetBlocking(http_t *http) /* I - HTTP connection */
{
return (http ? http->blocking : 0);
} | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 290,780,879,972,422,800,000,000,000,000,000,000,000 | 4 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
static BROTLI_INLINE BROTLI_BOOL BrotliSafeReadBits(
BrotliBitReader* const br, uint32_t n_bits, uint32_t* val) {
BROTLI_DCHECK(n_bits <= 24);
while (BrotliGetAvailableBits(br) < n_bits) {
if (!BrotliPullByte(br)) {
return BROTLI_FALSE;
}
}
BrotliTakeBits(br, n_bits, val);
return BROTLI_TRUE... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 107,959,705,521,532,300,000,000,000,000,000,000,000 | 11 | 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 |
free_urlpos (struct urlpos *l)
{
while (l)
{
struct urlpos *next = l->next;
if (l->url)
url_free (l->url);
xfree_null (l->local_name);
xfree (l);
l = next;
}
} | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 260,416,569,192,253,150,000,000,000,000,000,000,000 | 12 | Introduce --trust-server-names. Close CVE-2010-2252. |
static bool get_signature_algorithm(
X509* certificate,
std::string& signature_algorithm,
SecurityException& exception)
{
bool returnedValue = false;
BUF_MEM* ptr = nullptr;
OPENSSL_CONST X509_ALGOR* sigalg = nullptr;
OPENSSL_CONST ASN1_BIT_STRING* sig = nullptr;
BIO* out = ... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 44,879,511,822,319,805,000,000,000,000,000,000,000 | 60 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
const am_cond_t *am_cond_substitue(request_rec *r, const am_cond_t *ce,
const apr_array_header_t *backrefs)
{
am_cond_t *c;
const char *instr = ce->str;
apr_size_t inlen = strlen(instr);
const char *outstr = "";
size_t last;
size_t i;
c = (am_cond_t *)apr... | 0 | [
"CWE-601"
] | mod_auth_mellon | 42a11261b9dad2e48d70bdff7c53dd57a12db6f5 | 220,844,362,035,607,520,000,000,000,000,000,000,000 | 153 | Prevent redirect to URLs that begin with '///'
Visiting a logout URL like this:
https://rp.example.co.jp/mellon/logout?ReturnTo=///fishing-site.example.com/logout.html
would have redirected the user to fishing-site.example.com
With the patch, this URL would be rejected.
Fixes: CVE-2021-3639 |
BSONObj operand() {
return fromjson("{'':undefined}");
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 32,209,830,503,960,820,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
onig_region_resize_clear(OnigRegion* region, int n)
{
int r;
r = onig_region_resize(region, n);
if (r != 0) return r;
onig_region_clear(region);
return 0;
} | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 42,833,890,890,585,870,000,000,000,000,000,000,000 | 9 | fix #57 : DATA_ENSURE() check must be before data access |
static int orinoco_ioctl_setiwencode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *erq,
char *keybuf)
{
struct orinoco_private *priv = ndev_priv(dev);
int index = (erq->flags & IW_ENCODE_INDEX) - 1;
int setindex = priv->tx_key;
enum orinoco_alg encode_alg = priv->... | 0 | [] | linux | 0a54917c3fc295cb61f3fb52373c173fd3b69f48 | 72,451,904,944,579,980,000,000,000,000,000,000,000 | 90 | orinoco: fix TKIP countermeasure behaviour
Enable the port when disabling countermeasures, and disable it on
enabling countermeasures.
This bug causes the response of the system to certain attacks to be
ineffective.
It also prevents wpa_supplicant from getting scan results, as
wpa_supplicant disables countermeasures... |
static int arcmsr_bus_reset(struct scsi_cmnd *cmd)
{
struct AdapterControlBlock *acb;
uint32_t intmask_org, outbound_doorbell;
int retry_count = 0;
int rtn = FAILED;
acb = (struct AdapterControlBlock *) cmd->device->host->hostdata;
printk(KERN_ERR "arcmsr: executing bus reset eh.....num_resets = %d, num_aborts = ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 114,963,677,968,249,830,000,000,000,000,000,000,000 | 197 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
{
X509_REQ *ret;
X509_REQ_INFO *ri;
int i;
EVP_PKEY *pktmp;
ret = X509_REQ_new();
if (ret == NULL) {
X509err(X509_F_X509_TO_X509_REQ, ERR_R_MALLOC_FAILURE);
goto err;
}
ri = ret->req_info;
ri->ve... | 1 | [] | openssl | 28a00bcd8e318da18031b2ac8778c64147cd54f9 | 219,055,093,684,261,560,000,000,000,000,000,000,000 | 39 | Check public key is not NULL.
CVE-2015-0288
PR#3708
Reviewed-by: Matt Caswell <matt@openssl.org> |
void ConnectionManagerImpl::ActiveStream::addStreamDecoderFilterWorker(
StreamDecoderFilterSharedPtr filter, bool dual_filter) {
ActiveStreamDecoderFilterPtr wrapper(new ActiveStreamDecoderFilter(*this, filter, dual_filter));
filter->setDecoderFilterCallbacks(*wrapper);
wrapper->moveIntoListBack(std::move(wra... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 312,868,169,504,586,450,000,000,000,000,000,000,000 | 6 | 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... |
static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 321,506,710,166,664,600,000,000,000,000,000,000,000 | 4 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
MODRET set_useftpusers(cmd_rec *cmd) {
int bool = -1;
config_rec *c = NULL;
CHECK_ARGS(cmd, 1);
CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL|CONF_ANON);
bool = get_boolean(cmd, 1);
if (bool == -1)
CONF_ERROR(cmd, "expected Boolean parameter");
c = add_config_param(cmd->argv[0], 1, NULL);
c-... | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 302,067,601,727,691,070,000,000,000,000,000,000,000 | 18 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
uint32_t writeI32(const int32_t i32) {
T_VIRTUAL_CALL();
return writeI32_virt(i32);
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 338,240,567,823,013,660,000,000,000,000,000,000,000 | 4 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
void MSG_WriteDeltaEntity( msg_t *msg, struct entityState_s *from, struct entityState_s *to,
qboolean force ) {
int i, lc;
int numFields;
netField_t *field;
int trunc;
float fullFloat;
int *fromF, *toF;
numFields = ARRAY_LEN( entityStateFields );
// all fields should be 32 bits to avoid any... | 0 | [
"CWE-119"
] | ioq3 | d2b1d124d4055c2fcbe5126863487c52fd58cca1 | 216,960,766,804,027,840,000,000,000,000,000,000,000 | 104 | Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read past
end of msg->data buffer (16348 bytes) the engine could SEGFAULT.
Make MSG_WriteBits use an exact buffer overflow check instead of
possibly failing with a few bytes left. |
void kernel_bad_stack(struct pt_regs *regs)
{
printk(KERN_EMERG "Bad kernel stack pointer %lx at %lx\n",
regs->gpr[1], regs->nip);
die("Bad kernel stack pointer", regs, SIGABRT);
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 272,280,689,840,778,900,000,000,000,000,000,000,000 | 6 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
ConnStateData::startPinnedConnectionMonitoring()
{
if (pinning.readHandler != NULL)
return; // already monitoring
typedef CommCbMemFunT<ConnStateData, CommIoCbParams> Dialer;
pinning.readHandler = JobCallback(33, 3,
Dialer, this, ConnStateData::clientPinnedConn... | 0 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 249,077,728,716,329,100,000,000,000,000,000,000,000 | 10 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... |
static int do_decode_custom(const TEST_CUSTOM_DATA *custom_data,
const EXPECTED *expected, size_t expected_size,
const TEST_PACKAGE *package)
{
unsigned char *encoding = NULL;
/*
* We force the defaults to be explicitly encoded to make sure we test
... | 0 | [
"CWE-476"
] | openssl | 22b88fc9c0e22545401c0b34d24843883ea73fec | 10,619,689,933,855,432,000,000,000,000,000,000,000 | 21 | Add a test for encoding/decoding using an invalid ASN.1 Template
If you have a CHOICE type that it must use explicit tagging - otherwise
the template is invalid. We add tests for this.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> |
static int get_pipe(struct stub_device *sdev, struct usbip_header *pdu)
{
struct usb_device *udev = sdev->udev;
struct usb_host_endpoint *ep;
struct usb_endpoint_descriptor *epd = NULL;
int epnum = pdu->base.ep;
int dir = pdu->base.direction;
if (epnum < 0 || epnum > 15)
goto err_ret;
if (dir == USBIP_DIR_IN... | 0 | [
"CWE-119"
] | linux | c6688ef9f29762e65bce325ef4acd6c675806366 | 288,864,211,069,491,100,000,000,000,000,000,000,000 | 76 | usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input
Harden CMD_SUBMIT path to handle malicious input that could trigger
large memory allocations. Add checks to validate transfer_buffer_length
and number_of_packets to protect against bad input requesting for
unbounded memory allocations. Validate early... |
uint32_t Scanner::lex_cls_chr()
{
tok = cur;
const loc_t &loc = cur_loc();
#line 798 "../src/parse/lex.re"
if (globopts->input_encoding == Enc::ASCII) {
#line 3869 "src/parse/lex.cc"
{
unsigned char yych;
unsigned int yyaccept = 0;
if ((lim - cur) < 10) { if (!fill(10)) { error("unexpected ... | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 51,763,806,644,965,790,000,000,000,000,000,000,000 | 775 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
void sctp_endpoint_add_asoc(struct sctp_endpoint *ep,
struct sctp_association *asoc)
{
struct sock *sk = ep->base.sk;
/* If this is a temporary association, don't bother
* since we'll be removing it shortly and don't
* want anyone to find it anyway.
*/
if (asoc->temp)
return;
/* Now just add it to ... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 42,281,242,887,864,108,000,000,000,000,000,000,000 | 19 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
static Token *expand_mmac_params_range(MMacro *mac, Token *tline, Token ***last)
{
Token *t = tline, **tt, *tm, *head;
char *pos;
int fst, lst, j, i;
pos = strchr(tline->text, ':');
nasm_assert(pos);
lst = atoi(pos + 1);
fst = atoi(tline->text + 1);
/*
* only macros params are ac... | 0 | [
"CWE-125"
] | nasm | 3144e84add8b152cc7a71e44617ce6f21daa4ba3 | 295,464,766,006,681,940,000,000,000,000,000,000,000 | 76 | preproc: Don't access offsting byte on unterminated strings
https://bugzilla.nasm.us/show_bug.cgi?id=3392446
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> |
void kill(const UChar32* text, int textLen, bool forward) {
if (textLen == 0) {
return;
}
Utf32String killedText(text, textLen);
if (lastAction == actionKill && size > 0) {
int slot = indexToSlot[0];
int currentLen = theRing[slot].length();
... | 0 | [
"CWE-200"
] | mongo | 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0 | 111,656,607,722,751,460,000,000,000,000,000,000,000 | 37 | SERVER-25335 avoid group and other permissions when creating .dbshell history file |
static bool ComputeLoadStoreField(Handle<Map> type,
Handle<String> name,
LookupResult* lookup,
bool is_store) {
// If we directly find a field, the access can be inlined.
type->LookupDescriptor(NULL, *name, lookup)... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 276,499,696,399,347,300,000,000,000,000,000,000,000 | 17 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
long ContentEncoding::ParseContentEncodingEntry(long long start, long long size,
IMkvReader* pReader) {
assert(pReader);
long long pos = start;
const long long stop = start + size;
// Count ContentCompression and ContentEncryption elements.
int compression_cou... | 1 | [
"CWE-415"
] | libvpx | 6a7c84a2449dcc70de2525df209afea908622399 | 119,330,497,030,844,880,000,000,000,000,000,000,000 | 99 | update libwebm to libwebm-1.0.0.27-361-g81de00c
81de00c Check there is only one settings per ContentCompression
5623013 Fixes a double free in ContentEncoding
93b2ba0 mkvparser: quiet static analysis warnings
Change-Id: Ieaa562ef2f10075381bd856388e6b29f97ca2746 |
static inline int timer_overrun_to_int(struct k_itimer *timr, int baseval)
{
s64 sum = timr->it_overrun_last + (s64)baseval;
return sum > (s64)INT_MAX ? INT_MAX : (int)sum;
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 264,659,069,734,820,300,000,000,000,000,000,000,000 | 6 | 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 int vnc_width(VncDisplay *vd)
{
return MIN(VNC_MAX_WIDTH, ROUND_UP(surface_width(vd->ds),
VNC_DIRTY_PIXELS_PER_BIT));
} | 0 | [] | qemu | 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3 | 90,883,246,124,172,400,000,000,000,000,000,000,000 | 5 | ui: vnc: avoid floating point exception
While sending 'SetPixelFormat' messages to a VNC server,
the client could set the 'red-max', 'green-max' and 'blue-max'
values to be zero. This leads to a floating point exception in
write_png_palette while doing frame buffer updates.
Reported-by: Lian Yihan <lianyihan@360.cn>
... |
static int handle_global_purge(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
struct exit_ctl_data *p = kvm_get_exit_data(vcpu);
struct kvm *kvm = vcpu->kvm;
struct call_data call_data;
int i;
struct kvm_vcpu *vcpui;
call_data.ptc_g_data = p->u.ptc_g_data;
kvm_for_each_vcpu(i, vcpui, kvm) {
if (vcpui->arc... | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 262,238,030,572,961,860,000,000,000,000,000,000,000 | 28 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
static apr_byte_t oidc_provider_static_config(request_rec *r, oidc_cfg *c,
oidc_provider_t **provider) {
json_t *j_provider = NULL;
const char *s_json = NULL;
/* see if we should configure a static provider based on external (cached) metadata */
if ((c->metadata_dir != NULL) || (c->provider.metadata_url == NULL... | 0 | [
"CWE-20"
] | mod_auth_openidc | 612e309bfffd6f9b8ad7cdccda3019fc0865f3b4 | 98,585,485,559,344,240,000,000,000,000,000,000,000 | 53 | don't echo query params on invalid requests to redirect URI; closes #212
thanks @LukasReschke; I'm sure there's some OWASP guideline that warns
against this |
njs_module_read(njs_vm_t *vm, int fd, njs_str_t *text)
{
ssize_t n;
struct stat sb;
text->start = NULL;
if (fstat(fd, &sb) == -1) {
goto fail;
}
if (!S_ISREG(sb.st_mode)) {
goto fail;
}
text->length = sb.st_size;
text->start = njs_mp_alloc(vm->mem_pool, tex... | 0 | [
"CWE-787"
] | njs | ab1702c7af9959366a5ddc4a75b4357d4e9ebdc1 | 195,911,266,113,051,770,000,000,000,000,000,000,000 | 38 | Fixed typo while calculating module path length.
The issue was introduced in 77c398f26d7e (not released yet). |
static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
struct kvm_debugregs *dbgregs)
{
if (dbgregs->flags)
return -EINVAL;
if (!kvm_dr6_valid(dbgregs->dr6))
return -EINVAL;
if (!kvm_dr7_valid(dbgregs->dr7))
return -EINVAL;
memcpy(vcpu->arch.db, dbgregs->db, sizeof(vcpu->arch.db));
kvm... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 28,473,497,513,421,527,000,000,000,000,000,000,000 | 19 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, OPJ_BOOL isEncoder, OPJ_FLOAT32 fraction, OPJ_SIZE_T sizeof_block)
{
OPJ_UINT32 (*l_gain_ptr)(OPJ_UINT32) = 00;
OPJ_UINT32 compno, resno, bandno, precno, cblkno;
opj_tcp_t * l_tcp = 00;
opj_cp_t * l_cp = 00;
opj_tcd_tile_t * l_tile = ... | 1 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 23,767,818,004,344,117,000,000,000,000,000,000,000 | 385 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
void gf_filter_lock_all(GF_Filter *filter, Bool do_lock)
{
if (!filter) return;
if (do_lock)
gf_mx_p(filter->session->filters_mx);
else
gf_mx_v(filter->session->filters_mx);
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 39,501,285,242,454,990,000,000,000,000,000,000,000 | 8 | fixed crashes for very long path - cf #1908 |
void v9fs_put_acl(struct posix_acl *dacl,
struct posix_acl *acl)
{
posix_acl_release(dacl);
posix_acl_release(acl);
} | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 82,908,894,906,426,890,000,000,000,000,000,000,000 | 6 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
void set_date_utc(int64_t date_utc) { date_utc_ = date_utc; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 206,547,069,852,951,260,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
xmlDictCleanup(void) {
if (!xmlDictInitialized)
return;
xmlFreeRMutex(xmlDictMutex);
xmlDictInitialized = 0;
} | 0 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 308,615,009,761,411,450,000,000,000,000,000,000,000 | 8 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
static int selinux_msg_queue_msgsnd(struct msg_queue *msq, struct msg_msg *msg, int msqflg)
{
struct ipc_security_struct *isec;
struct msg_security_struct *msec;
struct common_audit_data ad;
struct selinux_audit_data sad = {0,};
u32 sid = current_sid();
int rc;
isec = msq->q_perm.security;
msec = msg->security... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 297,590,957,862,810,470,000,000,000,000,000,000,000 | 44 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static int em_rdpmc(struct x86_emulate_ctxt *ctxt)
{
u64 pmc;
if (ctxt->ops->read_pmc(ctxt, reg_read(ctxt, VCPU_REGS_RCX), &pmc))
return emulate_gp(ctxt, 0);
*reg_write(ctxt, VCPU_REGS_RAX) = (u32)pmc;
*reg_write(ctxt, VCPU_REGS_RDX) = pmc >> 32;
return X86EMUL_CONTINUE;
} | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 77,600,721,650,360,390,000,000,000,000,000,000,000 | 10 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
Operator *Gfx::findOp(char *name) {
int a, b, m, cmp;
a = -1;
b = numOps;
// invariant: opTab[a] < name < opTab[b]
while (b - a > 1) {
m = (a + b) / 2;
cmp = strcmp(opTab[m].name, name);
if (cmp < 0)
a = m;
else if (cmp > 0)
b = m;
else
a = b = m;
}
if (cmp != 0)
... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 117,920,765,457,993,500,000,000,000,000,000,000,000 | 20 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
TEST_F(ExprMatchTest, ConstantPositiveNumberExpressionMatchesCorrectly) {
createMatcher(fromjson("{$expr: 1}"));
ASSERT_TRUE(matches(BSON("x" << 2)));
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 179,579,822,805,466,940,000,000,000,000,000,000,000 | 5 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static CURLcode smtp_state_command_resp(struct connectdata *conn, int smtpcode,
smtpstate instate)
{
CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
struct SMTP *smtp = data->req.protop;
char *line = data->state.buffer;
size_t len = strlen(line);
(vo... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | curl | ba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628 | 149,080,765,014,951,670,000,000,000,000,000,000,000 | 44 | smtp: use the upload buffer size for scratch buffer malloc
... not the read buffer size, as that can be set smaller and thus cause
a buffer overflow! CVE-2018-0500
Reported-by: Peter Wu
Bug: https://curl.haxx.se/docs/adv_2018-70a2.html |
SpoolssWritePrinter_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep)
{
e_ctx_hnd policy_hnd;
char *pol_name;
guint32 size;
proto_item *item;
proto_tree *subtree;
/* Parse packet */
offset = dissect_nt_policy_hnd(
tvb, offset, pinfo, tree, di, drep, hf_hnd... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 315,779,238,286,529,130,000,000,000,000,000,000,000 | 39 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
static int cx24116_set_symbolrate(struct cx24116_state *state, u32 rate)
{
dprintk("%s(%d)\n", __func__, rate);
/* check if symbol rate is within limits */
if ((rate > state->frontend.ops.info.symbol_rate_max) ||
(rate < state->frontend.ops.info.symbol_rate_min)) {
dprintk("%s() unsupported symbol_rate = %d... | 0 | [
"CWE-476",
"CWE-119",
"CWE-125"
] | linux | 1fa2337a315a2448c5434f41e00d56b01a22283c | 49,663,462,440,161,250,000,000,000,000,000,000,000 | 16 | [media] cx24116: fix a buffer overflow when checking userspace params
The maximum size for a DiSEqC command is 6, according to the
userspace API. However, the code allows to write up much more values:
drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23
Cc: stab... |
static void JS_ExecuteGlobalContextFunction(
v8::FunctionCallbackInfo<v8::Value> const& args) {
TRI_V8_TRY_CATCH_BEGIN(isolate);
v8::HandleScope scope(isolate);
if (args.Length() != 1) {
TRI_V8_THROW_EXCEPTION_USAGE(
"executeGlobalContextFunction(<function-type>)");
}
// extract the action n... | 0 | [
"CWE-918"
] | arangodb | d7b35a6884c6b2802d34d79fb2a79fb2c9ec2175 | 180,933,501,372,251,200,000,000,000,000,000,000,000 | 29 | [APM-78] Disable installation from remote URL (#15292) (#15343)
* [APM-78] Disable installation from remote URL (#15292)
* Update CHANGELOG
* Fix clang-format
Co-authored-by: Vadim <vadim@arangodb.com> |
void fs_logger_print_log(pid_t pid) {
EUID_ASSERT();
ProcessHandle sandbox = pin_sandbox_process(pid);
// chroot in the sandbox
process_rootfs_chroot(sandbox);
unpin_process(sandbox);
drop_privs(0);
// print RUN_FSLOGGER_FILE
FILE *fp = fopen(RUN_FSLOGGER_FILE, "re");
if (!fp) {
fprintf(stderr, "Error: C... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 117,196,020,068,775,350,000,000,000,000,000,000,000 | 25 | fixing CVE-2022-31214 |
static int aes_wrap_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
EVP_AES_WRAP_CTX *wctx = EVP_C_DATA(EVP_AES_WRAP_CTX,ctx);
if (!iv && !key)
return 1;
if (key) {
if (EVP_CIPHER_CTX_encrypting(ctx))
AES_se... | 0 | [
"CWE-125"
] | openssl | 2198b3a55de681e1f3c23edb0586afe13f438051 | 63,796,624,231,887,255,000,000,000,000,000,000,000 | 22 | crypto/evp: harden AEAD ciphers.
Originally a crash in 32-bit build was reported CHACHA20-POLY1305
cipher. The crash is triggered by truncated packet and is result
of excessive hashing to the edge of accessible memory. Since hash
operation is read-only it is not considered to be exploitable
beyond a DoS condition. Oth... |
X509_LOOKUP* X509_STORE_add_lookup(X509_STORE*, X509_LOOKUP_METHOD*)
{
// TODO:
return 0;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 186,786,641,874,932,740,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static void gem_realize(DeviceState *dev, Error **errp)
{
CadenceGEMState *s = CADENCE_GEM(dev);
int i;
address_space_init(&s->dma_as,
s->dma_mr ? s->dma_mr : get_system_memory(), "dma");
if (s->num_priority_queues == 0 ||
s->num_priority_queues > MAX_PRIORITY_QUEUES) {
... | 0 | [
"CWE-835"
] | qemu | e73adfbeec9d4e008630c814759052ed945c3fed | 166,810,663,930,785,770,000,000,000,000,000,000,000 | 38 | cadence_gem: 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
Reviewed-by: Philippe Mathieu-Daudé <philmd@redha... |
_kc_invoke_callback_idle(gpointer user_data)
{
KillChildAsyncData *data = user_data;
if (data->sync.success) {
char buf_exit[KC_EXIT_TO_STRING_BUF_SIZE];
nm_log_dbg(data->log_domain,
"%s: invoke callback: terminated %s",
data->log_name,
... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 76,611,212,030,430,550,000,000,000,000,000,000,000 | 19 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
static void show_submodule_header(FILE *f, const char *path,
const char *line_prefix,
struct object_id *one, struct object_id *two,
unsigned dirty_submodule, const char *meta,
const char *reset,
struct commit **left, struct commit **right,
struct commit_list **merge_bases)
{
const char *message = NULL;
st... | 0 | [] | git | a8dee3ca610f5a1d403634492136c887f83b59d2 | 122,037,394,616,154,400,000,000,000,000,000,000,000 | 71 | Disallow dubiously-nested submodule git directories
Currently it is technically possible to let a submodule's git
directory point right into the git dir of a sibling submodule.
Example: the git directories of two submodules with the names `hippo`
and `hippo/hooks` would be `.git/modules/hippo/` and
`.git/modules/hipp... |
int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_ACL_T theacl)
{
VFS_FIND(sys_acl_set_fd);
return handle->fns->sys_acl_set_fd_fn(handle, fsp, theacl);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 184,156,605,493,704,240,000,000,000,000,000,000,000 | 6 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
static void io_rsrc_node_destroy(struct io_rsrc_node *ref_node)
{
percpu_ref_exit(&ref_node->refs);
kfree(ref_node); | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 154,080,672,122,561,730,000,000,000,000,000,000,000 | 5 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
void compress_block(
const astcenc_context& ctx,
const astcenc_image& input_image,
const image_block& blk,
physical_compressed_block& pcb,
compression_working_buffers& tmpbuf)
{
astcenc_profile decode_mode = ctx.config.profile;
symbolic_compressed_block scb;
error_weight_block& ewb = tmpbuf.ewb;
const block_si... | 0 | [
"CWE-787"
] | astc-encoder | 6ffb3058bfbcc836108c25274e955e399481e2b4 | 196,564,571,257,947,400,000,000,000,000,000,000,000 | 268 | Provide a fallback for blocks which find no valid encoding |
void server_connect_ref(SERVER_CONNECT_REC *conn)
{
conn->refcount++;
} | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 114,459,069,664,927,250,000,000,000,000,000,000,000 | 4 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
CUser::~CUser() {
// Delete networks
while (!m_vIRCNetworks.empty()) {
delete *m_vIRCNetworks.begin();
}
// Delete clients
while (!m_vClients.empty()) {
CZNC::Get().GetManager().DelSockByAddr(m_vClients[0]);
}
m_vClients.clear();
// Delete modules (unloads all modules!)... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 15,462,361,248,644,958,000,000,000,000,000,000,000 | 21 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static int emulate_on_interception(struct kvm_vcpu *vcpu)
{
return kvm_emulate_instruction(vcpu, 0);
} | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 228,011,282,656,925,500,000,000,000,000,000,000,000 | 4 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
void setSocket(const std::shared_ptr<AsyncSSLSocket>& socket) {
socket_ = socket;
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 291,088,324,243,652,800,000,000,000,000,000,000,000 | 3 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static void __route4_delete_filter(struct route4_filter *f)
{
tcf_exts_destroy(&f->exts);
tcf_exts_put_net(&f->exts);
kfree(f);
} | 0 | [
"CWE-416",
"CWE-200"
] | linux | ef299cc3fa1a9e1288665a9fdc8bff55629fd359 | 299,398,749,902,079,640,000,000,000,000,000,000,000 | 6 | net_sched: cls_route: remove the right filter from hashtable
route4_change() allocates a new filter and copies values from
the old one. After the new filter is inserted into the hash
table, the old filter should be removed and freed, as the final
step of the update.
However, the current code mistakenly removes the ne... |
static NTSTATUS dcesrv_lsa_CreateTrustedDomain_base(struct dcesrv_call_state *dce_call,
TALLOC_CTX *mem_ctx,
struct lsa_CreateTrustedDomainEx2 *r,
int op,
struct lsa_TrustDomainInfoAuthInfo *unencrypted_auth_info)
{
struct dcesrv_handle *policy_handle;
struct lsa_policy_state *... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 124,165,656,112,288,280,000,000,000,000,000,000,000 | 316 | 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... |
st_init_strtable(void)
{
return st_init_table(&type_strhash);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 18,448,336,170,110,100,000,000,000,000,000,000,000 | 4 | onig-5.9.2 |
dp_packet_l2_5(const struct dp_packet *b)
{
return b->l2_5_ofs != UINT16_MAX
? (char *) dp_packet_data(b) + b->l2_5_ofs
: NULL;
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 7,632,429,671,028,242,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... |
bgp_show_neighbor (struct vty *vty, struct bgp *bgp,
enum show_type type, union sockunion *su)
{
struct listnode *node, *nnode;
struct peer *peer;
int find = 0;
for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
{
switch (type)
{
case show_all:
bgp_show_peer (vty, peer);
break;
case... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 3,018,193,734,476,090,000,000,000,000,000,000,000 | 29 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
authority_cert_t *cert)
{
or_options_t *options = get_options();
networkstatus_t *v3_out = NULL;
uint32_t addr;
char *hostname = NULL, *client_versions = NULL, *server_versions = NULL;
const char *con... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 226,574,007,062,208,170,000,000,000,000,000,000,000 | 207 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
static inline int sctp_list_single_entry(struct list_head *head)
{
return (head->next != head) && (head->next == head->prev);
} | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 164,546,069,216,297,010,000,000,000,000,000,000,000 | 4 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
ignore_globbed_names (names, name_func)
char **names;
sh_ignore_func_t *name_func;
{
char **newnames;
int n, i;
for (i = 0; names[i]; i++)
;
newnames = strvec_create (i + 1);
for (n = i = 0; names[i]; i++)
{
if ((*name_func) (names[i]))
newnames[n++] = names[i];
else
free (na... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 214,286,071,751,599,500,000,000,000,000,000,000,000 | 35 | commit bash-20190628 snapshot |
static void kiocb_end_write(struct io_kiocb *req)
{
/*
* Tell lockdep we inherited freeze protection from submission
* thread.
*/
if (req->flags & REQ_F_ISREG) {
struct super_block *sb = file_inode(req->file)->i_sb;
__sb_writers_acquired(sb, SB_FREEZE_WRITE);
sb_end_write(sb);
}
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 315,520,559,310,571,960,000,000,000,000,000,000,000 | 13 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static GFINLINE void av1dmx_update_cts(GF_AV1DmxCtx *ctx)
{
assert(ctx->cur_fps.num);
assert(ctx->cur_fps.den);
if (ctx->timescale) {
u64 inc = ctx->cur_fps.den;
inc *= ctx->timescale;
inc /= ctx->cur_fps.num;
ctx->cts += inc;
} else {
ctx->cts += ctx->cur_fps.den;
}
} | 0 | [
"CWE-476",
"CWE-787"
] | gpac | 13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec | 126,064,430,894,865,560,000,000,000,000,000,000,000 | 14 | fixed #1719 |
bool check_grant_routine(THD *thd, ulong want_access,
TABLE_LIST *procs, bool is_proc, bool no_errors)
{
TABLE_LIST *table;
Security_context *sctx= thd->security_ctx;
char *user= sctx->priv_user;
char *host= sctx->priv_host;
DBUG_ENTER("check_grant_routine");
want_access&= ~sctx->master_access;
if (!... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 172,328,089,270,024,260,000,000,000,000,000,000,000 | 48 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
TPMI_DH_PCR_Unmarshal(TPMI_DH_PCR *target, BYTE **buffer, INT32 *size, BOOL allowNull)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPM_HANDLE_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
BOOL isNotPcr = (*target > PCR_LAST);
BOOL isNotLegalNull = (*target != TP... | 1 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 333,809,706,986,758,370,000,000,000,000,000,000,000 | 17 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static ut32 getthzeroimmed16(ut32 number) {
ut32 res = 0;
res |= (number & 0xf000) << 12;
res |= (number & 0x0800) << 7;
res |= (number & 0x0700) >> 4;
res |= (number & 0x00ff) << 8;
return res;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7 | 146,697,578,130,125,970,000,000,000,000,000,000,000 | 8 | Fix #12417/#12418 (arm assembler heap overflows) |
static const char *wsgi_set_error_override(cmd_parms *cmd, void *mconfig,
const char *f)
{
if (cmd->path) {
WSGIDirectoryConfig *dconfig = NULL;
dconfig = (WSGIDirectoryConfig *)mconfig;
if (strcasecmp(f, "Off") == 0)
dconfig->error_ove... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 283,408,875,405,061,000,000,000,000,000,000,000,000 | 29 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
dtls1_process_record(SSL *s)
{
int al;
int clear=0;
int enc_err;
SSL_SESSION *sess;
SSL3_RECORD *rr;
unsigned int mac_size;
unsigned char md[EVP_MAX_MD_SIZE];
int decryption_failed_or_bad_record_mac = 0;
unsigned char *mac = NULL;
int i;
rr= &(s->s3->rrec);
sess = s->session;
/* At this poin... | 1 | [
"CWE-310"
] | openssl | be88529753897c29c677d1becb321f0072c0659c | 232,958,030,173,316,740,000,000,000,000,000,000,000 | 145 | Update DTLS code to match CBC decoding in TLS.
This change updates the DTLS code to match the constant-time CBC
behaviour in the TLS.
(cherry picked from commit 9f27de170d1b7bef3d46d41382dc4dafde8b3900)
(cherry picked from commit 5e4ca556e970edb8a7f364fcb6ee6818a965a60b)
Conflicts:
ssl/d1_enc.c
ssl/d1_pkt.c
ssl/s3... |
static void dcb_flushapp(void)
{
struct dcb_app_type *app;
struct dcb_app_type *tmp;
spin_lock(&dcb_lock);
list_for_each_entry_safe(app, tmp, &dcb_app_list, list) {
list_del(&app->list);
kfree(app);
}
spin_unlock(&dcb_lock);
} | 0 | [
"CWE-399"
] | linux-2.6 | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 | 221,719,518,545,829,230,000,000,000,000,000,000,000 | 12 | dcbnl: fix various netlink info leaks
The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
so we're leaking up to 58 bytes for ieee_ets structs... |
ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm,
char *cipher_name, size_t *key_size)
{
char dummy_key[ECRYPTFS_MAX_KEY_BYTES];
char *full_alg_name;
int rc;
*key_tfm = NULL;
if (*key_size > ECRYPTFS_MAX_KEY_BYTES) {
rc = -EINVAL;
printk(KERN_ERR "Requested key size is [%zd] bytes; maximum... | 0 | [
"CWE-189"
] | linux-2.6 | 8faece5f906725c10e7a1f6caf84452abadbdc7b | 154,034,022,067,648,360,000,000,000,000,000,000,000 | 43 | eCryptfs: Allocate a variable number of pages for file headers
When allocating the memory used to store the eCryptfs header contents, a
single, zeroed page was being allocated with get_zeroed_page().
However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or
ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche... |
static void unlock_params(struct snd_pcm_runtime *runtime)
{
mutex_unlock(&runtime->oss.params_lock);
} | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 301,841,503,183,630,230,000,000,000,000,000,000,000 | 4 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
zmgr_start_xfrin_ifquota(dns_zonemgr_t *zmgr, dns_zone_t *zone) {
dns_peer_t *peer = NULL;
isc_netaddr_t masterip;
uint32_t nxfrsin, nxfrsperns;
dns_zone_t *x;
uint32_t maxtransfersin, maxtransfersperns;
isc_event_t *e;
/*
* If we are exiting just pretend we got quota so the zone will
* be cleaned up in the... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 76,526,912,786,225,590,000,000,000,000,000,000,000 | 87 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
void CLASS parse_smal (int offset, unsigned fsize)
{
int ver;
fseek (ifp, offset+2, SEEK_SET);
order = 0x4949;
ver = fgetc(ifp);
if (ver == 6)
fseek (ifp, 5, SEEK_CUR);
if (get4() != fsize) return;
if (ver > 6) data_offset = get4();
raw_height = height = get2();
raw_width = width = get2();
st... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 103,911,436,054,186,020,000,000,000,000,000,000,000 | 18 | Avoid overflow in ljpeg_start(). |
smtp_proceed_wiz(struct smtp_session *s, const char *args)
{
smtp_reply(s, "500 %s %s: this feature is not supported yet ;-)",
esc_code(ESC_STATUS_PERMFAIL, ESC_INVALID_COMMAND),
esc_description(ESC_INVALID_COMMAND));
} | 0 | [
"CWE-78",
"CWE-252"
] | src | 9dcfda045474d8903224d175907bfc29761dcb45 | 13,130,892,457,290,493,000,000,000,000,000,000,000 | 6 | Fix a security vulnerability discovered by Qualys which can lead to a
privileges escalation on mbox deliveries and unprivileged code execution
on lmtp deliveries, due to a logic issue causing a sanity check to be
missed.
ok eric@, millert@ |
char **lxc_string_split(const char *string, char _sep)
{
char *token, *str, *saveptr = NULL;
char sep[2] = {_sep, '\0'};
char **tmp = NULL, **result = NULL;
size_t result_capacity = 0;
size_t result_count = 0;
int r, saved_errno;
if (!string)
return calloc(1, sizeof(char *));
str = alloca(strlen(string) + 1... | 0 | [
"CWE-417"
] | lxc | 5eb45428b312e978fb9e294dde16efb14dd9fa4d | 147,937,742,932,900,230,000,000,000,000,000,000,000 | 39 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
GF_Err def_cont_box_dump(GF_Box *a, FILE *trace)
{
char *name = "SubTrackDefinitionBox"; //only one using generic box container for now
gf_isom_box_dump_start(a, name, trace);
fprintf(trace, ">\n");
gf_isom_box_dump_done(name, a, trace);
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 302,103,501,110,466,140,000,000,000,000,000,000,000 | 8 | fixed 2 possible heap overflows (inc. #1088) |
static void hidp_send_set_report(struct uhid_event *ev, void *user_data)
{
struct input_device *idev = user_data;
uint8_t hdr;
bool sent;
DBG("");
switch (ev->u.output.rtype) {
case UHID_FEATURE_REPORT:
/* Send SET_REPORT on control channel */
if (idev->report_req_pending) {
DBG("Old GET_REPORT or SET_RE... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 232,444,844,141,422,600,000,000,000,000,000,000,000 | 37 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
print_version(const gs_main_instance *minst)
{
printf_program_ident(minst->heap, NULL, gs_revision);
} | 0 | [] | ghostpdl | 407cc61e87b0fd9d44d72ca740af7d3c85dee78d | 55,938,915,081,514,360,000,000,000,000,000,000,000 | 4 | "starting_arg_file" should only apply once.
The "starting_arg_file == true" setting should apply to the *first* call to
lib_file_open() in the context of a given call to runarg(). Previously, it
remained set for the entire duration of the runarg() call, resulting in the
current directory being searched for any resourc... |
static void setup_namespaces(struct lo_data *lo, struct fuse_session *se)
{
pid_t child;
char template[] = "virtiofsd-XXXXXX";
char *tmpdir;
/*
* Create a new pid namespace for *child* processes. We'll have to
* fork in order to enter the new pid namespace. A new mount namespace
* is a... | 1 | [
"CWE-269"
] | qemu | ebf101955ce8f8d72fba103b5151115a4335de2c | 273,053,890,801,849,470,000,000,000,000,000,000,000 | 96 | virtiofsd: avoid /proc/self/fd tempdir
In order to prevent /proc/self/fd escapes a temporary directory is
created where /proc/self/fd is bind-mounted. This doesn't work on
read-only file systems.
Avoid the temporary directory by bind-mounting /proc/self/fd over /proc.
This does not affect other processes since we rem... |
static void dio_await_completion(struct dio *dio)
{
struct bio *bio;
do {
bio = dio_await_one(dio);
if (bio)
dio_bio_complete(dio, bio);
} while (bio);
} | 0 | [] | linux-2.6 | 848c4dd5153c7a0de55470ce99a8e13a63b4703f | 118,868,956,511,143,920,000,000,000,000,000,000,000 | 9 | dio: zero struct dio with kzalloc instead of manually
This patch uses kzalloc to zero all of struct dio rather than manually
trying to track which fields we rely on being zero. It passed aio+dio
stress testing and some bug regression testing on ext3.
This patch was introduced by Linus in the conversation that lead u... |
void collect_list(char *input[]) {
if (input[0] == NULL) {
return;
}
char *temp = malloc (500);
if (!temp) {
return;
}
temp[0] = 0;
int i;
int conc = 0;
int start, end = 0;
int arrsz;
for (arrsz = 1; input[arrsz] != NULL; arrsz++) {
;
}
for (i = 0; input[i]; i++) {
if (conc) {
strcat (temp, ",... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7 | 121,484,306,811,235,010,000,000,000,000,000,000,000 | 42 | Fix #12417/#12418 (arm assembler heap overflows) |
conn_seq_skew_set(struct conntrack *ct, const struct conn_key *key,
long long now, int seq_skew, bool seq_skew_dir)
{
unsigned bucket = hash_to_bucket(conn_key_hash(key, ct->hash_basis));
ct_lock_lock(&ct->buckets[bucket].lock);
struct conn *conn = conn_lookup(ct, key, now);
if (conn &... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 146,475,411,518,280,190,000,000,000,000,000,000,000 | 12 | 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... |
off_t _q_iosend(FILE *outfp, FILE *infp, off_t nbytes) {
if (nbytes == 0) return 0;
unsigned char buf[QIOSEND_CHUNK_SIZE];
off_t total = 0; // total size sent
while (total < nbytes) {
size_t chunksize; // this time sending size
if (nbytes - total <= sizeof(buf)) chunksize = nbytes - tot... | 0 | [
"CWE-94"
] | qdecoder | ce7c8a7ac450a823a11b06508ef1eb7441241f81 | 297,796,283,114,731,370,000,000,000,000,000,000,000 | 30 | security update: add check on improperly encoded input |
regerror(int posix_ecode, const regex_t* reg ARG_UNUSED, char* buf,
size_t size)
{
char* s;
char tbuf[35];
size_t len;
if (posix_ecode > 0
&& posix_ecode < (int )(sizeof(ESTRING) / sizeof(ESTRING[0]))) {
s = ESTRING[posix_ecode];
}
else if (posix_ecode == 0) {
s = "";
}
else {
sprin... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 257,899,903,389,183,920,000,000,000,000,000,000,000 | 27 | onig-5.9.2 |
void CClient::Connected() { DEBUG(GetSockName() << " == Connected();"); } | 0 | [
"CWE-476"
] | znc | 2390ad111bde16a78c98ac44572090b33c3bd2d8 | 316,446,662,384,458,600,000,000,000,000,000,000,000 | 1 | Fix null pointer dereference in echo-message
The bug was introduced while fixing #1705. If a client did not enable
echo-message, and doesn't have a network, it crashes.
Thanks to LunarBNC for reporting this |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.