func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
inline void record_first_successful_insert_id_in_cur_stmt(ulonglong id_arg)
{
if (first_successful_insert_id_in_cur_stmt == 0)
first_successful_insert_id_in_cur_stmt= id_arg;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 127,688,296,290,114,560,000,000,000,000,000,000,000 | 5 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static int yam_info_open(struct inode *inode, struct file *file)
{
return seq_open(file, &yam_seqops);
} | 0 | [
"CWE-399"
] | linux | 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed | 47,740,416,340,968,810,000,000,000,000,000,000,000 | 4 | hamradio/yam: fix info leak in ioctl
The yam_ioctl() code fails to initialise the cmd field
of the struct yamdrv_ioctl_cfg. Add an explicit memset(0)
before filling the structure to avoid the 4-byte info leak.
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
struct hidpp_device *hidpp;
int ret;
bool connected;
unsigned int connect_mask = HID_CONNECT_DEFAULT;
/* report_fixup needs drvdata to be set before we call hid_parse */
hidpp = devm_kzalloc(&hdev->dev, sizeof(*hidpp), GFP_KERNEL);... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 106,826,046,227,335,660,000,000,000,000,000,000,000 | 149 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
void mp_encode_map(lua_State *L, mp_buf *buf, int64_t n) {
unsigned char b[5];
int enclen;
if (n <= 15) {
b[0] = 0x80 | (n & 0xf); /* fix map */
enclen = 1;
} else if (n <= 65535) {
b[0] = 0xde; /* map 16 */
b[1] = (n & 0xff00) >> 8;
b[2] = n & ... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 52a00201fca331217c3b4b8b634f6a0f57d6b7d3 | 279,168,909,603,724,500,000,000,000,000,000,000,000 | 22 | Security: fix Lua cmsgpack library stack overflow.
During an auditing effort, the Apple Vulnerability Research team discovered
a critical Redis security issue affecting the Lua scripting part of Redis.
-- Description of the problem
Several years ago I merged a pull request including many small changes at
the Lua Msg... |
TEST_P(Http2CodecImplTest, ShutdownNotice) {
initialize();
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(_, true));
request_encoder_->encodeHeaders(request_headers, true);
EXPECT_CALL(client_callbacks_, onGoAway());
s... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 305,378,804,171,601,500,000,000,000,000,000,000,000 | 16 | 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... |
parse_callout_args(int skip_mode, int cterm, UChar** src, UChar* end,
int max_arg_num, unsigned int types[], OnigValue vals[],
ScanEnv* env)
{
#define MAX_CALLOUT_ARG_BYTE_LENGTH 128
int r;
int n;
int esc;
int cn;
UChar* s;
UChar* e;
UChar* eesc;
OnigCodePoint c;... | 0 | [
"CWE-125"
] | oniguruma | aa0188eaedc056dca8374ac03d0177429b495515 | 316,847,421,978,072,400,000,000,000,000,000,000,000 | 137 | fix #163: heap-buffer-overflow in gb18030_mbc_enc_len |
int sock_create_kern(struct net *net, int family, int type, int protocol, struct socket **res)
{
return __sock_create(net, family, type, protocol, res, 1);
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | 34b88a68f26a75e4fded796f1a49c40f82234b7d | 42,472,948,489,393,450,000,000,000,000,000,000,000 | 4 | net: Fix use after free in the recvmmsg exit path
The syzkaller fuzzer hit the following use-after-free:
Call Trace:
[<ffffffff8175ea0e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
[<ffffffff851cc31a>] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
[< inline >] SYSC_recvmmsg net/sock... |
static int usbhid_open(struct hid_device *hid)
{
struct usbhid_device *usbhid = hid->driver_data;
int res;
set_bit(HID_OPENED, &usbhid->iofl);
if (hid->quirks & HID_QUIRK_ALWAYS_POLL)
return 0;
res = usb_autopm_get_interface(usbhid->intf);
/* the device must be awake to reliably request remote wakeup */
if ... | 0 | [
"CWE-125",
"CWE-787"
] | linux | f043bfc98c193c284e2cd768fefabe18ac2fed9b | 31,440,976,032,523,550,000,000,000,000,000,000,000 | 50 | HID: usbhid: fix out-of-bounds bug
The hid descriptor identifies the length and type of subordinate
descriptors for a device. If the received hid descriptor is smaller than
the size of the struct hid_descriptor, it is possible to cause
out-of-bounds.
In addition, if bNumDescriptors of the hid descriptor have an incor... |
DestructParserList(parserList_t **ppListRoot)
{
parserList_t *pParsLst;
parserList_t *pParsLstDel;
pParsLst = *ppListRoot;
while(pParsLst != NULL) {
pParsLstDel = pParsLst;
pParsLst = pParsLst->pNext;
free(pParsLstDel);
}
*ppListRoot = NULL;
return RS_RET_OK;
} | 0 | [] | rsyslog | 20f8237870eb5e971fa068e4dd4d296f1dbef329 | 253,056,241,231,278,400,000,000,000,000,000,000,000 | 14 | core: fix potential misadressing in parser message sanitizer
misadressing could happen when an oversize message made it to the
sanitizer AND contained a control character in the oversize part
of the message. Note that it is an error in itself that such an
oversize message enters the system, but we harden the sanitizer... |
static int tcm_loop_get_cmd_state(struct se_cmd *se_cmd)
{
struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
struct tcm_loop_cmd, tl_se_cmd);
return tl_cmd->sc_cmd_state;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 239,130,817,522,253,770,000,000,000,000,000,000,000 | 7 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
long ssl_get_algorithm2(SSL *s)
{
long alg2 = s->s3->tmp.new_cipher->algorithm2;
if (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF
&& alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF))
return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
return alg2;
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 30,663,842,940,253,896,000,000,000,000,000,000,000 | 8 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
Status TrySimplify(NodeDef* reduction_node,
string* simplified_node_name) override {
if (IsInPreserveSet(*reduction_node)) return Status::OK();
bool optimized = false;
// Inputs 1 (indices) and 2 (segment_ids) can be either DT_INT32 or
// DT_INT64.
std::array<std::pair<int, ... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 69,991,755,633,967,070,000,000,000,000,000,000,000 | 31 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
SPL_METHOD(Array, setIteratorClass)
{
zval *object = getThis();
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
zend_class_entry * ce_get_iterator = spl_ce_Iterator;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "C", &ce_get_iterator) == FAILURE) {
return;
}
... | 0 | [] | php-src | a374dfab567ff7f0ab0dc150f14cc891b0340b47 | 81,622,917,873,178,120,000,000,000,000,000,000,000 | 12 | Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion |
static spl_filesystem_object * spl_filesystem_object_create_info(spl_filesystem_object *source, char *file_path, int file_path_len, int use_copy, zend_class_entry *ce, zval *return_value TSRMLS_DC) /* {{{ */
{
spl_filesystem_object *intern;
zval *arg1;
zend_error_handling error_handling;
if (!file_path || !file_pa... | 1 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 331,751,968,182,783,920,000,000,000,000,000,000,000 | 43 | Fix bug #72262 - do not overflow int |
void unregister_control_device_interface(struct bcm_mini_adapter *Adapter)
{
if (Adapter->major > 0) {
device_destroy(bcm_class, MKDEV(Adapter->major, 0));
unregister_chrdev(Adapter->major, DEV_NAME);
}
} | 0 | [
"CWE-200"
] | linux | 8d1e72250c847fa96498ec029891de4dc638a5ba | 214,034,647,331,985,900,000,000,000,000,000,000,000 | 7 | Staging: bcm: info leak in ioctl
The DevInfo.u32Reserved[] array isn't initialized so it leaks kernel
information to user space.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus To... |
static int ZEND_FASTCALL ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval restored_error_reporting;
if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.u.var).tmp_var) != 0) {
Z_TYPE(restored_error_reporting) = IS_LONG;
Z_LVAL(restored_error_reporting) = Z_LVAL(E... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 270,971,006,089,067,800,000,000,000,000,000,000,000 | 17 | - 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 |
}
void dump_mpeg2_ts(char *mpeg2ts_file, char *out_name, Bool prog_num)
{
u8 data[188];
GF_M2TS_Dump dumper;
u32 size;
u64 fsize, fdone;
GF_M2TS_Demuxer *ts;
FILE *src;
if (!prog_num && !out_name) {
fprintf(stderr, "No program number nor output filename specified. No timestamp file will be generated.");
}
... | 0 | [
"CWE-476"
] | gpac | ce01bd15f711d4575b7424b54b3a395ec64c1784 | 8,682,523,957,251,011,000,000,000,000,000,000,000 | 104 | fixed #1566 |
//! Load image from a PFM file \newinstance.
static CImg<T> get_load_pfm(const char *const filename) {
return CImg<T>().load_pfm(filename); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 299,543,171,923,982,150,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void opj_j2k_read_int32_to_int32 (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem)
{
OPJ_BYTE * l_src_data = (OPJ_BYTE *) p_src_data;
OPJ_INT32 * l_dest_data = (OPJ_INT32 *) p_dest_data;
OPJ_UINT32 i;
OPJ_UINT32 l_temp;
for (i=0;i<p_nb_elem;++i) {
... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 6,537,779,576,658,123,000,000,000,000,000,000,000 | 15 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
static inline int __smb2_reconnect(const struct nls_table *nlsc,
struct cifs_tcon *tcon)
{
return SMB2_tcon(0, tcon->ses, tcon->treeName, tcon, nlsc);
} | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 150,384,433,405,384,090,000,000,000,000,000,000,000 | 5 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
//! Return a shared-memory image referencing one channel of the image instance \const.
const CImg<T> get_shared_channel(const unsigned int c0) const {
return get_shared_channels(c0,c0); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 285,543,569,088,840,140,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
bool bt_att_cancel(struct bt_att *att, unsigned int id)
{
const struct queue_entry *entry;
struct att_send_op *op;
if (!att || !id)
return false;
/* Lookuo request on each channel first */
for (entry = queue_get_entries(att->chans); entry;
entry = entry->next) {
struct bt_att_chan *chan = entry->data;
... | 1 | [
"CWE-415"
] | bluez | 1cd644db8c23a2f530ddb93cebed7dacc5f5721a | 161,354,533,487,562,390,000,000,000,000,000,000,000 | 39 | shared/att: Fix possible crash on disconnect
If there are pending request while disconnecting they would be notified
but clients may endup being freed in the proccess which will then be
calling bt_att_cancel to cancal its requests causing the following
trace:
Invalid read of size 4
at 0x1D894C: enable_ccc_callback... |
static u32 rateset_to_mask(struct ieee80211_supported_band *sband,
u8 *rates, u8 rates_len)
{
u8 i;
u32 mask = 0;
for (i = 0; i < rates_len; i++) {
int rate = (rates[i] & 0x7f) * 5;
int ridx;
for (ridx = 0; ridx < sband->n_bitrates; ridx++) {
struct ieee80211_rate *srate =
&sband->bitrates[ridx]... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 319,420,272,924,131,580,000,000,000,000,000,000,000 | 24 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
static int expand_mmacro(Token * tline)
{
Token *startline = tline;
Token *label = NULL;
int dont_prepend = 0;
Token **params, *t, *tt;
MMacro *m;
Line *l, *ll;
int i, nparam, *paramlen;
const char *mname;
t = tline;
skip_white_(t);
/* if (!tok_type_(t, TOK_ID)) Lino 02/... | 0 | [
"CWE-125"
] | nasm | 3144e84add8b152cc7a71e44617ce6f21daa4ba3 | 279,535,758,967,035,370,000,000,000,000,000,000,000 | 181 | 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> |
ar6000_snrThresholdEvent_rx(void *devt, WMI_SNR_THRESHOLD_VAL newThreshold, u8 snr)
{
WMI_SNR_THRESHOLD_EVENT event;
event.range = newThreshold;
event.snr = snr;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 68,988,269,157,210,020,000,000,000,000,000,000,000 | 7 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
int dtls1_send_certificate_request(SSL *s)
{
unsigned char *p,*d;
int i,j,nl,off,n;
STACK_OF(X509_NAME) *sk=NULL;
X509_NAME *name;
BUF_MEM *buf;
unsigned int msg_len;
if (s->state == SSL3_ST_SW_CERT_REQ_A)
{
buf=s->init_buf;
d=p=(unsigned char *)&(buf->data[DTLS1_HM_HEADER_LENGTH]);
/* get the list o... | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 309,040,037,421,919,840,000,000,000,000,000,000,000 | 100 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
struct iov_iter *i)
{
size_t skip, copy, left, wanted;
const struct iovec *iov;
char __user *buf;
void *kaddr, *from;
if (unlikely(bytes > i->count))
bytes = i->count;
if (unlikely(!bytes))
return 0;
wanted = bytes;
iov = i->iov... | 0 | [
"CWE-17"
] | linux | f0d1bec9d58d4c038d0ac958c9af82be6eb18045 | 20,790,518,107,490,206,000,000,000,000,000,000,000 | 76 | new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static void Ins_MPPEM( INS_ARG )
{
args[0] = CURRENT_Ppem();
DBG_PRINT1(" %d", args[0]);
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 219,469,385,071,768,800,000,000,000,000,000,000,000 | 5 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index)
{
struct hid_device *hid = hidpp->hid_dev;
struct hid_input *hidinput;
struct input_dev *dev;
const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor);
const u16 bcdDevice = le16_to_cpu(udesc->bcdDevice);
struct ff_device... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 93,989,503,991,623,590,000,000,000,000,000,000,000 | 124 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
nl80211_check_scan_flags(struct wiphy *wiphy, struct wireless_dev *wdev,
void *request, struct nlattr **attrs,
bool is_sched_scan)
{
u8 *mac_addr, *mac_addr_mask;
u32 *flags;
enum nl80211_feature_flags randomness_flag;
if (!attrs[NL80211_ATTR_SCAN_FLAGS])
return 0;
if (is_sched_scan) {
struct cfg8021... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 122,128,424,951,755,970,000,000,000,000,000,000,000 | 76 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
{
static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
static int max[9]={99, 99,12,31,23,59,59,12,59};
char *a;
int n,i,l,o;
if (d->type != V_ASN1_GENERALIZEDTIME) return(0);
l=d->length;
a=(char *)d->data;
o=0;
/* GENERALIZEDTIME is similar to UTCTIME exce... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 296,713,766,751,582,570,000,000,000,000,000,000,000 | 70 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
const xmlChar *name, const xmlChar *nsName,
xmlNodePtr node ATTRIBUTE_UNUSED)
{
xmlSchemaNotationPtr ret = NULL;
if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
return (NULL);
ret = (xmlSch... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 78,501,450,491,692,570,000,000,000,000,000,000,000 | 23 | 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. |
ImportForeignSchema(ImportForeignSchemaStmt *stmt)
{
ForeignServer *server;
ForeignDataWrapper *fdw;
FdwRoutine *fdw_routine;
AclResult aclresult;
List *cmd_list;
ListCell *lc;
/* Check that the foreign server exists and that we have USAGE on it */
server = GetForeignServerByName(stmt->server_name, false)... | 0 | [
"CWE-94"
] | postgres | 7e92f78abe80e4b30e648a40073abb59057e21f8 | 309,752,700,105,576,800,000,000,000,000,000,000,000 | 112 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
QString BootDoctor::errorString()
{
return m_lastErrorString;
} | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 22,279,092,150,906,720,000,000,000,000,000,000,000 | 4 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
R_API void r_bin_java_print_deprecated_attr_summary(RBinJavaAttrInfo *attr) {
if (!attr) {
eprintf ("Attempting to print an invalid RBinJavaAttrInfo *Deperecated.\n");
return;
}
Eprintf ("Deperecated Attribute Information:\n");
Eprintf (" Attribute Offset: 0x%08"PFMT64x "\n", attr->file_offset);
Eprintf (" A... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 27,248,100,970,060,350,000,000,000,000,000,000,000 | 10 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
DEFUN (neighbor_route_map,
neighbor_route_map_cmd,
NEIGHBOR_CMD2 "route-map WORD (in|out|import|export)",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Apply route map to neighbor\n"
"Name of route map\n"
"Apply map to incoming routes\n"
"Apply map to outbound routes\n"
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 45,349,906,574,806,240,000,000,000,000,000,000,000 | 15 | [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... |
void HGraphBuilder::VisitVariableDeclaration(VariableDeclaration* declaration) {
VariableProxy* proxy = declaration->proxy();
VariableMode mode = declaration->mode();
Variable* variable = proxy->var();
bool hole_init = mode == CONST || mode == CONST_HARMONY || mode == LET;
switch (variable->location()) {
... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 100,814,577,219,566,790,000,000,000,000,000,000,000 | 33 | 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... |
SimpleType(int value) : value_(value) {} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 177,237,793,347,267,570,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
ExprResolveIntegerLookup(struct xkb_context *ctx, const ExprDef *expr,
int *val_rtrn, IdentLookupFunc lookup,
const void *lookupPriv)
{
bool ok = false;
int l, r;
unsigned u;
ExprDef *left, *right;
switch (expr->expr.op) {
case EXPR_VALUE:
... | 0 | [
"CWE-400",
"CWE-703"
] | libxkbcommon | 1f9d1248c07cda8aaff762429c0dce146de8632a | 253,310,557,177,217,670,000,000,000,000,000,000,000 | 104 | xkbcomp: fix stack overflow when evaluating boolean negation
The expression evaluator would go into an infinite recursion when
evaluating something like this as a boolean: `!True`. Instead of
recursing to just `True` and negating, it recursed to `!True` itself
again.
Bug inherited from xkbcomp.
Caught with the afl f... |
icalparameter_get_scheduleforcesend(icalparameter *param)
{
const char *force = NULL;
if (param) force = icalparameter_get_iana_value(param);
if (!force) return ICAL_SCHEDULEFORCESEND_NONE;
else if (!strcmp(force, "REQUEST")) return ICAL_SCHEDULEFORCESEND_REQUEST;
else if (!strcmp(force, "REPLY"))... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 137,036,006,753,191,250,000,000,000,000,000,000,000 | 11 | HTTP: don't overrun buffer when parsing strings with sscanf() |
int credssp_skip_nego_tokens(int length)
{
length = credssp_skip_nego_token(length);
length += der_skip_sequence_tag(length);
length += der_skip_sequence_tag(length);
length += der_skip_contextual_tag(length);
return length;
} | 1 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 37,915,610,063,974,290,000,000,000,000,000,000,000 | 8 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
void PlayerGeneric::reset()
{
if (player)
player->reset();
} | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 249,781,337,552,165,440,000,000,000,000,000,000,000 | 5 | Fix use-after-free in PlayerGeneric destructor |
int main(int argc, char *argv[])
{
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
struct lo_data lo = {
.sandbox = SANDBOX_NAMESPACE,
.debug = 0,
.writeback = 0,
.posix_lock = 0,
.allow_direct_io = 0,
... | 1 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 273,197,615,695,422,330,000,000,000,000,000,000,000 | 155 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
const wchar_t *c_str() const { return &buffer_[0]; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 137,348,346,475,255,280,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
CImg<T>& operator^=(const CImg<t>& img) {
const ulongT siz = size(), isiz = img.size();
if (siz && isiz) {
if (is_overlapped(img)) return *this^=+img;
T *ptrd = _data, *const ptre = _data + siz;
if (siz>isiz) for (ulongT n = siz/isiz; n; --n)
for (const t *ptrs = img._d... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 212,728,144,936,720,580,000,000,000,000,000,000,000 | 12 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
Bool gf_ac3_parser_bs(GF_BitStream *bs, GF_AC3Config *hdr, Bool full_parse)
{
u32 fscod, frmsizecod, bsid, ac3_mod, freq, framesize, bsmod, syncword;
u64 pos;
if (!hdr || (gf_bs_available(bs) < 6)) return GF_FALSE;
if (!AC3_FindSyncCodeBS(bs)) return GF_FALSE;
pos = gf_bs_get_position(bs);
syncword = gf_bs_read... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 129,903,573,226,635,300,000,000,000,000,000,000,000 | 76 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
xfs_vn_fiemap(
struct inode *inode,
struct fiemap_extent_info *fieinfo,
u64 start,
u64 length)
{
int error;
xfs_ilock(XFS_I(inode), XFS_IOLOCK_SHARED);
if (fieinfo->fi_flags & FIEMAP_FLAG_XATTR) {
fieinfo->fi_flags &= ~FIEMAP_FLAG_XATTR;
error = iomap_fiemap(inode, fieinfo, start, length,
&xfs_xa... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 1fb254aa983bf190cfd685d40c64a480a9bafaee | 94,093,928,270,206,100,000,000,000,000,000,000,000 | 21 | xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT
Benjamin Moody reported to Debian that XFS partially wedges when a chgrp
fails on account of being out of disk quota. I ran his reproducer
script:
# adduser dummy
# adduser dummy plugdev
# dd if=/dev/zero bs=1M count=100 of=test.img
# mkfs.x... |
rdp_in_present(STREAM s, uint32 * present, uint8 flags, int size)
{
uint8 bits;
int i;
if (flags & RDP_ORDER_SMALL)
{
size--;
}
if (flags & RDP_ORDER_TINY)
{
if (size < 2)
size = 0;
else
size -= 2;
}
*present = 0;
for (i = 0; i < size; i++)
{
in_uint8(s, bits);
*present |= bits << (i * 8);... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 238,514,227,987,032,530,000,000,000,000,000,000,000 | 25 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len)
{
SCTP_ASSERT(asoc->rwnd, "rwnd zero", return);
SCTP_ASSERT(!asoc->rwnd_over, "rwnd_over not zero", return);
if (asoc->rwnd >= len) {
asoc->rwnd -= len;
} else {
asoc->rwnd_over = len - asoc->rwnd;
asoc->rwnd = 0;
}
SCTP_DEBUG_PRINTK... | 0 | [
"CWE-287"
] | linux-2.6 | add52379dde2e5300e2d574b172e62c6cf43b3d3 | 130,474,674,467,046,100,000,000,000,000,000,000,000 | 14 | sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
If INIT-ACK is received with SupportedExtensions parameter which
indicates that the peer does not support AUTH, the packet will be
silently ignore, and sctp_process_init() do cleanup all of the
transports in the association.
When T1-Init timer is ex... |
p11_rpc_message_write_byte_array (p11_rpc_message *msg,
CK_BYTE_PTR arr,
CK_ULONG num)
{
assert (msg != NULL);
assert (msg->output != NULL);
/* Make sure this is in the right order */
assert (!msg->signature || p11_rpc_message_verify_part (msg, "a... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 157,070,293,501,600,890,000,000,000,000,000,000,000 | 21 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
static size_t php_bz2iop_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
{
struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *) stream->abstract;
return BZ2_bzwrite(self->bz_file, (char*)buf, count);
} | 1 | [
"CWE-787"
] | php-src | f3feddb5b45b5abd93abb1a95044b7e099d51c84 | 116,499,610,595,244,400,000,000,000,000,000,000,000 | 6 | Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t |
static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
{
unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
return &net->dev_name_head[hash_32(hash, NETDEV_HASHBITS)];
} | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 47,219,496,006,753,560,000,000,000,000,000,000,000 | 5 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
phar_entry_data *phar_get_or_create_entry_data(char *fname, int fname_len, char *path, int path_len, const char *mode, char allow_dir, char **error, int security) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry, etemp;
phar_entry_data *ret;
const char *pcr_error;
char is_dir;
#ifdef PHP_WIN32
phar_un... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 0bfb970f43acd1e81d11be1154805f86655f15d5 | 87,388,942,352,609,700,000,000,000,000,000,000,000 | 109 | Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
(cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2) |
_PyBytes_Format(PyObject *format, PyObject *args)
{
char *fmt, *res;
Py_ssize_t arglen, argidx;
Py_ssize_t reslen, rescnt, fmtcnt;
int args_owned = 0;
PyObject *result;
PyObject *dict = NULL;
if (format == NULL || !PyBytes_Check(format) || args == NULL) {
PyErr_BadInternalCall();
... | 0 | [
"CWE-190"
] | cpython | fd8614c5c5466a14a945db5b059c10c0fb8f76d9 | 319,799,299,301,951,540,000,000,000,000,000,000,000 | 378 | bpo-30657: Fix CVE-2017-1000158 (#4664)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
static inline int ext2_feature_set_ok(struct super_block *sb)
{
if (ext4_has_unknown_ext2_incompat_features(sb))
return 0;
if (sb->s_flags & MS_RDONLY)
return 1;
if (ext4_has_unknown_ext2_ro_compat_features(sb))
return 0;
return 1;
} | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 161,936,403,942,807,780,000,000,000,000,000,000,000 | 10 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static void prplcb_xfer_new(PurpleXfer *xfer)
{
purple_xfer_ref(xfer);
if (purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE) {
struct prpl_xfer_data *px = g_new0(struct prpl_xfer_data, 1);
struct purple_data *pd;
xfer->ui_data = px;
px->xfer = xfer;
px->fn = mktemp(g_strdup("/tmp/bitlbee-purple-ft.XXXXXX... | 0 | [
"CWE-476"
] | bitlbee | 30d598ce7cd3f136ee9d7097f39fa9818a272441 | 86,910,376,670,767,750,000,000,000,000,000,000,000 | 32 | purple: Fix crash on ft requests from unknown contacts
Followup to 701ab81 (included in 3.5) which was a partial fix which only
improved things for non-libpurple file transfers (that is, just jabber) |
static void whereTraceIndexInfoOutputs(sqlite3_index_info *p){
int i;
if( !sqlite3WhereTrace ) return;
for(i=0; i<p->nConstraint; i++){
sqlite3DebugPrintf(" usage[%d]: argvIdx=%d omit=%d\n",
i,
p->aConstraintUsage[i].argvIndex,
p->aConstraintUsage[i].omit);
}
sqlite3DebugPrintf(" id... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 133,254,646,765,624,000,000,000,000,000,000,000,000 | 15 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
xt_unregister_target(struct xt_target *target)
{
u_int8_t af = target->family;
mutex_lock(&xt[af].mutex);
list_del(&target->list);
mutex_unlock(&xt[af].mutex);
} | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 54,206,259,681,212,275,000,000,000,000,000,000,000 | 8 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen)
{
unsigned int i, j, k;
ExifShort v_short, v_short2, v_short3, v_short4;
ExifByte v_byte;
ExifRational v_rat;
ExifSRational v_srat;
char b[64];
const char *c;
ExifByteOrder o;
double d;
ExifEntry *entry;
static const struct {
char label[5]... | 1 | [
"CWE-125"
] | libexif | f9bb9f263fb00f0603ecbefa8957cad24168cbff | 70,773,760,791,743,060,000,000,000,000,000,000,000 | 567 | Fix a buffer read overflow in exif_entry_get_value
While parsing EXIF_TAG_FOCAL_LENGTH it was possible to read 8 bytes past
the end of a heap buffer. This was detected by the OSS Fuzz project.
Patch from Google.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7344 and
https://bugs.chromium.org/p/oss-fuzz/... |
static CURLcode hsts_create(struct hsts *h,
const char *hostname,
bool subdomains,
curl_off_t expires)
{
struct stsentry *sts = hsts_entry();
if(!sts)
return CURLE_OUT_OF_MEMORY;
sts->expires = expires;
sts->includeSubDomai... | 1 | [] | curl | fae6fea209a2d4db1582f608bd8cc8000721733a | 144,056,209,454,510,480,000,000,000,000,000,000,000 | 19 | hsts: ignore trailing dots when comparing hosts names
CVE-2022-30115
Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-30115.html
Closes #8821 |
Item_func_sp::execute()
{
THD *thd= current_thd;
/* Execute function and store the return value in the field. */
if (execute_impl(thd))
{
null_value= 1;
context->process_error(thd);
if (thd->killed)
thd->send_kill_message();
return TRUE;
}
/* Check that the field (the value) is no... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 255,926,387,406,045,280,000,000,000,000,000,000,000 | 21 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm,
struct cmsghdr *cmsg)
{
if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_get_mr_args)) ||
rm->m_rdma_cookie != 0)
return -EINVAL;
return __rds_rdma_map(rs, CMSG_DATA(cmsg), &rm->m_rdma_cookie, &rm->rdma.op_rdma_mr);
} | 0 | [
"CWE-476"
] | linux | f3069c6d33f6ae63a1668737bc78aaaa51bff7ca | 37,690,372,706,381,837,000,000,000,000,000,000,000 | 9 | rds: Fix NULL pointer dereference in __rds_rdma_map
This is a fix for syzkaller719569, where memory registration was
attempted without any underlying transport being loaded.
Analysis of the case reveals that it is the setsockopt() RDS_GET_MR
(2) and RDS_GET_MR_FOR_DEST (7) that are vulnerable.
Here is an example sta... |
rdpsnd_record(const void *data, unsigned int size)
{
UNUSED(data);
UNUSED(size);
/* TODO: Send audio over RDP */
} | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 178,296,100,955,331,700,000,000,000,000,000,000,000 | 6 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static void gf_dump_vrml_sffield(GF_SceneDumper *sdump, u32 type, void *ptr, Bool is_mf, GF_Node *node)
{
switch (type) {
case GF_SG_VRML_SFBOOL:
gf_fprintf(sdump->trace, "%s", * ((SFBool *)ptr) ? "true" : "false");
break;
case GF_SG_VRML_SFINT32:
gf_fprintf(sdump->trace, "%d", * ((SFInt32 *)ptr) );
break;
... | 1 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 114,456,725,983,268,400,000,000,000,000,000,000,000 | 218 | fixed #2138 |
Opal::Call::Call (OpalManager& _manager,
Ekiga::ServiceCore& _core,
const std::string& uri)
: OpalCall (_manager), Ekiga::Call (), core (_core), remote_uri (uri),
call_setup(false), jitter(0), outgoing(false)
{
notification_core = core.get<Ekiga::NotificationCore> ("notification-core");
re_a_bytes = t... | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 102,566,384,418,300,280,000,000,000,000,000,000,000 | 22 | Validate UTF-8 strings before showing them
Closes bug #653009. |
void LinkResolver::resolve_special_call(CallInfo& result, Handle recv, KlassHandle resolved_klass, Symbol* method_name,
Symbol* method_signature, KlassHandle current_klass, bool check_access, TRAPS) {
methodHandle resolved_method;
linktime_resolve_special_method(resolved_meth... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 67,281,724,274,670,750,000,000,000,000,000,000,000 | 6 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
_rpc_terminate_job(slurm_msg_t *msg)
{
bool have_spank = false;
int rc = SLURM_SUCCESS;
kill_job_msg_t *req = msg->data;
uid_t uid = g_slurm_auth_get_uid(msg->auth_cred,
conf->auth_info);
int nsteps = 0;
int delay;
// slurm_ctl_conf_t *cf;
// struct stat s... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 198,074,592,824,996,740,000,000,000,000,000,000,000 | 234 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
nautilus_get_desktop_location (void)
{
char *desktop_directory;
GFile *res;
desktop_directory = get_desktop_path ();
res = g_file_new_for_path (desktop_directory);
g_free (desktop_directory);
return res;
} | 0 | [] | nautilus | a0f7bb5f2e9af8ecb463b13da834fa8559b0a481 | 282,627,522,305,824,900,000,000,000,000,000,000,000 | 11 | Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop
2009-02-25 Alexander Larsson <alexl@redhat.com>
* src/nautilus-application.c:
Use $XDG_DATA_HOME/.converted-launchers as marker for
one-time desktop file trust operation.
* libnautilus-private/nautilus-file-utilities.[ch]:
Ad... |
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
Cluster* cluster) {
if (!writer || !frame || !frame->IsValid() || !cluster ||
!cluster->timecode_scale())
return 0;
// Technically the timecode for a block can be less than the
// timecode for the cluster itself (rememb... | 1 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 22,051,936,069,538,505,000,000,000,000,000,000,000 | 20 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
void ip6t_unregister_table_exit(struct net *net, struct xt_table *table)
{
__ip6t_unregister_table(net, table);
} | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 277,744,018,014,508,860,000,000,000,000,000,000,000 | 4 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
static void atrtr_device_down(struct net_device *dev)
{
struct atalk_route **r = &atalk_routes;
struct atalk_route *tmp;
write_lock_bh(&atalk_routes_lock);
while ((tmp = *r) != NULL) {
if (tmp->dev == dev) {
*r = tmp->next;
dev_put(dev);
kfree(tmp);
} else
r = &tmp->next;
}
write_unlock_bh(&atalk... | 0 | [
"CWE-200"
] | linux-2.6 | 3d392475c873c10c10d6d96b94d092a34ebd4791 | 179,616,784,848,502,780,000,000,000,000,000,000,000 | 19 | appletalk: fix atalk_getname() leak
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
gdImageStringUp16 (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned short *s, int color)
{
int i;
int l;
l = strlen16 (s);
for (i = 0; (i < l); i++)
{
gdImageCharUp (im, f, x, y, s[i], color);
y -= f->w;
}
} | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 209,365,412,363,571,730,000,000,000,000,000,000,000 | 12 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
mem_log_init(const char* prog_name, const char *banner)
{
size_t log_name_len;
char *log_name;
if (__test_bit(LOG_CONSOLE_BIT, &debug)) {
log_op = stderr;
return;
}
if (log_op)
fclose(log_op);
log_name_len = 5 + strlen(prog_name) + 5 + 7 + 4 + 1; /* "/tmp/" + prog_name + "_mem." + PID + ".log" + '\0" */
... | 1 | [
"CWE-200"
] | keepalived | ac8e2ef053de273ce7a0cf0cb611e599dca4b298 | 219,493,046,912,417,680,000,000,000,000,000,000,000 | 45 | When opening files for write, ensure files can only be read by root
Issue #1048 referred to CVE-2018-19046 regarding files used for
debugging purposes could potentially be read by non root users.
This commit ensures that such log files cannot be opened by non root
users.
Signed-off-by: Quentin Armitage <quentin@armi... |
void cpu_address_space_init(CPUState *cpu, int asidx,
const char *prefix, MemoryRegion *mr)
{
CPUAddressSpace *newas;
AddressSpace *as = g_new0(AddressSpace, 1);
char *as_name;
assert(mr);
as_name = g_strdup_printf("%s-%d", prefix, cpu->cpu_index);
address_space_init... | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 327,716,606,444,956,300,000,000,000,000,000,000,000 | 36 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
static int opout(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
st32 immediate = 0;
if (op->operands[0].reg == X86R_DX) {
if (op->operands[1].reg == X86R_AL && op->operands[1].type & OT_BYTE) {
data[l++] = 0xee;
return l;
}
if (op->operands[1].reg == X86R_AX && op->operands[1].type & OT_WORD) {
da... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | radare2 | 9b46d38dd3c4de6048a488b655c7319f845af185 | 296,822,891,280,942,700,000,000,000,000,000,000,000 | 38 | Fix #12372 and #12373 - Crash in x86 assembler (#12380)
0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL-
leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- |
dump_msg(RES* ssl, struct query_info* k, struct reply_info* d,
time_t now)
{
size_t i;
char* nm, *tp, *cl;
if(!k || !d) return 1;
if(d->ttl < now) return 1; /* expired */
nm = sldns_wire2str_dname(k->qname, k->qname_len);
tp = sldns_wire2str_type(k->qtype);
cl = sldns_wire2str_class(k->qclass);
if(!nm || !t... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 295,859,917,499,722,350,000,000,000,000,000,000,000 | 53 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)
{
int ok = 0;
EC_KEY *ret = NULL;
EC_PRIVATEKEY *priv_key = NULL;
if ((priv_key = EC_PRIVATEKEY_new()) == NULL) {
ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE);
return NULL;
}
if ((priv_key = d2i_EC_P... | 1 | [] | openssl | 1b4a8df38fc9ab3c089ca5765075ee53ec5bd66a | 243,622,393,339,458,360,000,000,000,000,000,000,000 | 88 | Fix a failure to NULL a pointer freed on error.
Inspired by BoringSSL commit 517073cd4b by Eric Roman <eroman@chromium.org>
CVE-2015-0209
Reviewed-by: Emilia Käsper <emilia@openssl.org> |
static void handle_rendition_args(struct rendition_info *info, const char *key,
int key_len, char **dest, int *dest_len)
{
if (!strncmp(key, "TYPE=", key_len)) {
*dest = info->type;
*dest_len = sizeof(info->type);
} else if (!strncmp(key, "URI=", key_... | 0 | [
"CWE-703"
] | FFmpeg | 7ba100d3e6e8b1e5d5342feb960a7f081d6e15af | 296,224,838,951,625,900,000,000,000,000,000,000,000 | 37 | avformat/hls: Fix DoS due to infinite loop
Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <... |
make_domain_list(char *domain_list)
{
char *p;
Str tmp;
TextList *domains = NULL;
p = domain_list;
tmp = Strnew_size(64);
while (*p) {
while (*p && IS_SPACE(*p))
p++;
Strclear(tmp);
while (*p && !IS_SPACE(*p) && *p != ',')
Strcat_char(tmp, *p++);
if (tmp->length > 0) {
if (do... | 0 | [
"CWE-119"
] | w3m | ba9d78faeba9024c3e8840579c3b0e959ae2cb0f | 233,828,837,163,975,150,000,000,000,000,000,000,000 | 26 | Prevent global-buffer-overflow in parseURL()
Bug-Debian: https://github.com/tats/w3m/issues/41 |
int ha_partition::copy_partitions(ulonglong * const copied,
ulonglong * const deleted)
{
uint reorg_part= 0;
int result= 0;
longlong func_value;
DBUG_ENTER("ha_partition::copy_partitions");
if (m_part_info->linear_hash_ind)
{
if (m_part_info->part_type == HASH_PARTITIO... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 85,721,475,913,345,760,000,000,000,000,000,000,000 | 70 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
set_number_default(char *name, long val)
{
int opt_idx;
opt_idx = findoption((char_u *)name);
if (opt_idx >= 0)
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)(long_i)val;
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 288,459,094,658,184,040,000,000,000,000,000,000,000 | 8 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. |
PHP_FUNCTION(cos)
{
double num;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &num) == FAILURE) {
return;
}
RETURN_DOUBLE(cos(num));
} | 0 | [] | php-src | 0d822f6df946764f3f0348b82efae2e1eaa83aa0 | 317,592,009,587,777,330,000,000,000,000,000,000,000 | 9 | Bug #71201 round() segfault on 64-bit builds |
ikev2_sub_print(netdissect_options *ndo,
struct isakmp *base,
u_char np, const struct isakmp_gen *ext, const u_char *ep,
uint32_t phase, uint32_t doi, uint32_t proto, int depth)
{
const u_char *cp;
int i;
struct isakmp_gen e;
cp = (const u_char *)ext;
while (np) {
ND_TCHECK(*ext);
UNALIGNED_MEMCPY(&e, e... | 0 | [
"CWE-125"
] | tcpdump | 396e94ff55a80d554b1fe46bf107db1e91008d6c | 266,261,554,131,937,900,000,000,000,000,000,000,000 | 39 | (for 4.9.3) CVE-2018-14469/ISAKMP: Add a missing bounds check
In ikev1_n_print() check bounds before trying to fetch the replay detection
status.
This fixes a buffer over-read discovered by Bhargava Shastry.
Add a test using the capture file supplied by the reporter(s). |
void fill_with_frame_segs(ES_list& L) const
{
fill_with_frame_segs(L, typename Is_extended_kernel<Extended_kernel>::value_type());
} | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 184,585,184,793,746,600,000,000,000,000,000,000,000 | 5 | Fix Nef_2 and Nef_S2 IO |
static void GetMinimumPixelList(PixelList *pixel_list,MagickPixelPacket *pixel)
{
register SkipList
*list;
register ssize_t
channel;
size_t
color,
minimum;
ssize_t
count;
unsigned short
channels[ListChannels];
/*
Find the minimum value for each of the color.
*/
for (chan... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 210,188,121,466,350,770,000,000,000,000,000,000,000 | 42 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
make_absent_engine(Node** node, int pre_save_right_id, Node* absent,
Node* step_one, int lower, int upper, int possessive,
int is_range_cutter, ScanEnv* env)
{
int r;
int i;
int id;
Node* x;
Node* ns[4];
for (i = 0; i < 4; i++) ns[i] = NULL_NODE;
ns[1] = absent;
n... | 0 | [
"CWE-125"
] | oniguruma | aa0188eaedc056dca8374ac03d0177429b495515 | 226,550,748,479,935,140,000,000,000,000,000,000,000 | 78 | fix #163: heap-buffer-overflow in gb18030_mbc_enc_len |
void get_merge_candidate_list(base_context* ctx,
const slice_segment_header* shdr,
de265_image* img,
int xC,int yC, int xP,int yP,
int nCS, int nPbW,int nPbH, int partIdx,
... | 0 | [
"CWE-787"
] | libde265 | 697aa4f7c774abd6374596e6707a6f4f54265355 | 337,910,298,325,595,700,000,000,000,000,000,000,000 | 26 | fix MC with HDR chroma, but SDR luma (#301) |
parser_new_tagged_template_literal (ecma_object_t **raw_strings_p) /**< [out] raw strings object */
{
ecma_object_t *template_obj_p = ecma_op_new_array_object (0);
*raw_strings_p = ecma_op_new_array_object (0);
ecma_extended_object_t *template_ext_obj_p = (ecma_extended_object_t *) template_obj_p;
ecma_extende... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 189,644,182,188,718,200,000,000,000,000,000,000,000 | 22 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static BlockDriverAIOCB *bdrv_aio_writev_em(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque)
{
return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1);
} | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 166,700,899,968,095,450,000,000,000,000,000,000,000 | 6 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
**/
CImg<T> get_shared_slices(const unsigned int z0, const unsigned int z1, const unsigned int c0=0) {
const unsigned int
beg = (unsigned int)offset(0,0,z0,c0),
end = (unsigned int)offset(0,0,z1,c0);
if (beg>end || beg>=size() || end>=size())
throw CImgArgumentException(_cimg... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 289,661,671,675,031,070,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
rad_demangle(struct rad_handle *h, const void *mangled, size_t mlen, u_char *demangled)
{
char R[LEN_AUTH];
const char *S;
int i, Ppos;
MD5_CTX Context;
u_char b[16], *C;
if ((mlen % 16 != 0) || (mlen > 128)) {
generr(h, "Cannot interpret mangled data of length %ld", (u_long)mlen);
return -1;
}
C = (u_ch... | 0 | [
"CWE-119",
"CWE-787"
] | php-radius | 13c149b051f82b709e8d7cc32111e84b49d57234 | 219,749,370,319,444,720,000,000,000,000,000,000,000 | 47 | Fix a security issue in radius_get_vendor_attr().
The underlying rad_get_vendor_attr() function assumed that it would always be
given valid VSA data. Indeed, the buffer length wasn't even passed in; the
assumption was that the length field within the VSA structure would be valid.
This could result in denial of servic... |
static struct tree *file_info(struct augeas *aug, const char *fname) {
char *path = NULL;
struct tree *result = NULL;
int r;
r = pathjoin(&path, 2, AUGEAS_META_FILES, fname);
ERR_NOMEM(r < 0, aug);
result = tree_fpath(aug, path);
ERR_BAIL(aug);
error:
free(path);
return result;
} | 0 | [] | augeas | f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26 | 94,114,469,031,485,480,000,000,000,000,000,000,000 | 14 | Fix umask handling when creating new files
* src/transform.c (transform_save): faulty umask arithmetic would cause
overly-open file modes when the umask contains "7", as the umask was
incorrectly subtracted from the target file mode
Fixes CVE-2013-6412, RHBZ#1034261 |
RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
Error **errp)
{
NetClientState *nc;
RxFilterInfoList *filter_list = NULL, *last_entry = NULL;
QTAILQ_FOREACH(nc, &net_clients, next) {
RxFilterInfoList *entry;
RxFilterInfo *info;
... | 0 | [
"CWE-190"
] | qemu | 25c01bd19d0e4b66f357618aeefda1ef7a41e21a | 61,398,799,823,393,690,000,000,000,000,000,000,000 | 57 | net: drop too large packet early
We try to detect and drop too large packet (>INT_MAX) in 1592a9947036
("net: ignore packet size greater than INT_MAX") during packet
delivering. Unfortunately, this is not sufficient as we may hit
another integer overflow when trying to queue such large packet in
qemu_net_queue_append_... |
remote_post_process(address_item *addr, int logflags, uschar *msg,
BOOL fallback)
{
host_item *h;
/* If any host addresses were found to be unusable, add them to the unusable
tree so that subsequent deliveries don't try them. */
for (h = addr->host_list; h; h = h->next)
if (h->address)
if (h->status >= hstatu... | 0 | [
"CWE-78"
] | exim | d740d2111f189760593a303124ff6b9b1f83453d | 202,056,780,660,647,880,000,000,000,000,000,000,000 | 61 | Fix CVE-2019-10149 |
cib_common_callback_worker(uint32_t id, uint32_t flags, xmlNode * op_request, cib_client_t * cib_client, gboolean privileged)
{
const char *op = crm_element_value(op_request, F_CIB_OPERATION);
if (crm_str_eq(op, CRM_OP_REGISTER, TRUE)) {
if(flags & crm_ipc_client_response) {
xmlNode *ack = ... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 139,950,743,554,024,700,000,000,000,000,000,000,000 | 52 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
static int selinux_setprocattr(struct task_struct *p,
char *name, void *value, size_t size)
{
struct task_security_struct *tsec;
struct cred *new;
u32 sid = 0, ptsid;
int error;
char *str = value;
if (current != p) {
/* SELinux only allows a process to change its own
security attributes. */
re... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 100,694,888,526,746,000,000,000,000,000,000,000,000 | 131 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
ec_p_init (mpi_ec_t ctx, enum gcry_mpi_ec_models model,
enum ecc_dialects dialect,
int flags,
gcry_mpi_t p, gcry_mpi_t a, gcry_mpi_t b)
{
int i;
static int use_barrett;
if (!use_barrett)
{
if (getenv ("GCRYPT_BARRETT"))
use_barrett = 1;
else
use_ba... | 0 | [
"CWE-200"
] | libgcrypt | bf76acbf0da6b0f245e491bec12c0f0a1b5be7c9 | 28,591,305,787,925,250,000,000,000,000,000,000,000 | 63 | ecc: Add input validation for X25519.
* cipher/ecc.c (ecc_decrypt_raw): Add input validation.
* mpi/ec.c (ec_p_init): Use scratch buffer for bad points.
(_gcry_mpi_ec_bad_point): New.
--
Following is the paper describing the attack:
May the Fourth Be With You: A Microarchitectural Side Channel Attack
on Rea... |
static int do_print_sigalgs(BIO *out, SSL *s, int shared)
{
int i, nsig, client;
client = SSL_is_server(s) ? 0 : 1;
if (shared)
nsig = SSL_get_shared_sigalgs(s, -1, NULL, NULL, NULL,
NULL, NULL);
else
nsig = SSL_get_sigalgs(s, -1, NULL, NULL, NULL, NULL, NULL);
if (nsig == 0)
return 1;
if (shared)
... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 225,259,623,931,522,800,000,000,000,000,000,000,000 | 49 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
int warn(const char *fmt, ...) {
static char buf[1024];
va_list args;
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
return(message(LOG_WARNING, buf));
} | 1 | [] | netmask | 29a9c239bd1008363f5b34ffd6c2cef906f3660c | 245,949,487,753,775,020,000,000,000,000,000,000,000 | 9 | bump version to 2.4.4
* remove checks for negative unsigned ints, fixes #2
* harden error logging functions, fixes #3 |
static INLINE BOOL update_read_2byte_unsigned(wStream* s, UINT32* value)
{
BYTE byte;
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
Stream_Read_UINT8(s, byte);
if (byte & 0x80)
{
if (Stream_GetRemainingLength(s) < 1)
return FALSE;
*value = (byte & 0x7F) << 8;
Stream_Read_UINT8(s, byte);
*val... | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 214,139,550,841,486,560,000,000,000,000,000,000,000 | 25 | Fixed #6013: Check new length is > 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.