func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name)
{
struct udev_monitor *udev_monitor;
unsigned int group;
if (udev == NULL)
return NULL;
if (name == NULL)
return NULL;
if (strcmp(name, "kernel") == 0)
group = UDEV_MONITOR_KERNEL;
else if (strcmp(name, "udev") == 0)
... | 0 | [
"CWE-346"
] | udev | e2b362d9f23d4c63018709ab5f81a02f72b91e75 | 65,214,894,931,604,985,000,000,000,000,000,000,000 | 39 | libudev: monitor - unify socket message handling |
static void stats_init(void) {
stats.curr_items = stats.total_items = stats.curr_conns = stats.total_conns = stats.conn_structs = 0;
stats.get_cmds = stats.set_cmds = stats.get_hits = stats.get_misses = stats.evictions = stats.reclaimed = 0;
stats.touch_cmds = stats.touch_misses = stats.touch_hits = stats.r... | 0 | [
"CWE-189"
] | memcached | 6695ccbc525c36d693aaa3e8337b36aa0c784424 | 137,738,962,225,047,440,000,000,000,000,000,000,000 | 18 | Fix segfault on specially crafted packet. |
static void ismt_mstr_reg_dump(struct ismt_priv *priv)
{
struct device *dev = &priv->pci_dev->dev;
dev_dbg(dev, "Dump of the iSMT Master Registers\n");
dev_dbg(dev, " MDBA..... : (0x%p)=0x%016llX\n",
priv->smba + ISMT_MSTR_MDBA,
(long long unsigned int)readq(priv->smba + ISMT_MSTR_MDBA));
dev_dbg(dev, " MCTR... | 0 | [
"CWE-120",
"CWE-131",
"CWE-703"
] | linux | 690b2549b19563ec5ad53e5c82f6a944d910086e | 265,846,005,421,110,100,000,000,000,000,000,000,000 | 24 | i2c: ismt: prevent memory corruption in ismt_access()
The "data->block[0]" variable comes from the user and is a number
between 0-255. It needs to be capped to prevent writing beyond the end
of dma_buffer[].
Fixes: 5e9a97b1f449 ("i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL")
Reported-and-tested-by: Zheyu... |
QPDFObjectHandle::getStringValue()
{
assertString();
return dynamic_cast<QPDF_String*>(obj.getPointer())->getVal();
} | 0 | [
"CWE-835"
] | qpdf | afe0242b263a9e1a8d51dd81e42ab6de2e5127eb | 46,716,909,036,337,640,000,000,000,000,000,000,000 | 5 | Handle object ID 0 (fixes #99)
This is CVE-2017-9208.
The QPDF library uses object ID 0 internally as a sentinel to
represent a direct object, but prior to this fix, was not blocking
handling of 0 0 obj or 0 0 R as a special case. Creating an object in
the file with 0 0 obj could cause various infinite loops. The PDF... |
static void start_daemon()
{
// Capture USB device if not in no-printer mode
struct usb_sock_t *usb_sock;
if (g_options.noprinter_mode == 0) {
usb_sock = usb_open();
if (usb_sock == NULL)
goto cleanup_usb;
} else
usb_sock = NULL;
// Capture a socket
uint16_t desired_port = g_options.desired_port;
struc... | 1 | [
"CWE-284",
"CWE-264"
] | ippusbxd | 46844402bca7a38fc224483ba6f0a93c4613203f | 132,084,126,750,504,010,000,000,000,000,000,000,000 | 90 | SECURITY FIX: Actually restrict the access to the printer to localhost
Before, any machine in any network connected by any of the interfaces (as
listed by "ifconfig") could access to an IPP-over-USB printer on the assigned
port, allowing users on remote machines to print and to access the web
configuration interface o... |
ptaRead(const char *filename)
{
FILE *fp;
PTA *pta;
PROCNAME("ptaRead");
if (!filename)
return (PTA *)ERROR_PTR("filename not defined", procName, NULL);
if ((fp = fopenReadStream(filename)) == NULL)
return (PTA *)ERROR_PTR("stream not opened", procName, NULL);
pta = ptaReadStream(... | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 256,689,592,258,506,500,000,000,000,000,000,000,000 | 18 | Security fixes: expect final changes for release 1.75.3.
* Fixed a debian security issue with fscanf() reading a string with
possible buffer overflow.
* There were also a few similar situations with sscanf(). |
testcase_str2job(Pool *pool, const char *str, Id *whatp)
{
int i;
Id job, jobsel;
Id what;
char *s;
char **pieces = 0;
int npieces = 0;
*whatp = 0;
/* so we can patch it */
s = pool_tmpjoin(pool, str, 0, 0);
/* split it in pieces */
for (;;)
{
while (*s == ' ' || *s == '\t')
s++;
... | 0 | [
"CWE-120"
] | libsolv | 0077ef29eb46d2e1df2f230fc95a1d9748d49dec | 286,171,887,490,856,740,000,000,000,000,000,000,000 | 62 | testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.
(Jobs may point inside the whatproviedes array, so we must not invalid... |
UUIDNormalize(
slap_mask_t usage,
Syntax *syntax,
MatchingRule *mr,
struct berval *val,
struct berval *normalized,
void *ctx )
{
unsigned char octet = '\0';
int i;
int j;
if ( SLAP_MR_IS_DENORMALIZE( usage ) ) {
/* NOTE: must be a normalized UUID */
if( val->bv_len != 16 )
return LDAP_INVALID_SYNTAX;
... | 0 | [
"CWE-191"
] | openldap | 38ac838e4150c626bbfa0082b7e2cf3a2bb4df31 | 328,239,065,246,712,660,000,000,000,000,000,000,000 | 61 | ITS#9404 fix serialNumberAndIssuerCheck
Tighten validity checks |
static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd)
{
struct pagevec pvec;
int nr_pages, i;
struct inode *inode = mpd->inode;
struct buffer_head *head, *bh;
int bpp_bits = PAGE_SHIFT - inode->i_blkbits;
pgoff_t start, end;
ext4_lblk_t lblk;
sector_t pblock;
int err;
start = mpd->map.m_lblk >> ... | 0 | [] | linux | 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44 | 157,610,259,631,311,660,000,000,000,000,000,000,000 | 78 | ext4: fail ext4_iget for root directory if unallocated
If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, b... |
void Magick::Image::cycleColormap(const ssize_t amount_)
{
modifyImage();
GetPPException;
CycleColormapImage(image(),amount_,exceptionInfo);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 176,735,106,080,645,820,000,000,000,000,000,000,000 | 7 | Added missing return to avoid use after free. |
void do_connect(struct st_command *command)
{
int con_port= opt_port;
char *con_options;
my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0, con_shm= 0, con_cleartext_enable= 0;
my_bool con_secure_auth= 1;
struct st_connection* con_slot;
static DYNAMIC_STRING ds_connection_name;
static DYNAMIC_ST... | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 197,697,273,930,804,370,000,000,000,000,000,000,000 | 249 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec) |
TEST(BSONValidateFast, StringHasSomething) {
BufBuilder bb;
BSONObjBuilder ob(bb);
bb.appendChar(String);
bb.appendStr("x", /*withNUL*/true);
bb.appendNum(0);
const BSONObj x = ob.done();
ASSERT_EQUALS(5 // overhead
+ 1 // type
... | 0 | [
"CWE-20"
] | mongo | 3a7e85ea1f672f702660e5472566234b1d19038e | 216,873,736,167,003,640,000,000,000,000,000,000,000 | 14 | SERVER-17264: improve bson validation for utf-8 strings
(cherry picked from commit 394a8569ff14a215c0691aa34440227b2e62a4de)
Conflicts:
src/mongo/bson/bson_validate_test.cpp |
static struct kobject *exact_match(dev_t dev, int *part, void *data)
{
struct cdev *p = data;
return &p->kobj;
} | 0 | [
"CWE-362"
] | linux | 68faa679b8be1a74e6663c21c3a9d25d32f1c079 | 97,300,171,741,794,450,000,000,000,000,000,000,000 | 5 | chardev: Avoid potential use-after-free in 'chrdev_open()'
'chrdev_open()' calls 'cdev_get()' to obtain a reference to the
'struct cdev *' stashed in the 'i_cdev' field of the target inode
structure. If the pointer is NULL, then it is initialised lazily by
looking up the kobject in the 'cdev_map' and so the whole proc... |
int json_object_update(json_t *object, json_t *other)
{
const char *key;
json_t *value;
if(!json_is_object(object) || !json_is_object(other))
return -1;
json_object_foreach(other, key, value) {
if(json_object_set_nocheck(object, key, value))
return -1;
}
return 0;
... | 0 | [
"CWE-310"
] | jansson | 8f80c2d83808150724d31793e6ade92749b1faa4 | 339,557,803,453,059,780,000,000,000,000,000,000,000 | 15 | CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing. |
static int fuse_dev_pipe_buf_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
return 1;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | linux | c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae | 312,069,540,526,798,070,000,000,000,000,000,000,000 | 5 | fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message
FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
message processing could overrun and result in a "kernel BUG at
fs/fuse/dev.c:629!"
Reported-by: Han-Wen Nienhuys <hanwenn@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kern... |
TEST(OverflowArithmetic, SignedSubtractionTests) {
using T = int64_t;
static constexpr auto f = polySub;
ASSERT(test<T>(f, kMax<T>, 0, kMax<T>));
ASSERT(test<T>(f, kMax<T>, 1, kMax<T> - 1));
ASSERT(test<T>(f, kMax<T> - 1, -1, kMax<T>));
ASSERT(test<T>(f, kMin<T>, 0, kMin<T>));
ASSERT(test<T>... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 106,451,258,135,737,210,000,000,000,000,000,000,000 | 20 | SERVER-43699 $mod should not overflow for large negative values |
static inline struct sk_buff *skb_from_uarg(struct ubuf_info *uarg)
{
return container_of((void *)uarg, struct sk_buff, cb); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 264,183,415,062,425,200,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
virtual bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(full_name(), arg, VCOL_IMPOSSIBLE);
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 68,499,487,753,137,100,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
bool blk_end_request(struct request *rq, blk_status_t error,
unsigned int nr_bytes)
{
WARN_ON_ONCE(rq->q->mq_ops);
return blk_end_bidi_request(rq, error, nr_bytes, 0);
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 106,364,913,675,601,230,000,000,000,000,000,000,000 | 6 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
double JOIN_TAB::scan_time()
{
double res;
if (table->is_created())
{
if (table->is_filled_at_execution())
{
get_delayed_table_estimates(table, &records, &read_time,
&startup_cost);
found_records= records;
table->quick_condition_rows= records;
}
... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 319,345,027,981,201,970,000,000,000,000,000,000,000 | 31 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static void ql_get_board_info(struct ql3_adapter *qdev)
{
struct ql3xxx_port_registers __iomem *port_regs =
qdev->mem_map_registers;
u32 value;
value = ql_read_page0_reg_l(qdev, &port_regs->portStatus);
qdev->chip_rev_id = ((value & PORT_STATUS_REV_ID_MASK) >> 12);
if (value & PORT_STATUS_64)
qdev->pci_widt... | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 49,786,066,442,907,840,000,000,000,000,000,000,000 | 19 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
{
size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
if (SCNG(input_filter)) {
size_t original_offset = offset, length = 0;
do {
unsigned char *p = NULL;
if ((size_t)-1 == SCNG(input_filter)(&p, &length, SCNG(script_org), offset TSRMLS_CC)) {
return ... | 0 | [
"CWE-20"
] | php-src | fb58e69a84f4fde603a630d2c9df2fa3be16d846 | 26,749,268,464,428,910,000,000,000,000,000,000,000 | 20 | fix bug #64660 - yyparse can return 2, not only 1 |
GF_AV1Config *gf_isom_av1_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex)
{
GF_TrackBox *trak;
GF_MPEGVisualSampleEntryBox *entry;
if (gf_isom_get_reference_count(the_file, trackNumber, GF_ISOM_REF_TBAS)) {
u32 ref_track;
GF_Err e = gf_isom_get_reference(the_file, trackNumber, GF_ISOM_REF... | 1 | [
"CWE-476"
] | gpac | b2eab95e07cb5819375a50358d4806a8813b6e50 | 309,915,506,651,826,180,000,000,000,000,000,000,000 | 17 | fixed #1738 |
virDomainGraphicsDefParseXMLSDL(virDomainGraphicsDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
int enableVal;
xmlNodePtr glNode;
g_autofree char *fullscreen = virXMLPropString(node, "fullscreen");... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 40,783,360,037,896,250,000,000,000,000,000,000,000 | 45 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static bool var_type_simple_to_complex(const RzTypeDB *typedb, RzType *a, RzType *b) {
// `*int*` types to anything else of the typeclass
if (rz_type_is_integral(typedb, a) && !rz_type_is_char_ptr_nested(a) && !rz_type_is_integral(typedb, b)) {
return true;
}
// `*int*` types to pointers or arrays
if (rz_type_is... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 176,102,164,390,389,200,000,000,000,000,000,000,000 | 11 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
int btd_adapter_unblock_address(struct btd_adapter *adapter,
const bdaddr_t *bdaddr, uint8_t bdaddr_type)
{
struct mgmt_cp_unblock_device cp;
char addr[18];
ba2str(bdaddr, addr);
DBG("hci%u %s", adapter->dev_id, addr);
memset(&cp, 0, sizeof(cp));
bacpy(&cp.addr.bdaddr, bdaddr);
cp.addr.type = bdaddr_type;
... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 292,418,786,024,076,670,000,000,000,000,000,000,000 | 20 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
const MagickBooleanType list,const char *options)
{
char
token[MagickPathExtent];
const OptionInfo
*command_info,
*option_info;
int
sentinel;
MagickBooleanType
negate;
register char
*q;
register const char
... | 0 | [
"CWE-399"
] | ImageMagick | 6790815c75bdea0357df5564345847856e995d6b | 267,687,644,309,784,950,000,000,000,000,000,000,000 | 80 | Fixed memory leak in IsOptionMember. |
static void net_rps_send_ipi(struct softnet_data *remsd)
{
#ifdef CONFIG_RPS
while (remsd) {
struct softnet_data *next = remsd->rps_ipi_next;
if (cpu_online(remsd->cpu))
smp_call_function_single_async(remsd->cpu, &remsd->csd);
remsd = next;
}
#endif | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 176,128,493,103,290,100,000,000,000,000,000,000,000 | 12 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
_PUBLIC_ int codepoint_cmpi(codepoint_t c1, codepoint_t c2)
{
if (c1 == c2 ||
toupper_m(c1) == toupper_m(c2)) {
return 0;
}
return c1 - c2;
} | 0 | [
"CWE-200"
] | samba | ba5dbda6d0174a59d221c45cca52ecd232820d48 | 110,491,386,770,599,100,000,000,000,000,000,000,000 | 8 | CVE-2015-5330: Fix handling of unicode near string endings
Until now next_codepoint_ext() and next_codepoint_handle_ext() were
using strnlen(str, 5) to determine how much string they should try to
decode. This ended up looking past the end of the string when it was not
null terminated and the final character looked li... |
GF_Err gf_isom_cenc_get_default_info(GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 *container_type, Bool *default_IsEncrypted, u8 *crypt_byte_block, u8 *skip_byte_block, const u8 **key_info, u32 *key_info_size)
{
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!tra... | 0 | [
"CWE-476"
] | gpac | 3b84ffcbacf144ce35650df958432f472b6483f8 | 289,172,253,027,868,120,000,000,000,000,000,000,000 | 7 | fixed #1735 |
void unmap_mapping_range(struct address_space *mapping,
loff_t const holebegin, loff_t const holelen, int even_cows)
{
struct zap_details details;
pgoff_t hba = holebegin >> PAGE_SHIFT;
pgoff_t hlen = (holelen + PAGE_SIZE - 1) >> PAGE_SHIFT;
/* Check for overflow. */
if (sizeof(holelen) > sizeof(hlen)) {
long... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b4cbb197c7e7a68dbad0d491242e3ca67420c13e | 272,380,664,648,503,120,000,000,000,000,000,000,000 | 30 | vm: add vm_iomap_memory() helper function
Various drivers end up replicating the code to mmap() their memory
buffers into user space, and our core memory remapping function may be
very flexible but it is unnecessarily complicated for the common cases
to use.
Our internal VM uses pfn's ("page frame numbers") which sim... |
static int filter_flatedecode(struct pdf_struct *pdf, struct pdf_obj *obj,
const char *buf, off_t len, int fout, off_t *sum)
{
int skipped = 0;
int zstat;
z_stream stream;
off_t nbytes;
char output[BUFSIZ];
if (len == 0)
return CL_CLEAN;
if (*buf == '\r') {
buf++;
len--;
pdfob... | 0 | [
"CWE-119",
"CWE-189",
"CWE-79"
] | clamav-devel | 24ff855c82d3f5c62bc5788a5776cefbffce2971 | 320,961,804,651,129,380,000,000,000,000,000,000,000 | 125 | pdf: bb #7053 |
void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
int nonagle)
{
/* If we are closed, the bytes will have to remain here.
* In time closedown will finish, we empty the write queue and
* all will be happy.
*/
if (unlikely(sk->sk_state == TCP_CLOSE))
return;
if (tcp_write_xmit(sk... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 339,844,944,987,595,850,000,000,000,000,000,000,000 | 14 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static void enter_lmode(struct kvm_vcpu *vcpu)
{
u32 guest_tr_ar;
guest_tr_ar = vmcs_read32(GUEST_TR_AR_BYTES);
if ((guest_tr_ar & AR_TYPE_MASK) != AR_TYPE_BUSY_64_TSS) {
printk(KERN_DEBUG "%s: tss fixup for long mode. \n",
__func__);
vmcs_write32(GUEST_TR_AR_BYTES,
(guest_tr_ar & ~AR_TYPE_MASK... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 105,620,537,713,400,930,000,000,000,000,000,000,000 | 15 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
xsltDocumentPtr ret;
xmlDocPtr doc;
if ((ctxt == NULL) || (URI == NULL))
return(NULL);
/*
* Security framework check
*/
if (ctxt->sec != NULL) {
int res;
res = xsltCheckRead(ctxt->sec, ctxt, URI);
if (res == 0) {
... | 1 | [] | libxslt | e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 | 69,251,931,324,013,280,000,000,000,000,000,000,000 | 63 | Fix security framework bypass
xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
don't check for this condition and allow access. With a specially
crafted URL, xsltCheckRead could be tricked into returning an error
because of a supposedly invalid URL that would still be loaded
succesfully later on... |
void umd_cleanup_helper(struct umd_info *info)
{
fput(info->pipe_to_umh);
fput(info->pipe_from_umh);
put_pid(info->tgid);
info->tgid = NULL;
} | 0 | [
"CWE-401"
] | linux | f60a85cad677c4f9bb4cadd764f1d106c38c7cf8 | 94,224,630,803,158,500,000,000,000,000,000,000,000 | 7 | bpf: Fix umd memory leak in copy_process()
The syzbot reported a memleak as follows:
BUG: memory leak
unreferenced object 0xffff888101b41d00 (size 120):
comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
backtrace:
[<ffffffff8125dc56>] alloc_pid+0x66/0x560
[<ffffffff81226405>] copy_process+0x146... |
bool kvm_rdpmc(struct kvm_vcpu *vcpu)
{
u32 ecx = kvm_register_read(vcpu, VCPU_REGS_RCX);
u64 data;
int err;
err = kvm_pmu_read_pmc(vcpu, ecx, &data);
if (err)
return err;
kvm_register_write(vcpu, VCPU_REGS_RAX, (u32)data);
kvm_register_write(vcpu, VCPU_REGS_RDX, data >> 32);
return err;
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 97,678,840,402,139,040,000,000,000,000,000,000,000 | 13 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
static int lua_ap_scoreboard_worker(lua_State *L)
{
int i, j;
worker_score *ws_record = NULL;
request_rec *r = NULL;
luaL_checktype(L, 1, LUA_TUSERDATA);
luaL_checktype(L, 2, LUA_TNUMBER);
luaL_checktype(L, 3, LUA_TNUMBER);
r = ap_lua_check_request_rec(L, 1);
if (!r) return 0;
i =... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 79,489,475,395,418,790,000,000,000,000,000,000,000 | 90 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
static char** WM_LC_Tokenize_Line(char *line_data) {
int line_length = (int) strlen(line_data);
int token_data_length = 0;
int line_ofs = 0;
int token_start = 0;
char **token_data = NULL;
int token_count = 0;
if (!line_length) return (NULL);
do {
/* ignore everything after # *... | 0 | [
"CWE-200",
"CWE-119"
] | wildmidi | 814f31d8eceda8401eb812fc2e94ed143fdad0ab | 334,271,928,775,090,550,000,000,000,000,000,000,000 | 53 | wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input
Fixes bug #178. |
static inline u64 wrap_max(u64 x, u64 y)
{
return (s64)(x - y) > 0 ? x : y;
} | 0 | [] | linux | 96b3d28bf4b00f62fc8386ff5d487d1830793a3d | 173,349,691,700,160,600,000,000,000,000,000,000,000 | 4 | sched/clock: Prevent tracing recursion in sched_clock_cpu()
Prevent tracing of preempt_disable/enable() in sched_clock_cpu().
When CONFIG_DEBUG_PREEMPT is enabled, preempt_disable/enable() are
traced and this causes trace_clock() users (and probably others) to
go into an infinite recursion. Systems with a stable sched... |
_gdata_service_build_session (void)
{
SoupSession *session = soup_session_sync_new_with_options (SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, NULL);
#ifdef HAVE_GNOME
soup_session_add_feature_by_type (session, SOUP_TYPE_GNOME_FEATURES_2_26);
#endif /* HAVE_GNOME */
/* Log all libsoup traffic if debugging's turned on... | 0 | [
"CWE-20"
] | libgdata | 6799f2c525a584dc998821a6ce897e463dad7840 | 296,871,549,021,195,740,000,000,000,000,000,000,000 | 37 | core: Validate SSL certificates for all connections
This prevents MitM attacks which use spoofed SSL certificates.
Note that this bumps our libsoup requirement to 2.37.91.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535 |
static void update_write_refresh_rect(wStream* s, BYTE count,
const RECTANGLE_16* areas)
{
int i;
Stream_Write_UINT8(s, count); /* numberOfAreas (1 byte) */
Stream_Seek(s, 3); /* pad3Octets (3 bytes) */
for (i = 0; i < count; i++)
{
Stream_Write_UINT16(s, areas[i].left); /*... | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 286,646,945,276,796,000,000,000,000,000,000,000,000 | 15 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
const RemoteLocatorList& remote_locators() const
{
return remote_locators_;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 237,023,884,473,550,040,000,000,000,000,000,000,000 | 4 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *path, const char *mode, int options,
char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */
{
int fd = -1;
int mode_rw = 0;
php_stream * stream = NULL;
char *p, *token, *pathdup;
long max_memory;
FILE ... | 0 | [] | php-src | 2438490addfbfba51e12246a74588b2382caa08a | 337,452,052,585,074,660,000,000,000,000,000,000,000 | 226 | slim post data |
void t_cpp_generator::generate_service(t_service* tservice) {
string svcname = tservice->get_name();
// Make output files
string f_header_name = get_out_dir() + svcname + ".h";
f_header_.open(f_header_name.c_str());
// Print header file includes
f_header_ << autogen_comment();
f_header_ << "#ifndef " <<... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 173,242,682,740,949,640,000,000,000,000,000,000,000 | 102 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
static pj_status_t avi_get_frame(pjmedia_port *this_port,
pjmedia_frame *frame)
{
struct avi_reader_port *fport = (struct avi_reader_port*)this_port;
pj_status_t status = PJ_SUCCESS;
pj_ssize_t size_read = 0, size_to_read = 0;
pj_assert(fport->base.info.signature == SIGNATURE);
/* We ... | 0 | [
"CWE-703",
"CWE-835"
] | pjproject | 947bc1ee6d05be10204b918df75a503415fd3213 | 279,944,901,323,464,500,000,000,000,000,000,000,000 | 247 | Merge pull request from GHSA-rwgw-vwxg-q799
* Prevent potential infinite loop when parsing WAV format file
* Check if subchunk is negative.
* Fix and add checks
* Change data type from pj_ssize_t to long.
* Modify check
* Fix leak file descriptor and modify check on wav_playlist
* Move overflow/underflow check t... |
static int opimul(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
int offset = 0;
st64 immediate = 0;
if ( op->operands[0].type & OT_QWORD ) {
data[l++] = 0x48;
}
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_WORD ) {
data[l++] = 0x66;
}
if (op->operands[0].type & OT_BYTE) {... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | radare2 | 9b46d38dd3c4de6048a488b655c7319f845af185 | 253,703,747,111,911,600,000,000,000,000,000,000,000 | 138 | 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-- |
mp_fail_print(netdissect_options *ndo,
const u_char *opt, u_int opt_len, u_char flags _U_)
{
if (opt_len != 12)
return 0;
ND_PRINT((ndo, " seq %" PRIu64, EXTRACT_64BITS(opt + 4)));
return 1;
} | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 4c3aee4bb0294c232d56b6d34e9eeb74f630fe8c | 243,862,154,952,896,130,000,000,000,000,000,000,000 | 9 | CVE-2017-13040/MPTCP: Clean up printing DSS suboption.
Do the length checking inline; that means we print stuff up to the point
at which we run out of option data.
First check to make sure we have at least 4 bytes of option, so we have
flags to check.
This fixes a buffer over-read discovered by Kim Gwan Yeong.
Add ... |
static inline struct shash_instance *shash_instance(
struct crypto_instance *inst)
{
return container_of(__crypto_shash_alg(&inst->alg),
struct shash_instance, alg);
} | 0 | [
"CWE-835"
] | linux | ef0579b64e93188710d48667cb5e014926af9f1b | 108,899,067,386,925,550,000,000,000,000,000,000,000 | 6 | crypto: ahash - Fix EINPROGRESS notification callback
The ahash API modifies the request's callback function in order
to clean up after itself in some corner cases (unaligned final
and missing finup).
When the request is complete ahash will restore the original
callback and everything is fine. However, when the requ... |
MOCK_IMPL(STATIC int,
entry_guard_is_listed,(guard_selection_t *gs, const entry_guard_t *guard))
{
if (gs->type == GS_TYPE_BRIDGE) {
return NULL != get_bridge_info_for_guard(guard);
} else {
const node_t *node = node_get_by_id(guard->identity);
return node && node_is_possible_guard(node);
}
} | 0 | [
"CWE-200"
] | tor | 665baf5ed5c6186d973c46cdea165c0548027350 | 81,163,011,445,056,110,000,000,000,000,000,000,000 | 11 | Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.
This patch makes the guard_restriction_t code ... |
int hpack_dht_insert(struct hpack_dht *dht, struct ist name, struct ist value)
{
unsigned int used;
unsigned int head;
unsigned int prev;
unsigned int wrap;
unsigned int tail;
uint32_t headroom, tailroom;
if (!hpack_dht_make_room(dht, name.len + value.len))
return 0;
/* Now there is enough room in the table... | 1 | [
"CWE-787"
] | haproxy | 5dfc5d5cd0d2128d77253ead3acf03a421ab5b88 | 74,370,203,247,410,610,000,000,000,000,000,000,000 | 129 | BUG/CRITICAL: hpack: never index a header into the headroom after wrapping
The HPACK header table is implemented as a wrapping list inside a contigous
area. Headers names and values are stored from right to left while indexes
are stored from left to right. When there's no more room to store a new one,
we wrap to the r... |
virDomainMemorytuneDefParse(virDomainDefPtr def,
xmlXPathContextPtr ctxt,
xmlNodePtr node,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
virDomainResctrlDefPtr resctrl = NULL;
virDomainResctrlDefPtr newresctrl = NU... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 116,333,075,365,644,250,000,000,000,000,000,000,000 | 80 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
void mobi_buffer_addzeros(MOBIBuffer *buf, const size_t count) {
if (buf->offset + count > buf->maxlen) {
debug_print("%s", "Buffer full\n");
buf->error = MOBI_BUFFER_END;
return;
}
memset(buf->data + buf->offset, 0, count);
buf->offset += count;
} | 0 | [
"CWE-787"
] | libmobi | ab5bf0e37e540eac682a14e628853b918626e72b | 17,644,092,728,467,606,000,000,000,000,000,000,000 | 9 | fix oob write bug inside libmobi |
rb_str_new(const char *ptr, long len)
{
return str_new(rb_cString, ptr, len);
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 36,682,198,730,466,394,000,000,000,000,000,000,000 | 4 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task)
{
spin_lock_bh(&queue->lock);
rpc_wake_up_task_queue_locked(queue, task);
spin_unlock_bh(&queue->lock);
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 333,354,992,185,991,140,000,000,000,000,000,000,000 | 6 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
struct vfsmount *mntget(struct vfsmount *mnt)
{
if (mnt)
mnt_add_count(real_mount(mnt), 1);
return mnt;
} | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 100,446,806,750,913,980,000,000,000,000,000,000,000 | 6 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
static void ucma_copy_ib_route(struct rdma_ucm_query_route_resp *resp,
struct rdma_route *route)
{
struct rdma_dev_addr *dev_addr;
resp->num_paths = route->num_paths;
switch (route->num_paths) {
case 0:
dev_addr = &route->addr.dev_addr;
rdma_addr_get_dgid(dev_addr,
(union ib_gid *) &resp->ib_r... | 0 | [
"CWE-416",
"CWE-703"
] | linux | cb2595c1393b4a5211534e6f0a0fbad369e21ad8 | 55,160,034,453,479,040,000,000,000,000,000,000,000 | 27 | infiniband: fix a possible use-after-free bug
ucma_process_join() will free the new allocated "mc" struct,
if there is any error after that, especially the copy_to_user().
But in parallel, ucma_leave_multicast() could find this "mc"
through idr_find() before ucma_process_join() frees it, since it
is already published... |
static int uncached_access(struct file *file, phys_addr_t addr)
{
#if defined(CONFIG_IA64)
/*
* On ia64, we ignore O_DSYNC because we cannot tolerate memory
* attribute aliases.
*/
return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
#elif defined(CONFIG_MIPS)
{
extern int __uncached_access(struct file *file,... | 0 | [
"CWE-200",
"CWE-732"
] | linux | a4866aa812518ed1a37d8ea0c881dc946409de94 | 93,990,135,295,059,620,000,000,000,000,000,000,000 | 26 | mm: Tighten x86 /dev/mem with zeroing reads
Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is
disallowed. However, on x86, the first 1MB was always allowed for BIOS
and similar things, regardless of it actually being System RAM. It was
possible for heap to end up getting allocated in low 1MB RAM, and ... |
static void print_usage(void)
{
printf("mosquitto version %s\n\n", VERSION);
printf("mosquitto is an MQTT v3.1.1 broker.\n\n");
printf("Usage: mosquitto [-c config_file] [-d] [-h] [-p port]\n\n");
printf(" -c : specify the broker config file.\n");
printf(" -d : put the broker into the background after starting.\n"... | 0 | [
"CWE-200",
"CWE-732",
"CWE-254"
] | mosquitto | 9097577b49b7fdcf45d30975976dd93808ccc0c4 | 146,861,711,544,012,330,000,000,000,000,000,000,000 | 14 | Fix acl_file being ignore for default listener if with per_listener_settings
Close #1073. Thanks to Jef Driesen.
Bug: https://github.com/eclipse/mosquitto/issues/1073 |
link_info_got_data (NautilusDirectory *directory,
NautilusFile *file,
gboolean result,
goffset bytes_read,
char *file_contents)
{
char *link_uri, *uri, *name;
GIcon *icon;
gboolean is_launc... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 159,979,499,046,364,010,000,000,000,000,000,000,000 | 47 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
int exptrim(struct nbd_request* req, CLIENT* client) {
#if HAVE_FALLOC_PH
FILE_INFO prev = g_array_index(client->export, FILE_INFO, 0);
FILE_INFO cur = prev;
int i = 1;
/* We're running on a system that supports the
* FALLOC_FL_PUNCH_HOLE option to re-sparsify a file */
do {
if(i<client->export->len) {
cur ... | 0 | [
"CWE-399",
"CWE-310"
] | nbd | 741495cb08503fd32a9d22648e63b64390c601f4 | 93,709,370,456,060,520,000,000,000,000,000,000,000 | 24 | nbd-server: handle modern-style negotiation in a child process
Previously, the modern style negotiation was carried out in the root
server (listener) process before forking the actual client handler. This
made it possible for a malfunctioning or evil client to terminate the
root process simply by querying a non-existe... |
BSONObj spec() {
return BSON("$or" << BSON_ARRAY(true << true));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 116,650,241,484,021,990,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
static int etm_event_add(struct perf_event *event, int mode)
{
int ret = 0;
struct hw_perf_event *hwc = &event->hw;
if (mode & PERF_EF_START) {
etm_event_start(event, 0);
if (hwc->state & PERF_HES_STOPPED)
ret = -EINVAL;
} else {
hwc->state = PERF_HES_STOPPED;
}
return ret;
} | 0 | [
"CWE-20",
"CWE-476"
] | linux | f09444639099584bc4784dfcd85ada67c6f33e0f | 204,151,143,161,343,430,000,000,000,000,000,000,000 | 15 | coresight: fix kernel panic caused by invalid CPU
Commit d52c9750f150 ("coresight: reset "enable_sink" flag when need be")
caused a kernel panic because of the using of an invalid value: after
'for_each_cpu(cpu, mask)', value of local variable 'cpu' become invalid,
causes following 'cpu_to_node' access invalid memory ... |
static void ion_buffer_get(struct ion_buffer *buffer)
{
kref_get(&buffer->ref);
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 210,690,162,769,043,100,000,000,000,000,000,000,000 | 4 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
GF_ISOSample *gf_isom_get_sample_info(GF_ISOFile *the_file, u32 trackNumber, u32 sampleNumber, u32 *sampleDescriptionIndex, u64 *data_offset)
{
return gf_isom_get_sample_info_ex(the_file, trackNumber, sampleNumber, sampleDescriptionIndex, data_offset, NULL);
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 201,944,551,477,527,800,000,000,000,000,000,000,000 | 4 | fixed #1706 |
int jpc_pi_addpchg(jpc_pi_t *pi, jpc_pocpchg_t *pchg)
{
return jpc_pchglist_insert(pi->pchglist, -1, pchg);
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 236,699,352,132,443,720,000,000,000,000,000,000,000 | 4 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
fiber_switch_context(mrb_state *mrb, struct mrb_context *c)
{
c->status = MRB_FIBER_RUNNING;
mrb->c = c;
} | 0 | [
"CWE-125",
"CWE-787"
] | mruby | 778500563a9f7ceba996937dc886bd8cde29b42b | 193,819,014,918,593,000,000,000,000,000,000,000,000 | 5 | Extend stack when pushing arguments that does not fit in; fix #4038 |
int ha_partition::check_for_upgrade(HA_CHECK_OPT *check_opt)
{
int error= HA_ADMIN_NEEDS_CHECK;
DBUG_ENTER("ha_partition::check_for_upgrade");
/*
This is called even without FOR UPGRADE,
if the .frm version is lower than the current version.
In that case return that it needs checking!
*/
if (!(ch... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 248,448,246,188,572,450,000,000,000,000,000,000,000 | 113 | 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 ... |
int netdev_class_create_file_ns(const struct class_attribute *class_attr,
const void *ns)
{
return class_create_file_ns(&net_class, class_attr, ns); | 0 | [
"CWE-401"
] | linux | 895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab | 79,567,198,861,908,410,000,000,000,000,000,000,000 | 5 | net-sysfs: Fix mem leak in netdev_register_kobject
syzkaller report this:
BUG: memory leak
unreferenced object 0xffff88837a71a500 (size 256):
comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ... |
CURLcode _my_setopt(CURL *curl, const char *name, CURLoption tag, ...)
{
va_list arg;
CURLcode ret;
char *bufp;
char value[256];
bool remark=FALSE;
va_start(arg, tag);
if(tag < CURLOPTTYPE_OBJECTPOINT) {
long lval = va_arg(arg, long);
snprintf(value, sizeof(value), "%ld", lval);
ret = curl_e... | 0 | [
"CWE-125"
] | curl | 70b1900dd13d16f2e83f571407a614541d5ac9ba | 266,717,204,719,969,650,000,000,000,000,000,000,000 | 61 | 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal
with the cases when excessively long words were used in the string to chop
up. |
specialRequestHandler(int status,
FdEventHandlerPtr event, StreamRequestPtr srequest)
{
SpecialRequestPtr request = srequest->data;
int rc;
int killed = 0;
if(status < 0) {
kill(request->pid, SIGTERM);
killed = 1;
request->object->flags &= ~OBJECT_INPROGRE... | 0 | [
"CWE-617"
] | polipo | 0e2b44af619e46e365971ea52b97457bc0778cd3 | 158,842,614,436,047,450,000,000,000,000,000,000,000 | 79 | Try to read POST requests to local configuration interface correctly. |
**/
operator CImg<T>*() {
return _data; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 317,212,155,913,937,700,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
{
if(pszBindAddr != NULL) {
free(pszBindAddr);
pszBindAddr = NULL;
}
if(udpLstnSocks != NULL) {
net.closeUDPListenSockets(udpLstnSocks);
udpLstnSocks = NULL;
}
return RS_RET_OK;
} | 0 | [] | rsyslog | afdccceefa30306cf720a27efd5a29bcc5a916c9 | 303,548,094,090,320,930,000,000,000,000,000,000,000 | 12 | security fix: imudp emitted a message when a non-permitted sender...
...tried to send a message to it. This behaviour is operator-configurable.
If enabled, a message was emitted each time. That way an attacker could
effectively fill the disk via this facility. The message is now
emitted only once in a minute (this cur... |
static int create_system_filter(struct trace_subsystem_dir *dir,
struct trace_array *tr,
char *filter_str, struct event_filter **filterp)
{
struct filter_parse_error *pe = NULL;
int err;
err = create_filter_start(filter_str, true, &pe, filterp);
if (!err) {
err = process_system_preds(dir, tr, pe, filter_... | 0 | [
"CWE-400",
"CWE-284",
"CWE-401"
] | linux | 96c5c6e6a5b6db592acae039fed54b5c8844cd35 | 295,804,036,372,317,670,000,000,000,000,000,000,000 | 22 | tracing: Have error path in predicate_parse() free its allocated memory
In predicate_parse, there is an error path that is not going to
out_free instead it returns directly which leads to a memory leak.
Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <nav... |
GF_Err stbl_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_write_header(s, bs);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 127,494,275,874,681,250,000,000,000,000,000,000,000 | 4 | fixed #1587 |
Get end date.
*/
PHP_METHOD(DatePeriod, getEndDate)
{
php_period_obj *dpobj;
php_date_obj *dateobj;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
dpobj = (php_period_obj *)zend_object_store_get_object(getThis() TSRMLS_CC);
php_date_i... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 216,870,851,068,425,970,000,000,000,000,000,000,000 | 22 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
const std::vector<int32>& sorted_result() {
auto comparator = [this](int32 a, int32 b) { return compare_fun(a, b); };
if (container_.size() <= k_) {
// Note: due to the way we defined compare_fun (see comments for that
// function) std::sort puts the indices from container_ in decreasing
// ... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 238,927,915,815,874,330,000,000,000,000,000,000,000 | 13 | [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... |
static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
{
struct hso_serial *serial = tty->driver_data;
unsigned long flags;
if (old)
hso_dbg(0x16, "Termios called with: cflags new[%d] - old[%d]\n",
tty->termios.c_cflag, old->c_cflag);
/* the actual setup */
spin_lock_irqsave(&seria... | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 119,764,219,775,044,970,000,000,000,000,000,000,000 | 19 | USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
The function hso_probe reads if_num from the USB device (as an u8) and uses
it without a length check to index an array, resulting in an OOB memory read
in hso_probe or hso_get_config_data.
Add a length check for both locations and updated hso_probe to ... |
SpoolssSetPrinterDataEx_q(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep _U_)
{
char *key_name, *value_name;
guint32 max_len;
proto_item *hidden_item;
hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
PROTO_ITEM_SET_HID... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 327,839,801,819,907,760,000,000,000,000,000,000,000 | 46 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{
DBUG_ASSERT(sane());
bool res= m_value.to_TIME(thd, ltime, fuzzydate);
DBUG_ASSERT(!res);
return null_value || res;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 176,628,638,770,881,500,000,000,000,000,000,000,000 | 7 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
readHeaderMemTiff(const l_uint8 *cdata,
size_t size,
l_int32 n,
l_int32 *pw,
l_int32 *ph,
l_int32 *pbps,
l_int32 *pspp,
l_int32 *pres,
... | 0 | [
"CWE-125"
] | leptonica | 5ba34b1fe741d69d43a6c8cf767756997eadd87c | 87,908,314,531,619,900,000,000,000,000,000,000,000 | 45 | Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream
* Increase scanline buffer for reading gray+alpha and converting to RGBA |
static void add_hfyu_left_prediction_bgr32_c(uint8_t *dst, const uint8_t *src, int w, int *red, int *green, int *blue, int *alpha){
int i;
int r,g,b,a;
r= *red;
g= *green;
b= *blue;
a= *alpha;
for(i=0; i<w; i++){
b+= src[4*i+B];
g+= src[4*i+G];
r+= src[4*i+R];
... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 104,396,191,581,071,780,000,000,000,000,000,000,000 | 25 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
RList *r_bin_ne_get_symbols(r_bin_ne_obj_t *bin) {
RBinSymbol *sym;
ut16 off = bin->ne_header->ResidNamTable + bin->header_offset;
RList *symbols = r_list_newf (free);
if (!symbols) {
return NULL;
}
RList *entries = r_bin_ne_get_entrypoints (bin);
bool resident = true, first = true;
while (true) {
ut8 sz = ... | 1 | [
"CWE-476"
] | radare2 | 18d1d064bf599a255d55f09fca3104776fc34a67 | 303,642,458,246,225,760,000,000,000,000,000,000,000 | 72 | Fix null deref in the ne parser ##crash
* Reported by @hmsec via huntr.dev
* Reproducer: nepoc00
* BountyID: bfeb8fb8-644d-4587-80d4-cb704c404013 |
static int create_rq(struct mlx5_ib_rwq *rwq, struct ib_pd *pd,
struct ib_wq_init_attr *init_attr)
{
struct mlx5_ib_dev *dev;
int has_net_offloads;
__be64 *rq_pas0;
void *in;
void *rqc;
void *wq;
int inlen;
int err;
dev = to_mdev(pd->device);
inlen = MLX5_ST_SZ_BYTES(create_rq_in) + sizeof(u64) * r... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 203,074,057,194,655,620,000,000,000,000,000,000,000 | 98 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
static void decrement_badcount(e2fsck_t ctx, blk64_t block,
struct dup_cluster *p)
{
p->num_bad--;
if (p->num_bad <= 0 ||
(p->num_bad == 1 && !check_if_fs_block(ctx, block))) {
if (check_if_fs_cluster(ctx, EXT2FS_B2C(ctx->fs, block)))
return;
ext2fs_unmark_block_bitmap2(ctx->block_dup_map, block... | 0 | [
"CWE-787"
] | e2fsprogs | 71ba13755337e19c9a826dfc874562a36e1b24d3 | 304,839,514,117,993,570,000,000,000,000,000,000,000 | 11 | e2fsck: don't try to rehash a deleted directory
If directory has been deleted in pass1[bcd] processing, then we
shouldn't try to rehash the directory in pass 3a when we try to
rehash/reoptimize directories.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> |
static void tg3_rss_init_dflt_indir_tbl(struct tg3 *tp, u32 qcnt)
{
int i;
for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
tp->rss_ind_tbl[i] = ethtool_rxfh_indir_default(i, qcnt);
} | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 59,889,110,347,098,920,000,000,000,000,000,000,000 | 7 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
bool Item_func_abs::fix_length_and_dec()
{
if (Item_func_num1::fix_length_and_dec())
return TRUE;
unsigned_flag= args[0]->unsigned_flag;
return FALSE;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 258,806,937,060,924,880,000,000,000,000,000,000,000 | 7 | 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... |
static int coroutine_fn bdrv_mirror_top_flush(BlockDriverState *bs)
{
if (bs->backing == NULL) {
/* we can be here after failed bdrv_append in mirror_start_job */
return 0;
}
return bdrv_co_flush(bs->backing->bs);
} | 0 | [
"CWE-476"
] | qemu | 66fed30c9cd11854fc878a4eceb507e915d7c9cd | 291,286,505,425,844,960,000,000,000,000,000,000,000 | 8 | block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()
In mirror_iteration() we call mirror_wait_on_conflicts() with
`self` parameter set to NULL.
Starting from commit d44dae1a7c we dereference `self` pointer in
mirror_wait_on_conflicts() without checks if it is not NULL.
Backtrace:
Program termi... |
static inline time_t FileTimeToUnixTime(const FILETIME FileTime)
{
__int64 UnixTime;
long *nsec = NULL;
SYSTEMTIME SystemTime;
FileTimeToSystemTime(&FileTime, &SystemTime);
UnixTime = ((__int64)FileTime.dwHighDateTime << 32) +
FileTime.dwLowDateTime;
UnixTime -= (SECS_BETWEEN_EPOCHS * SECS_TO_100NS);
if (nse... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 221,912,059,926,709,100,000,000,000,000,000,000,000 | 23 | Fix for bug #72513 |
static inline void net_dmaengine_put(void)
{
} | 1 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 232,294,890,507,107,440,000,000,000,000,000,000,000 | 3 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static inline const char *GetDPXProperty(const Image *image,
const char *property)
{
const char
*value;
value=GetImageArtifact(image,property);
if (value != (const char *) NULL)
return(value);
return(GetImageProperty(image,property));
} | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 114,624,271,274,206,780,000,000,000,000,000,000,000 | 11 | Fix ultra rare but potential memory-leak |
static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
{
struct cfs_bandwidth *cfs_b =
container_of(timer, struct cfs_bandwidth, period_timer);
unsigned long flags;
int overrun;
int idle = 0;
int count = 0;
raw_spin_lock_irqsave(&cfs_b->lock, flags);
for (;;) {
overrun = hrtimer_forward_n... | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 60,847,352,296,982,610,000,000,000,000,000,000,000 | 45 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
static void end_io_acct(struct dm_io *io)
{
struct mapped_device *md = io->md;
struct bio *bio = io->bio;
unsigned long duration = jiffies - io->start_time;
int pending;
int rw = bio_data_dir(bio);
generic_end_io_acct(md->queue, rw, &dm_disk(md)->part0, io->start_time);
if (unlikely(dm_stats_used(&md->stats)))... | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 317,049,641,270,411,500,000,000,000,000,000,000,000 | 27 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
static void b43_fw_cb(const struct firmware *firmware, void *context)
{
struct b43_request_fw_context *ctx = context;
ctx->blob = firmware;
complete(&ctx->fw_load_complete);
} | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 36,490,226,396,550,930,000,000,000,000,000,000,000 | 7 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... |
bool ChunkedCopy(mkvparser::IMkvReader* source, mkvmuxer::IMkvWriter* dst,
int64_t start, int64_t size) {
// TODO(vigneshv): Check if this is a reasonable value.
const uint32_t kBufSize = 2048;
uint8_t* buf = new uint8_t[kBufSize];
int64_t offset = start;
while (size > 0) {
const int64_t ... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 220,168,185,180,572,820,000,000,000,000,000,000,000 | 17 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
_copyReassignOwnedStmt(const ReassignOwnedStmt *from)
{
ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
COPY_NODE_FIELD(roles);
COPY_STRING_FIELD(newrole);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 203,769,558,471,778,150,000,000,000,000,000,000,000 | 9 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void ClientHandler::signal_write() { conn_.wlimit.startw(); } | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 207,907,019,161,784,730,000,000,000,000,000,000,000 | 1 | Don't read too greedily |
prepare_special_transport (ccid_driver_t handle)
{
assert (!handle->id_vendor);
handle->nonnull_nad = 0;
handle->auto_ifsd = 0;
handle->max_ifsd = 32;
handle->ifsd = 0;
handle->has_pinpad = 0;
handle->apdu_level = 0;
switch (handle->id_product)
{
case TRANSPORT_CM4040:
DEBUGOUT ("setting ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 336,607,625,581,988,650,000,000,000,000,000,000,000 | 20 | 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 ... |
t_go_generator(t_program* program,
const std::map<std::string, std::string>& parsed_options,
const std::string& option_string)
: t_generator(program) {
(void)option_string;
std::map<std::string, std::string>::const_iterator iter;
gen_thrift_import_ = DEFAULT_THRIFT_... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 314,134,849,284,768,800,000,000,000,000,000,000,000 | 31 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
policy_summarize(smartlist_t *policy)
{
smartlist_t *summary = policy_summary_create();
smartlist_t *accepts, *rejects;
int i, last, start_prt;
size_t accepts_len, rejects_len, shorter_len, final_size;
char *accepts_str = NULL, *rejects_str = NULL, *shorter_str, *result;
const char *prefix;
tor_assert(po... | 1 | [
"CWE-119"
] | tor | 43414eb98821d3b5c6c65181d7545ce938f82c8e | 269,460,469,369,871,270,000,000,000,000,000,000,000 | 108 | Fix bounds-checking in policy_summarize
Found by piebeer. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.