func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
do_cmdline(
char_u *cmdline,
char_u *(*fgetline)(int, void *, int, getline_opt_T),
void *cookie, // argument for fgetline()
int flags)
{
char_u *next_cmdline; // next cmd to execute
char_u *cmdline_copy = NULL; // copy of cmd line
int used_getline = FALSE; // used "fgetline" to obtain co... | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 164,984,185,573,810,960,000,000,000,000,000,000,000 | 760 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
static int __copy_insn(struct address_space *mapping, struct file *filp,
void *insn, int nbytes, loff_t offset)
{
struct page *page;
/*
* Ensure that the page that has the original instruction is populated
* and in page-cache. If ->readpage == NULL it must be shmem_mapping(),
* see uprobe_register().
*/
i... | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 38,782,965,824,142,510,000,000,000,000,000,000,000 | 21 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
static void swizzle_io_read(RDyldCache *cache, RIO *io) {
if (!io || !io->desc || !io->desc->plugin) {
return;
}
RIOPlugin *plugin = io->desc->plugin;
cache->original_io_read = plugin->read;
plugin->read = &dyldcache_io_read;
} | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 19,374,063,061,070,073,000,000,000,000,000,000,000 | 9 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
longlong Item_null::val_datetime_packed()
{
null_value= true;
return 0;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 16,211,246,792,761,246,000,000,000,000,000,000,000 | 5 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
__u32 vtag, int ecn_capable)
{
struct sctp_chunk *chunk = NULL;
SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__,
packet, vtag);
packet->vtag = vtag;
if (ecn_capable && sctp_packet_empty(packet)) {
chunk = sctp_get_ecne_p... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 128,547,905,431,491,050,000,000,000,000,000,000,000 | 22 | 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.
... |
max3421_transfer_out(struct usb_hcd *hcd, struct urb *urb, int fast_retransmit)
{
struct spi_device *spi = to_spi_device(hcd->self.controller);
struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd);
int epnum = usb_pipeendpoint(urb->pipe);
u32 max_packet;
void *src;
src = urb->transfer_buffer + urb->actual_lengt... | 0 | [
"CWE-416"
] | linux | b5fdf5c6e6bee35837e160c00ac89327bdad031b | 153,716,226,318,282,250,000,000,000,000,000,000,000 | 40 | usb: max-3421: Prevent corruption of freed memory
The MAX-3421 USB driver remembers the state of the USB toggles for a
device/endpoint. To save SPI writes, this was only done when a new
device/endpoint was being used. Unfortunately, if the old device was
removed, this would cause writes to freed memory.
To fix this, ... |
static inline UBool instanceOfMeasure(const UObject* a) {
return dynamic_cast<const Measure*>(a) != NULL;
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 22,062,975,890,161,167,000,000,000,000,000,000,000 | 3 | ICU-20246 Fixing another integer overflow in number parsing. |
get_y_current(void)
{
return y_current;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | d25f003342aca9889067f2e839963dfeccf1fe05 | 89,411,024,154,969,400,000,000,000,000,000,000,000 | 4 | patch 9.0.0011: reading beyond the end of the line with put command
Problem: Reading beyond the end of the line with put command.
Solution: Adjust the end mark position. |
static int TS_TST_INFO_content_new(PKCS7 *p7)
{
PKCS7 *ret = NULL;
ASN1_OCTET_STRING *octet_string = NULL;
/* Create new encapsulated NID_id_smime_ct_TSTInfo content. */
if (!(ret = PKCS7_new())) goto err;
if (!(ret->d.other = ASN1_TYPE_new())) goto err;
ret->type = OBJ_nid2obj(NID_id_smime_ct_TSTInfo);
if (!(... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 248,371,865,548,702,540,000,000,000,000,000,000,000 | 22 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
bool ZrtpQueue::isParanoidMode() {
return enableParanoidMode;
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 162,696,896,555,890,440,000,000,000,000,000,000,000 | 3 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
MagickExport MagickBooleanType DeleteImageOption(ImageInfo *image_info,
const char *option)
{
assert(image_info != (ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filen... | 0 | [
"CWE-399"
] | ImageMagick | 6790815c75bdea0357df5564345847856e995d6b | 306,931,074,846,038,700,000,000,000,000,000,000,000 | 12 | Fixed memory leak in IsOptionMember. |
nautilus_file_list_call_when_ready (GList *file_list,
NautilusFileAttributes attributes,
NautilusFileListHandle **handle,
NautilusFileListCallback callback,
gpointer callback_data)
{
GList *l;
FileListReadyData *data;
NautilusFile *file;
g_return_if_fail (file_list != NULL);
data... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 82,610,546,782,035,920,000,000,000,000,000,000,000 | 31 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *len, int peer)
{
struct sockaddr_rc *sa = (struct sockaddr_rc *) addr;
struct sock *sk = sock->sk;
BT_DBG("sock %p, sk %p", sock, sk);
sa->rc_family = AF_BLUETOOTH;
sa->rc_channel = rfcomm_pi(sk)->channel;
if (peer)
bacpy(&sa->rc... | 1 | [
"CWE-200"
] | linux | 9344a972961d1a6d2c04d9008b13617bcb6ec2ef | 45,354,779,554,130,560,000,000,000,000,000,000,000 | 17 | Bluetooth: RFCOMM - Fix info leak via getsockname()
The RFCOMM code fails to initialize the trailing padding byte of struct
sockaddr_rc added for alignment. It that for leaks one byte kernel stack
via the getsockname() syscall. Add an explicit memset(0) before filling
the structure to avoid the info leak.
Signed-off-... |
int rand_drbg_unlock(RAND_DRBG *drbg)
{
if (drbg->lock != NULL)
return CRYPTO_THREAD_unlock(drbg->lock);
return 1;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 110,803,343,942,506,340,000,000,000,000,000,000,000 | 7 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
int udp_disconnect(struct sock *sk, int flags)
{
struct inet_sock *inet = inet_sk(sk);
/*
* 1003.1g - break association.
*/
sk->sk_state = TCP_CLOSE;
inet->inet_daddr = 0;
inet->inet_dport = 0;
sock_rps_save_rxhash(sk, 0);
sk->sk_bound_dev_if = 0;
if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK))
inet_reset_... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 263,318,696,200,097,230,000,000,000,000,000,000,000 | 22 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
zxcheck(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
check_op(1);
make_bool(op, (r_has_attr(ACCESS_REF(op), a_executable) ? 1 : 0));
return 0;
} | 0 | [] | ghostpdl | 0edd3d6c634a577db261615a9dc2719bca7f6e01 | 332,088,424,848,887,440,000,000,000,000,000,000,000 | 8 | Bug 699659: Don't just assume an object is a t_(a)struct |
Prompt& PamData::findPrompt(const struct pam_message* msg) {
AuthPrompt::Type type = detectPrompt(msg);
for (Prompt &p : m_currentRequest.prompts) {
if (type == AuthPrompt::UNKNOWN && QString::fromLocal8Bit(msg->msg) == p.message)
return p;
if (type == p.type... | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 291,773,568,826,639,670,000,000,000,000,000,000,000 | 12 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
vmxnet3_revert_rxc_descr(VMXNET3State *s, int qidx)
{
vmxnet3_dec_rx_completion_counter(s, qidx);
} | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 161,575,260,915,916,870,000,000,000,000,000,000,000 | 4 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s)
{
bool page_aligned = false;
unsigned int begin;
const uint16_t block_size = s->blksize & BLOCK_SIZE_MASK;
uint32_t boundary_chk = 1 << (((s->blksize & ~BLOCK_SIZE_MASK) >> 12) + 12);
uint32_t boundary_count = boundary_chk - (s->sdmasysad %... | 0 | [
"CWE-119"
] | qemu | dfba99f17feb6d4a129da19d38df1bcd8579d1c3 | 291,301,677,380,284,960,000,000,000,000,000,000,000 | 85 | hw/sd/sdhci: Fix DMA Transfer Block Size field
The 'Transfer Block Size' field is 12-bit wide.
See section '2.2.2. Block Size Register (Offset 004h)' in datasheet.
Two different bug reproducer available:
- https://bugs.launchpad.net/qemu/+bug/1892960
- https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc... |
static int PKCS7_type_is_other(PKCS7 *p7)
{
int isOther = 1;
int nid = OBJ_obj2nid(p7->type);
switch (nid) {
case NID_pkcs7_data:
case NID_pkcs7_signed:
case NID_pkcs7_enveloped:
case NID_pkcs7_signedAndEnveloped:
case NID_pkcs7_digest:
case NID_pkcs7_encrypted:
isOther = 0... | 0 | [] | openssl | c0334c2c92dd1bc3ad8138ba6e74006c3631b0f9 | 94,978,571,743,130,300,000,000,000,000,000,000,000 | 22 | PKCS#7: avoid NULL pointer dereferences with missing content
In PKCS#7, the ASN.1 content component is optional.
This typically applies to inner content (detached signatures),
however we must also handle unexpected missing outer content
correctly.
This patch only addresses functions reachable from parsing,
decryption... |
static int wolfSSH_SFTP_RecvRealPath(WOLFSSH* ssh, int reqId, byte* data,
int maxSz)
{
WS_SFTP_FILEATRB atr;
char r[WOLFSSH_MAX_FILENAME];
word32 rSz;
word32 lidx = 0;
word32 i;
int ret;
byte* out;
word32 outSz = 0;
WLOG(WS_LOG_SFTP, "Receiving WOLFSSH_FTP_REALPATH");
... | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 114,798,905,563,734,080,000,000,000,000,000,000,000 | 126 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
PHP_FUNCTION(filter_id)
{
int i, filter_len;
int size = sizeof(filter_list) / sizeof(filter_list_entry);
char *filter;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filter, &filter_len) == FAILURE) {
return;
}
for (i = 0; i < size; ++i) {
if (strcmp(filter_list[i].name, filter) == 0) {
RETUR... | 0 | [
"CWE-190"
] | php-src | a5b5743d71fbd5ae944469a1ca443a1cdb30663a | 241,200,260,415,494,350,000,000,000,000,000,000,000 | 18 | full_special_chars filter from trunk - approved by johannes |
static void change_curseg(struct f2fs_sb_info *sbi, int type, bool reuse)
{
struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
struct curseg_info *curseg = CURSEG_I(sbi, type);
unsigned int new_segno = curseg->next_segno;
struct f2fs_summary_block *sum_node;
struct page *sum_page;
write_sum_page(sbi, curseg->sum... | 0 | [
"CWE-200",
"CWE-476"
] | linux | d4fdf8ba0e5808ba9ad6b44337783bd9935e0982 | 302,004,675,520,304,850,000,000,000,000,000,000,000 | 28 | f2fs: fix a panic caused by NULL flush_cmd_control
Mount fs with option noflush_merge, boot failed for illegal address
fcc in function f2fs_issue_flush:
if (!test_opt(sbi, FLUSH_MERGE)) {
ret = submit_flush_wait(sbi);
atomic_inc(&fcc->issued_flush); -> Here, fcc illegal
... |
deprecated_command (const char *name)
{
log_info(_("WARNING: \"%s\" is a deprecated command - do not use it\n"),
name);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 100,397,037,120,914,060,000,000,000,000,000,000,000 | 5 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
ByteVector::Iterator ByteVector::end()
{
return d->data.end();
} | 0 | [
"CWE-189"
] | taglib | dcdf4fd954e3213c355746fa15b7480461972308 | 163,057,638,470,106,620,000,000,000,000,000,000,000 | 4 | Avoid uint overflow in case the length + index is over UINT_MAX |
Network::FilterStatus Context::onUpstreamData(int data_length, bool end_of_stream) {
if (!in_vm_context_created_ || !wasm_->onUpstreamData_) {
return Network::FilterStatus::Continue;
}
auto result = wasm_->onUpstreamData_(this, id_, static_cast<uint32_t>(data_length),
st... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 187,375,367,945,449,970,000,000,000,000,000,000,000 | 9 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static void *pvrdma_map_to_pdir(PCIDevice *pdev, uint64_t pdir_dma,
uint32_t nchunks, size_t length)
{
uint64_t *dir, *tbl;
int tbl_idx, dir_idx, addr_idx;
void *host_virt = NULL, *curr_page;
if (!nchunks) {
rdma_error_report("Got nchunks=0");
return NULL... | 1 | [
"CWE-787"
] | qemu | 284f191b4abad213aed04cb0458e1600fd18d7c4 | 334,074,804,490,448,700,000,000,000,000,000,000,000 | 90 | hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582)
Ensure mremap boundaries not trusting the guest kernel to
pass the correct buffer length.
Fixes: CVE-2021-3582
Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com>
Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com>
Signed-off-by: Mar... |
static void app_inbytes_progress(pn_transport_t *transport, size_t minimum)
{
pni_ssl_t *ssl = transport->ssl;
// Make more decrypted data available, if possible. Otherwise, move
// unread bytes to front of inbuf2 to make room for next bulk decryption.
// SSL may have chopped up data that app layer expects to ... | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 33,612,965,044,424,880,000,000,000,000,000,000,000 | 55 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
ast_for_async_stmt(struct compiling *c, const node *n)
{
/* async_stmt: 'async' (funcdef | with_stmt | for_stmt) */
REQ(n, async_stmt);
REQ(CHILD(n, 0), NAME);
assert(strcmp(STR(CHILD(n, 0)), "async") == 0);
switch (TYPE(CHILD(n, 1))) {
case funcdef:
return ast_for_funcdef_impl(... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 333,949,764,001,919,630,000,000,000,000,000,000,000 | 26 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
void *Type_MPEclut_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
{
cmsStage* mpe = NULL;
cmsUInt16Number InputChans, OutputChans;
cmsUInt8Number Dimensions8[16];
cmsUInt32Number i, nMaxGrids, GridPoints[MAX_INPUT_DIMENSIONS];
_cmsSta... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 141,168,831,747,630,560,000,000,000,000,000,000,000 | 42 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
void Greeter::stop() {
// check flag
if (!m_started)
return;
// log message
qDebug() << "Greeter stopping...";
if (daemonApp->testing()) {
// terminate process
m_process->terminate();
// wait for finished
if (!m_p... | 0 | [
"CWE-284",
"CWE-264"
] | sddm | 4cfed6b0a625593fb43876f04badc4dd99799d86 | 71,249,888,967,030,350,000,000,000,000,000,000,000 | 17 | Disable greeters from loading KDE's debug hander
Some themes may use KDE components which will automatically load KDE's
crash handler.
If the greeter were to then somehow crash, that would leave a crash
handler allowing other actions, albeit as the locked down SDDM user.
Only SDDM users using the breeze theme from p... |
static struct tcp_md5sig_key *tcp_v6_reqsk_md5_lookup(struct sock *sk,
struct request_sock *req)
{
return tcp_v6_md5_do_lookup(sk, &inet6_rsk(req)->rmt_addr);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 46,894,972,018,742,965,000,000,000,000,000,000,000 | 5 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
GF_Box *gitn_box_new()
{
ISOM_DECL_BOX_ALLOC(GroupIdToNameBox, GF_ISOM_BOX_TYPE_GITN);
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 22,828,005,960,932,184,000,000,000,000,000,000,000 | 5 | fixed #1587 |
void* LibRaw:: calloc(size_t n,size_t t)
{
void *p = memmgr.calloc(n,t);
return p;
} | 0 | [
"CWE-399"
] | LibRaw | c14ae36d28e80139b2f31b5d9d7623db3b597a3a | 182,633,444,145,020,040,000,000,000,000,000,000,000 | 5 | fixed error handling for broken full-color images |
static void commit_tree(struct mount *mnt)
{
struct mount *parent = mnt->mnt_parent;
struct mount *m;
LIST_HEAD(head);
struct mnt_namespace *n = parent->mnt_ns;
BUG_ON(parent == mnt);
list_add_tail(&head, &mnt->mnt_list);
list_for_each_entry(m, &head, mnt_list)
m->mnt_ns = n;
list_splice(&head, n->list.pre... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 297,667,815,246,155,540,000,000,000,000,000,000,000 | 21 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
uint STDCALL mysql_errno(MYSQL *mysql)
{
return mysql ? mysql->net.last_errno : mysql_server_last_errno; | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 277,896,501,467,361,040,000,000,000,000,000,000,000 | 4 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static int nested_vmx_check_apicv_controls(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
if (!nested_cpu_has_virt_x2apic_mode(vmcs12) &&
!nested_cpu_has_apic_reg_virt(vmcs12) &&
!nested_cpu_has_vid(vmcs12) &&
!nested_cpu_has_posted_intr(vmcs12))
return 0;
/*
* If virtualize x2apic mode i... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 202,094,883,161,172,500,000,000,000,000,000,000,000 | 42 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
QPDFFormFieldObjectHelper::generateTextAppearance(
QPDFAnnotationObjectHelper& aoh)
{
QPDFObjectHandle AS = aoh.getAppearanceStream("/N");
if (AS.isNull())
{
QTC::TC("qpdf", "QPDFFormFieldObjectHelper create AS from scratch");
QPDFObjectHandle::Rectangle rect = aoh.getRect();
QPD... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 321,213,778,841,131,200,000,000,000,000,000,000,000 | 92 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
void test_nghttp2_session_pack_headers_with_padding(void) {
nghttp2_session *session, *sv_session;
accumulator acc;
my_user_data ud;
nghttp2_session_callbacks callbacks;
memset(&callbacks, 0, sizeof(callbacks));
callbacks.send_callback = accumulator_send_callback;
callbacks.on_frame_send_callback = on_fr... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 53,417,262,830,825,020,000,000,000,000,000,000,000 | 34 | Add nghttp2_option_set_max_outbound_ack |
long long round_down_sec(long long bytes)
{
return ((bytes % SECTOR_SIZE) ? (((bytes / SECTOR_SIZE)) * SECTOR_SIZE) : bytes);
} | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 305,498,973,504,912,570,000,000,000,000,000,000,000 | 4 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
format_LEARN(const struct ofpact_learn *a,
const struct ofpact_format_params *fp)
{
learn_format(a, fp->port_map, fp->table_map, fp->s);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 178,945,318,792,093,800,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz GC_ATTR_UNUSED,
const char *string, int linenum)
{
word * result = (word *)((oh *)p + 1);
GC_ASSERT(GC_size(p) >= sizeof(oh) + sz);
GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz)));
# ifdef KEEP_BACK_PTRS
... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 92,256,614,014,317,790,000,000,000,000,000,000,000 | 23 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
{
u_int len = length;
uint16_t flags, prot;
/* 16 bits ND_TCHECKed in gre_print() */
flags = EXTRACT_16BITS(bp);
if (ndo->ndo_vflag)
ND_PRINT((ndo, ", Flags [%s]",
bittok2str(gre_flag_values,"none",flags)));... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 220,033,876,619,900,140,000,000,000,000,000,000,000 | 126 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
static int no_open(struct inode *inode, struct file *file)
{
return -ENXIO;
} | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 304,689,247,519,746,400,000,000,000,000,000,000,000 | 4 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
//! Return the factorial of n
inline double factorial(const int n) {
if (n<0) return cimg::type<double>::nan();
if (n<2) return 1;
double res = 2;
for (int i = 3; i<=n; ++i) res*=i;
return res; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 331,591,955,797,229,300,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
inline T max(T a, T b)
{
const T a_larger = b - a; // negative if a is larger
return select(expand_top_bit(a), a, b);
} | 0 | [
"CWE-200"
] | botan | bcf13fa153a11b3e0ad54e2af6962441cea3adf1 | 128,633,561,606,808,110,000,000,000,000,000,000,000 | 5 | Fixes for CVE-2015-7827 and CVE-2016-2849 |
void intel_pmu_pebs_disable(struct perf_event *event)
{
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
struct hw_perf_event *hwc = &event->hw;
if (cpuc->n_pebs == cpuc->n_large_pebs &&
cpuc->n_pebs != cpuc->n_pebs_via_pt)
intel_pmu_drain_pebs_buffer();
cpuc->pebs_enabled &= ~(1ULL << hwc->idx);... | 0 | [
"CWE-755"
] | linux | d88d05a9e0b6d9356e97129d4ff9942d765f46ea | 255,820,684,251,003,570,000,000,000,000,000,000,000 | 24 | perf/x86/intel: Fix a crash caused by zero PEBS status
A repeatable crash can be triggered by the perf_fuzzer on some Haswell
system.
https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/
For some old CPUs (HSW and earlier), the PEBS status in a PEBS record
may be mistakenly set to 0. To minimiz... |
static uint8_t excluded_channels(bitfile *ld, drc_info *drc)
{
uint8_t i, n = 0;
uint8_t num_excl_chan = 7;
for (i = 0; i < 7; i++)
{
drc->exclude_mask[i] = faad_get1bit(ld
DEBUGVAR(1,103,"excluded_channels(): exclude_mask"));
}
n++;
while ((drc->additional_excluded_chn... | 1 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 161,374,649,706,340,650,000,000,000,000,000,000,000 | 26 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
static unsigned d_flags_for_inode(struct inode *inode)
{
unsigned add_flags = DCACHE_REGULAR_TYPE;
if (!inode)
return DCACHE_MISS_TYPE;
if (S_ISDIR(inode->i_mode)) {
add_flags = DCACHE_DIRECTORY_TYPE;
if (unlikely(!(inode->i_opflags & IOP_LOOKUP))) {
if (unlikely(!inode->i_op->lookup))
add_flags = DCA... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 271,981,231,331,327,560,000,000,000,000,000,000,000 | 34 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
__xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
xmlParserInputBufferPtr ret;
int i = 0;
void *context = NULL;
if (xmlInputCallbackInitialized == 0)
xmlRegisterDefaultInputCallbacks();
if (URI == NULL) return(NULL);
/*
* Try to find one of the input accept me... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 250,738,401,232,973,000,000,000,000,000,000,000,000 | 69 | 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. |
Input::readImageData(boost::shared_ptr<IOChannel> in, FileType type)
{
std::auto_ptr<GnashImage> im;
std::auto_ptr<Input> inChannel;
switch (type) {
#ifdef USE_PNG
case GNASH_FILETYPE_PNG:
inChannel = createPngInput(in);
break;
#endif
#ifdef USE_GIF
c... | 0 | [
"CWE-189"
] | gnash | bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 | 88,779,772,369,733,990,000,000,000,000,000,000,000 | 64 | Fix crash in GnashImage.cpp |
handle_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *property_name,
GError **er... | 0 | [] | at-spi2-core | c2e87fe00b596dba20c9d57d406ab8faa744b15a | 337,182,814,677,588,150,000,000,000,000,000,000,000 | 17 | Fix inverted logic.
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124 |
static void dump_pagetable(unsigned long address)
{
pgd_t *base = __va(read_cr3() & PHYSICAL_PAGE_MASK);
pgd_t *pgd = base + pgd_index(address);
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
if (bad_address(pgd))
goto bad;
printk("PGD %lx ", pgd_val(*pgd));
if (!pgd_present(*pgd))
goto out;
pud = pud_offset(pgd,... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 251,186,358,616,526,800,000,000,000,000,000,000,000 | 43 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
page_objects_sort(fz_context *ctx, page_objects *po)
{
int i, j;
int n = po->len;
/* Step 1: Make a heap */
/* Invariant: Valid heap in [0..i), unsorted elements in [i..n) */
for (i = 1; i < n; i++)
{
/* Now bubble backwards to maintain heap invariant */
j = i;
while (j != 0)
{
int tmp;
int k = (j-... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 13,810,362,733,035,538,000,000,000,000,000,000,000 | 58 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
static int hclge_tm_schd_mode_vnet_base_cfg(struct hclge_vport *vport)
{
struct hnae3_knic_private_info *kinfo = &vport->nic.kinfo;
struct hclge_dev *hdev = vport->back;
int ret;
u8 i;
ret = hclge_tm_pri_schd_mode_cfg(hdev, vport->vport_id);
if (ret)
return ret;
for (i = 0; i < kinfo->num_tc; i++) {
u8 sch... | 1 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 338,400,725,075,583,130,000,000,000,000,000,000,000 | 22 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
static int tcos_construct_fci(const sc_file_t *file,
u8 *out, size_t *outlen)
{
u8 *p = out;
u8 buf[64];
size_t n;
/* FIXME: possible buffer overflow */
*p++ = 0x6F; /* FCI */
p++;
/* File size */
buf[0] = (file->size >> 8) & 0xFF;
buf[1] = file->siz... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 178,475,258,370,357,300,000,000,000,000,000,000,000 | 91 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
get_data_block (GifContext *context,
unsigned char *buf,
gint *empty_block)
{
if (context->block_count == 0) {
if (!gif_read (context, &context->block_count, 1)) {
return -1;
}
}
if (context->block_count == 0)
if (empty_block) {
*empty_block = TRUE;
return 0;
}
if (!gif_read (context, buf, c... | 0 | [] | gdk-pixbuf | f8569bb13e2aa1584dde61ca545144750f7a7c98 | 324,821,776,867,187,350,000,000,000,000,000,000,000 | 23 | GIF: Don't return a partially initialized pixbuf structure
It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load()
routine did not properly handle certain return values from their subroutines.
A remote attacker could provide a specially-crafted GIF image, which once
opened in an application, linked ... |
MagickExport int CompareStringInfo(const StringInfo *target,
const StringInfo *source)
{
int
status;
assert(target != (StringInfo *) NULL);
assert(target->signature == MagickCoreSignature);
assert(source != (StringInfo *) NULL);
assert(source->signature == MagickCoreSignature);
status=memcmp(target->... | 0 | [
"CWE-190"
] | ImageMagick | be90a5395695f0d19479a5d46b06c678be7f7927 | 174,979,552,977,076,200,000,000,000,000,000,000,000 | 18 | https://github.com/ImageMagick/ImageMagick/issues/1721 |
MagickExport MagickBooleanType SyncImagesSettings(ImageInfo *image_info,
Image *images)
{
Image
*image;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(images != (Image *) NULL);
assert(images->signature == MagickCoreSignature);
if (images-... | 0 | [
"CWE-665"
] | ImageMagick6 | 27b1c74979ac473a430e266ff6c4b645664bc805 | 273,838,736,694,252,750,000,000,000,000,000,000,000 | 18 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
struct condition * compiler_concat_conditions(struct condition *a, u_int16 op, struct condition *b)
{
struct condition *head = a;
/* go to the last conditions in 'a' */
while(a->next != NULL)
a = a->next;
/* set the operation */
a->op = op;
/* contatenate the two block */
a->next = b... | 0 | [
"CWE-703",
"CWE-125"
] | ettercap | 626dc56686f15f2dda13c48f78c2a666cb6d8506 | 167,399,848,557,463,550,000,000,000,000,000,000,000 | 17 | Exit gracefully in case of corrupted filters (Closes issue #782) |
addCharacterClass(FileInfo *nested, const widechar *name, int length,
CharacterClass **characterClasses,
TranslationTableCharacterAttributes *characterClassAttribute) {
/* Define a character class, Whether predefined or user-defined */
CharacterClass *class;
if (*characterClassAttribute) {
if (!(class = malloc... | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 289,034,669,699,913,700,000,000,000,000,000,000,000 | 21 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
int print_embedded_options(PerlIO *stream, char ** options_list, int options_count)
{
int i;
for (i=0; i<options_count; i++)
{
if (options_list[i])
PerlIO_printf(stream,
"Embedded server, parameter[%d]=%s\n",
i, options_list[i]);
}
return 1;
} | 0 | [
"CWE-125"
] | DBD-mysql | 793b72b1a0baa5070adacaac0e12fd995a6fbabe | 135,203,197,064,049,400,000,000,000,000,000,000,000 | 13 | Added Pali's fix for CVE-2016-1249 |
ar6000_alloc_cookie(struct ar6_softc *ar)
{
struct ar_cookie *cookie;
cookie = ar->arCookieList;
if(cookie != NULL)
{
ar->arCookieList = cookie->arc_list_next;
ar->arCookieCount--;
}
return cookie;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 61,903,050,168,055,795,000,000,000,000,000,000,000 | 13 | 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 MACH0_(get_bits)(struct MACH0_(obj_t)* bin) {
if (bin) {
int bits = MACH0_(get_bits_from_hdr) (&bin->hdr);
if (bin->hdr.cputype == CPU_TYPE_ARM && bin->entry & 1) {
return 16;
}
return bits;
}
return 32;
} | 0 | [
"CWE-415",
"CWE-125"
] | radare2 | 60208765887f5f008b3b9a883f3addc8bdb9c134 | 51,461,715,102,317,970,000,000,000,000,000,000,000 | 10 | Fix #9970 - heap oobread in mach0 parser (#10026) |
xrdp_mm_setup_mod2(struct xrdp_mm* self)
{
char text[256];
char* name;
char* value;
int i;
int rv;
int key_flags;
int device_flags;
g_memset(text,0,sizeof(char) * 256);
rv = 1;
text[0] = 0;
if (!g_is_wait_obj_set(self->wm->pro_layer->self_term_event))
{
if (self->mod->mod_start(self->mod, s... | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 104,917,831,373,081,060,000,000,000,000,000,000,000 | 95 | move temp files from /tmp to /tmp/.xrdp |
MagickExport MagickBooleanType InterpolatePixelInfo(const Image *image,
const CacheView_ *image_view,const PixelInterpolateMethod method,
const double x,const double y,PixelInfo *pixel,ExceptionInfo *exception)
{
MagickBooleanType
status;
double
alpha[16],
gamma;
PixelInfo
pixels[16];
reg... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 298,044,264,693,074,470,000,000,000,000,000,000,000 | 441 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
*/
static unsigned int
xmlXPathNodeValHash(xmlNodePtr node) {
int len = 2;
const xmlChar * string = NULL;
xmlNodePtr tmp = NULL;
unsigned int ret = 0;
if (node == NULL)
return(0);
if (node->type == XML_DOCUMENT_NODE) {
tmp = xmlDocGetRootElement((xmlDocPtr) node);
if (tmp == NULL)
nod... | 0 | [
"CWE-476"
] | libxml2 | a436374994c47b12d5de1b8b1d191a098fa23594 | 66,021,678,249,954,870,000,000,000,000,000,000,000 | 104 | Fix nullptr deref with XPath logic ops
If the XPath stack is corrupted, for example by a misbehaving extension
function, the "and" and "or" XPath operators could dereference NULL
pointers. Check that the XPath stack isn't empty and optimize the
logic operators slightly.
Closes: https://gitlab.gnome.org/GNOME/libxml2/... |
int uwsgi_str2_num(char *str) {
int num = 0;
num = 10 * (str[0] - 48);
num += str[1] - 48;
return num;
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 4,866,224,974,540,100,600,000,000,000,000,000,000 | 9 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
static mz_bool mz_zip_get_file_modified_time(const char *pFilename,
mz_uint16 *pDOS_time,
mz_uint16 *pDOS_date) {
#ifdef MINIZ_NO_TIME
(void)pFilename;
*pDOS_date = *pDOS_time = 0;
#else
struct MZ_FILE_STAT_STRUCT file_stat;... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 228,090,321,447,284,770,000,000,000,000,000,000,000 | 15 | Make line_no with too large value(2**20) invalid. Fixes #124 |
struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
int (*test)(struct inode *, void *), void *data)
{
struct inode *inode;
again:
inode = ilookup5_nowait(sb, hashval, test, data);
if (inode) {
wait_on_inode(inode);
if (unlikely(inode_unhashed(inode))) {
iput(inode);
goto again;
}
}
... | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 109,200,420,900,109,340,000,000,000,000,000,000,000 | 15 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
static int on_header_value(http_parser* self_, const char* at, size_t length)
{
HTTPParser* self = static_cast<HTTPParser*>(self_);
switch (self->header_building_state)
{
case 0:
self->header_value.insert(self->header_value.end(), a... | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 118,023,509,720,426,670,000,000,000,000,000,000,000 | 15 | Prevent HTTP pipelining which Crow doesn't support. |
void CalendarRegressionTest::test4125892() {
UErrorCode status = U_ZERO_ERROR;
GregorianCalendar *cal = (GregorianCalendar*) Calendar::createInstance(status);
if(U_FAILURE(status)) {
dataerrln("Error creating calendar %s", u_errorName(status));
delete cal;
return;
}
DateFormat *fmt... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 25,526,573,066,522,320,000,000,000,000,000,000,000 | 29 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
static int x509_get_uid( unsigned char **p,
const unsigned char *end,
mbedtls_x509_buf *uid, int n )
{
int ret;
if( *p == end )
return( 0 );
uid->tag = **p;
if( ( ret = mbedtls_asn1_get_tag( p, end, &uid->len,
MBEDTLS_ASN1_CONTEXT_... | 0 | [
"CWE-287",
"CWE-284"
] | mbedtls | d15795acd5074e0b44e71f7ede8bdfe1b48591fc | 122,639,152,589,735,000,000,000,000,000,000,000,000 | 25 | Improve behaviour on fatal errors
If we didn't walk the whole chain, then there may be any kind of errors in the
part of the chain we didn't check, so setting all flags looks like the safe
thing to do. |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
const TfLiteTensor* diag = GetInput(context, node, kDiagonalTensor);
FillDiagHelper(input, diag, output);
return kTfL... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 136,972,669,465,364,800,000,000,000,000,000,000,000 | 7 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
process_pointer_pdu(STREAM s)
{
uint16 message_type;
uint16 x, y;
logger(Protocol, Debug, "%s()", __func__);
in_uint16_le(s, message_type);
in_uint8s(s, 2); /* pad */
switch (message_type)
{
case RDP_POINTER_MOVE:
in_uint16_le(s, x);
in_uint16_le(s, y);
if (s_check(s))
ui_move_pointer(x, y);
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 192,928,451,169,130,570,000,000,000,000,000,000,000 | 40 | 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 ... |
int fib6_lookup(struct net *net, int oif, struct flowi6 *fl6,
struct fib6_result *res, int flags)
{
int err;
if (net->ipv6.fib6_has_custom_rules) {
struct fib_lookup_arg arg = {
.lookup_ptr = fib6_table_lookup,
.lookup_data = &oif,
.result = res,
.flags = FIB_LOOKUP_NOREF,
};
l3mdev_update_flow(... | 0 | [
"CWE-772",
"CWE-401"
] | linux | ca7a03c4175366a92cee0ccc4fec0038c3266e26 | 75,495,365,219,470,710,000,000,000,000,000,000,000 | 27 | ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule
Commit 7d9e5f422150 removed references from certain dsts, but accounting
for this never translated down into the fib6 suppression code. This bug
was triggered by WireGuard users who use wg-quick(8), which uses the
"suppress-prefix" directive to ip-rule(8... |
static int ceph_x_build_authorizer(struct ceph_auth_client *ac,
struct ceph_x_ticket_handler *th,
struct ceph_x_authorizer *au)
{
int maxlen;
struct ceph_x_authorize_a *msg_a;
struct ceph_x_authorize_b msg_b;
void *p, *end;
int ret;
int ticket_blob_len =
(th->ticket_blob ? th->ticket_blob->vec.iov... | 0 | [
"CWE-399",
"CWE-119"
] | linux | c27a3e4d667fdcad3db7b104f75659478e0c68d8 | 246,426,966,969,060,170,000,000,000,000,000,000,000 | 67 | libceph: do not hard code max auth ticket len
We hard code cephx auth ticket buffer size to 256 bytes. This isn't
enough for any moderate setups and, in case tickets themselves are not
encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but
ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S... |
_gnutls_kx_needs_dh_params (gnutls_kx_algorithm_t algorithm)
{
ssize_t ret = 0;
GNUTLS_KX_ALG_LOOP (ret = p->needs_dh_params);
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 281,071,938,565,323,760,000,000,000,000,000,000,000 | 6 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
http_close (http_t hd, int keep_read_stream)
{
if (!hd)
return;
log_assert (hd->magic == HTTP_CONTEXT_MAGIC);
/* First remove the close notifications for the streams. */
if (hd->fp_read)
es_onclose (hd->fp_read, 0, fp_onclose_notification, hd);
if (hd->fp_write)
es_onclose (hd->fp_write, 0, fp_... | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 36,255,248,119,649,250,000,000,000,000,000,000,000 | 32 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
GF_Err moof_box_read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read(s, bs);
} | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 139,864,788,700,003,810,000,000,000,000,000,000,000 | 4 | fixed #1757 |
static ssize_t wolfssl_recv(struct Curl_easy *data,
int num,
char *buf,
size_t buffersize,
CURLcode *curlcode)
{
struct connectdata *conn = data->conn;
struct ssl_connect_data *connssl = &conn->ssl[num];
... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 242,805,741,819,328,400,000,000,000,000,000,000,000 | 33 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
static struct passwd *check_user(const char *user)
{
#if !defined(__WIN__)
struct passwd *tmp_user_info;
uid_t user_id= geteuid();
// Don't bother if we aren't superuser
if (user_id)
{
if (user)
{
/* Don't give a warning, if real user is same as given with --user */
/* purecov: begin test... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 199,657,477,419,856,160,000,000,000,000,000,000,000 | 63 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
bool Window_funcs_sort::exec(JOIN *join, bool keep_filesort_result)
{
THD *thd= join->thd;
JOIN_TAB *join_tab= join->join_tab + join->total_join_tab_cnt();
/* Sort the table based on the most specific sorting criteria of
the window functions. */
if (create_sort_index(thd, join, join_tab, filesort))
re... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 337,361,263,906,908,860,000,000,000,000,000,000,000 | 22 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static void do_notify_parent_cldstop(struct task_struct *tsk,
bool for_ptracer, int why)
{
struct siginfo info;
unsigned long flags;
struct task_struct *parent;
struct sighand_struct *sighand;
cputime_t utime, stime;
if (for_ptracer) {
parent = tsk->parent;
} else {
tsk = tsk->group_leader;
paren... | 0 | [
"CWE-399"
] | linux | b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f | 89,348,323,099,764,310,000,000,000,000,000,000,000 | 56 | kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
This fixes a kernel memory contents leak via the tkill and tgkill syscalls
for compat processes.
This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field
when handling signals delivered from tkill.
The place of the infoleak:
int ... |
void init(RGWRados *store, struct req_state *s, RGWHandler *h) override {
RGWOp::init(store, s, h);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 106,216,626,035,916,800,000,000,000,000,000,000,000 | 3 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
bool Smb4KUnmountJob::createUnmountAction(Smb4KShare *share, Action *action)
{
Q_ASSERT(share);
Q_ASSERT(action);
if (!share || !action)
{
return false;
}
else
{
// Do nothing
}
// Find the umount program.
QString umount;
QStringList paths;
paths << "/bin";
paths << "/sbin";
pa... | 1 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 88,554,569,460,871,600,000,000,000,000,000,000,000 | 69 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
int re_yyget_debug (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug; | 0 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 225,131,417,393,502,160,000,000,000,000,000,000,000 | 5 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
void init_update_queries(void)
{
/* Initialize the server command flags array. */
memset(server_command_flags, 0, sizeof(server_command_flags));
server_command_flags[COM_STATISTICS]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS | CF_SKIP_WSREP_CHECK;
server_command_flags[COM_PING]= CF_SKIP_QUERY_ID | CF_SKIP_QUE... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 151,245,943,994,092,660,000,000,000,000,000,000,000 | 378 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
void test_nghttp2_submit_headers_push_reply(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
my_user_data ud;
nghttp2_stream *stream;
int foo;
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
callbacks.send_callback = null_send_callback;
callbacks.on_frame_send_callback =... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 11,445,567,393,767,084,000,000,000,000,000,000,000 | 40 | Add nghttp2_option_set_max_outbound_ack |
ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, int last_errno)
{
if (ret == 0 || ret == -1) {
if (ret == -1) {
switch (last_errno) {
case EINTR:
case EAGAIN:
#ifdef _WIN32
case WSAEWOULDBLOCK:
#endif
return 0;
... | 0 | [] | qemu | 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3 | 131,768,812,103,268,400,000,000,000,000,000,000,000 | 24 | 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>
... |
void regulator_unregister(struct regulator_dev *rdev)
{
if (rdev == NULL)
return;
if (rdev->supply) {
while (rdev->use_count--)
regulator_disable(rdev->supply);
regulator_put(rdev->supply);
}
mutex_lock(®ulator_list_mutex);
debugfs_remove_recursive(rdev->debugfs);
flush_work(&rdev->disable_work.work)... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 251,324,086,583,771,600,000,000,000,000,000,000,000 | 22 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
UnicodeString::UnicodeString(UChar ch) {
fUnion.fFields.fLengthAndFlags = kLength1 | kShortString;
fUnion.fStackFields.fBuffer[0] = ch;
} | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 290,203,878,726,837,900,000,000,000,000,000,000,000 | 4 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
template<typename t>
CImg<T>& _quicksort(const long indm, const long indM, CImg<t>& permutations,
const bool is_increasing, const bool is_permutations) {
if (indm<indM) {
const long mid = (indm + indM)/2;
if (is_increasing) {
if ((*this)[indm]>(*this)[mid]... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 80,076,500,437,109,060,000,000,000,000,000,000,000 | 59 | Fix other issues in 'CImg<T>::load_bmp()'. |
TEST_F(
QuicServerTransportTest,
MigrateToValidatePeerCancelsPendingPathChallenge) {
server->getNonConstConn().transportSettings.disableMigration = false;
auto data = IOBuf::copyBuffer("bad data");
auto packetData = packetToBuf(createStreamPacket(
*clientConnectionId,
*server->getConn().server... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 297,728,233,446,516,300,000,000,000,000,000,000,000 | 74 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
int r_jwe_advanced_parse_json_t(jwe_t * jwe, json_t * jwe_json, uint32_t parse_flags, int x5u_flags) {
int ret;
size_t header_len = 0, cypher_key_len = 0, iv_len = 0, index = 0;;
char * str_header = NULL;
json_t * j_header = NULL, * j_recipient;
unsigned char * iv = NULL;
if (jwe != NULL && json_is_object(... | 0 | [
"CWE-787"
] | rhonabwy | b4c2923a1ba4fabf9b55a89244127e153a3e549b | 264,688,282,216,598,800,000,000,000,000,000,000,000 | 156 | Fix buffer overflow on r_jwe_aesgcm_key_unwrap |
SetDeviceIndicators(char *wire,
DeviceIntPtr dev,
unsigned changed,
int num,
int *status_rtrn,
ClientPtr client, xkbExtensionDeviceNotify * ev)
{
xkbDeviceLedsWireDesc *ledWire;
int i;
XkbEventCauseRec cause;... | 1 | [
"CWE-122"
] | xserver | 87c64fc5b0db9f62f4e361444f4b60501ebf67b9 | 239,920,769,198,937,040,000,000,000,000,000,000,000 | 94 | Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows
ZDI-CAN 11389 / CVE-2020-25712
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
static int wp_pfn_shared(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
if (vma->vm_ops && vma->vm_ops->pfn_mkwrite) {
int ret;
pte_unmap_unlock(vmf->pte, vmf->ptl);
vmf->flags |= FAULT_FLAG_MKWRITE;
ret = vma->vm_ops->pfn_mkwrite(vmf);
if (ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))
retu... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 119,050,879,517,927,220,000,000,000,000,000,000,000 | 17 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
RemoteIo::Impl::Impl(const std::string& url, size_t blockSize)
: path_(url), blockSize_(blockSize), blocksMap_(0), size_(0),
idx_(0), isMalloced_(false), eof_(false), protocol_(fileProtocol(url)),totalRead_(0)
{
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 296,000,372,638,660,500,000,000,000,000,000,000,000 | 5 | Fix https://github.com/Exiv2/exiv2/issues/55 |
static int io_connect(struct io_kiocb *req, const struct io_uring_sqe *sqe,
struct io_kiocb **nxt, bool force_nonblock)
{
#if defined(CONFIG_NET)
struct sockaddr __user *addr;
unsigned file_flags;
int addr_len, ret;
if (unlikely(req->ctx->flags & (IORING_SETUP_IOPOLL|IORING_SETUP_SQPOLL)))
return -EINVAL... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 216,779,484,693,542,300,000,000,000,000,000,000,000 | 31 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
struct file *file, unsigned flags,
umode_t mode)
{
int err;
struct fuse_conn *fc = get_fuse_conn(dir);
struct dentry *res = NULL;
if (fuse_is_bad(dir))
return -EIO;
if (d_in_lookup(entry)) {
res = fuse_lookup(dir, entry, 0);
... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 122,852,299,121,347,150,000,000,000,000,000,000,000 | 45 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.