func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void free_http_req_rules(struct list *r) {
struct http_req_rule *tr, *pr;
list_for_each_entry_safe(pr, tr, r, list) {
LIST_DEL(&pr->list);
if (pr->action == HTTP_REQ_ACT_AUTH)
free(pr->arg.auth.realm);
free(pr);
}
} | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 309,125,466,764,980,670,000,000,000,000,000,000,000 | 11 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
static int process_all_tables_in_db(char *database)
{
MYSQL_RES *res;
MYSQL_ROW row;
uint num_columns;
LINT_INIT(res);
if (use_db(database))
return 1;
if ((mysql_query(sock, "SHOW /*!50002 FULL*/ TABLES") &&
mysql_query(sock, "SHOW TABLES")) ||
!(res= mysql_store_result(sock)))
{
my_... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 296,241,069,683,562,500,000,000,000,000,000,000,000 | 68 | 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... |
_warc_skip(struct archive_read *a)
{
struct warc_s *w = a->format->data;
__archive_read_consume(a, w->cntlen + 4U/*\r\n\r\n separator*/);
w->cntlen = 0U;
w->cntoff = 0U;
return (ARCHIVE_OK);
} | 0 | [
"CWE-415",
"CWE-787"
] | libarchive | 9c84b7426660c09c18cc349f6d70b5f8168b5680 | 205,992,419,703,010,840,000,000,000,000,000,000,000 | 9 | warc: consume data once read
The warc decoder only used read ahead, it wouldn't actually consume
data that had previously been printed. This means that if you specify
an invalid content length, it will just reprint the same data over
and over and over again until it hits the desired length.
This means that a WARC res... |
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
uint64_t l = m->value.q;
uint64_t v;
float fl, fv;
double dl, dv;
int matched;
union VALUETYPE *p = &ms->ms_value;
switch (m->type) {
case FILE_BYTE:
v = p->b;
break;
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
v = p->h;
br... | 0 | [
"CWE-787"
] | file | d65781527c8134a1202b2649695d48d5701ac60b | 55,371,434,120,083,850,000,000,000,000,000,000,000 | 329 | PR/62: spinpx: limit size of file_printable. |
void Statement::Work_BeginEach(Baton* baton) {
// Only create the Async object when we're actually going into
// the event loop. This prevents dangling events.
EachBaton* each_baton = static_cast<EachBaton*>(baton);
each_baton->async = new Async(each_baton->stmt, reinterpret_cast<uv_async_cb>(AsyncEach)... | 0 | [] | node-sqlite3 | 593c9d498be2510d286349134537e3bf89401c4a | 181,498,808,454,014,600,000,000,000,000,000,000,000 | 10 | bug: fix segfault of invalid toString() object (#1450)
* bug: verify toString() returns valid data
* test: faulty toString test |
void SSL_set_bio(SSL *s,BIO *rbio,BIO *wbio)
{
/* If the output buffering BIO is still in place, remove it
*/
if (s->bbio != NULL)
{
if (s->wbio == s->bbio)
{
s->wbio=s->wbio->next_bio;
s->bbio->next_bio=NULL;
}
}
if ((s->rbio != NULL) && (s->rbio != rbio))
BIO_free_all(s->rbio);
if ((s->wbio... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 86,461,910,816,766,780,000,000,000,000,000,000,000 | 19 | Add Next Protocol Negotiation. |
static __init int sched_init_debug(void)
{
debugfs_create_file("sched_features", 0644, NULL, NULL,
&sched_feat_fops);
return 0;
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 337,150,368,023,898,500,000,000,000,000,000,000,000 | 7 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
static void __init of_unittest_platform_populate(void)
{
int irq, rc;
struct device_node *np, *child, *grandchild;
struct platform_device *pdev, *test_bus;
const struct of_device_id match[] = {
{ .compatible = "test-device", },
{}
};
np = of_find_node_by_path("/testcase-data");
of_platform_default_populate(... | 0 | [
"CWE-401"
] | linux | e13de8fe0d6a51341671bbe384826d527afe8d44 | 195,221,263,369,025,930,000,000,000,000,000,000,000 | 74 | of: unittest: fix memory leak in unittest_data_add
In unittest_data_add, a copy buffer is created via kmemdup. This buffer
is leaked if of_fdt_unflatten_tree fails. The release for the
unittest_data buffer is added.
Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
Signed-off-by: Navid ... |
TEST_CASE("Definition duplicates test", "[general]")
{
parser parser(R"(
A <- ''
A <- ''
)");
REQUIRE(!parser);
} | 1 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 174,567,211,667,921,460,000,000,000,000,000,000,000 | 9 | Fix #122 |
ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
{
USE_OPLINE
zval *var_ptr;
var_ptr = EX_VAR(opline->op1.var);
if (UNEXPECTED(Z_ISREF_P(var_ptr))) {
if (UNEXPECTED(Z_REFCOUNT_P(var_ptr) == 1)) {
ZVAL_UNREF(var_ptr);
}
}
ZEND_VM_NEXT_OPCODE();
} | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 236,765,872,969,914,350,000,000,000,000,000,000,000 | 14 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
TEST_F(HttpConnectionManagerConfigTest, UserDefinedSettingsNoCollision) {
const std::string yaml_string = R"EOF(
codec_type: http2
stat_prefix: my_stat_prefix
route_config:
virtual_hosts:
- name: default
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: fake_cluster... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 330,297,892,659,771,080,000,000,000,000,000,000,000 | 24 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
R_API bool r_str_isnumber(const char *str) {
if (!str || !*str) {
return false;
}
bool isnum = IS_DIGIT (*str) || *str == '-';
while (isnum && *++str) {
if (!IS_DIGIT (*str)) {
isnum = false;
}
}
return isnum;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 209,502,637,786,527,130,000,000,000,000,000,000,000 | 12 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
MemoryRegion *mr, Error **errp)
{
return qemu_ram_alloc_internal(size, size, NULL, host, RAM_PREALLOC, mr,
errp);
} | 0 | [
"CWE-908"
] | qemu | 418ade7849ce7641c0f7333718caf5091a02fd4c | 146,352,255,872,202,440,000,000,000,000,000,000,000 | 6 | softmmu: Always initialize xlat in address_space_translate_for_iotlb
The bug is an uninitialized memory read, along the translate_fail
path, which results in garbage being read from iotlb_to_section,
which can lead to a crash in io_readx/io_writex.
The bug may be fixed by writing any value with zero
in ~TARGET_PAGE_M... |
TEST_F(QueryPlannerTest, AndOfAnd) {
addIndex(BSON("x" << 1));
runQuery(fromjson("{$and: [ {$and: [ {x: 2.5}]}, {x: {$gt: 1}}, {x: {$lt: 3}} ] }"));
ASSERT_EQUALS(getNumSolutions(), 2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: null, node: {ixscan: ... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 92,957,565,637,392,100,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
repodata_free_dircache(Repodata *data)
{
data->dircache = solv_free(data->dircache);
} | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 276,674,186,516,462,670,000,000,000,000,000,000,000 | 4 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
bool ovs_nla_get_ufid(struct sw_flow_id *sfid, const struct nlattr *attr,
bool log)
{
sfid->ufid_len = get_ufid_len(attr, log);
if (sfid->ufid_len)
memcpy(sfid->ufid, nla_data(attr), sfid->ufid_len);
return sfid->ufid_len;
} | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 25,338,996,554,783,130,000,000,000,000,000,000,000 | 9 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ThrowPCXException(severity,tag) \
{ \
if (scanline != (unsigned char *) NULL) \
scanline=(unsigned char *) RelinquishMagickMemory(scanline); \
if (pixel_info != (MemoryInfo *) NULL) \
pixel_info=RelinquishVirtualMemor... | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 3,538,462,241,710,490,000,000,000,000,000,000,000 | 504 | Fix ultra rare but potential memory-leak |
inline StreamListener::~StreamListener() {
if (stream_ != nullptr)
stream_->RemoveStreamListener(this);
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 214,539,541,975,339,600,000,000,000,000,000,000,000 | 4 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
unsigned long param)
{
int drive = (long)bdev->bd_disk->private_data;
int type = ITYPE(UDRS->fd_device);
int i;
int ret;
int size;
union inparam {
struct floppy_struct g; /* geometry */
struct format_descr f;
struct ... | 1 | [
"CWE-362"
] | linux | a0c80efe5956ccce9fe7ae5c78542578c07bc20a | 237,494,062,442,199,300,000,000,000,000,000,000,000 | 175 | floppy: fix lock_fdc() signal handling
floppy_revalidate() doesn't perform any error handling on lock_fdc()
result. lock_fdc() might actually be interrupted by a signal (it waits for
fdc becoming non-busy interruptibly). In such case, floppy_revalidate()
proceeds as if it had claimed the lock, but it fact it doesn't.
... |
rt__valid_civil_p(VALUE y, VALUE m, VALUE d, VALUE sg)
{
VALUE nth, rjd2;
int ry, rm, rd, rjd, ns;
if (!valid_civil_p(y, NUM2INT(m), NUM2INT(d), NUM2DBL(sg),
&nth, &ry,
&rm, &rd, &rjd,
&ns))
return Qnil;
encode_jd(nth, rjd, &rjd2);
return rjd2;
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 164,003,928,467,003,790,000,000,000,000,000,000,000 | 13 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
base::ProcessId WebContents::GetOSProcessID() const {
base::ProcessHandle process_handle =
web_contents()->GetMainFrame()->GetProcess()->GetProcess().Handle();
return base::GetProcId(process_handle);
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 240,693,997,014,087,330,000,000,000,000,000,000,000 | 5 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
f_prevnonblank(typval_T *argvars, typval_T *rettv)
{
linenr_T lnum;
lnum = tv_get_lnum(argvars);
if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count)
lnum = 0;
else
while (lnum >= 1 && *skipwhite(ml_get(lnum)) == NUL)
--lnum;
rettv->vval.v_number = lnum;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 297,276,778,991,003,300,000,000,000,000,000,000,000 | 12 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
ex_equal(exarg_T *eap)
{
smsg("%ld", (long)eap->line2);
ex_may_print(eap);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 113,930,732,242,390,570,000,000,000,000,000,000,000 | 5 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
server_set_mixmode(struct xrdp_mod* mod, int mixmode)
{
struct xrdp_painter* p;
p = (struct xrdp_painter*)(mod->painter);
if (p == 0)
{
return 0;
}
p->mix_mode = mixmode;
return 0;
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 183,013,826,733,766,200,000,000,000,000,000,000,000 | 12 | move temp files from /tmp to /tmp/.xrdp |
static int vvalue_tvb_vector(tvbuff_t *tvb, int offset, struct vt_vector *val, struct vtype_data *type)
{
const guint num = tvb_get_letohl(tvb, offset);
return 4 + vvalue_tvb_vector_internal(tvb, offset+4, val, type, num);
} | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 63,114,137,248,975,420,000,000,000,000,000,000,000 | 5 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static void __exit usb_pwc_exit(void)
{
PWC_DEBUG_MODULE("Deregistering driver.\n");
usb_deregister(&pwc_driver);
PWC_INFO("Philips webcam module removed.\n");
} | 0 | [
"CWE-399"
] | linux-2.6 | 85237f202d46d55c1bffe0c5b1aa3ddc0f1dce4d | 228,516,976,162,157,760,000,000,000,000,000,000,000 | 6 | USB: fix DoS in pwc USB video driver
the pwc driver has a disconnect method that waits for user space to
close the device. This opens up an opportunity for a DoS attack,
blocking the USB subsystem and making khubd's task busy wait in
kernel space. This patch shifts freeing resources to close if an opened
device is dis... |
int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len)
{
#if 0
CPUWatchpoint *wp;
int ret = 0;
QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
if (watchpoint_address_matches(wp, addr, TARGET_PAGE_SIZE)) {
ret |= wp->flags;
}
}
return ret;
#endif
retu... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 178,298,338,924,716,140,000,000,000,000,000,000,000 | 15 | Fix crash when mapping a big memory and calling uc_close |
static bool ad5755_is_voltage_mode(enum ad5755_mode mode)
{
switch (mode) {
case AD5755_MODE_VOLTAGE_0V_5V:
case AD5755_MODE_VOLTAGE_0V_10V:
case AD5755_MODE_VOLTAGE_PLUSMINUS_5V:
case AD5755_MODE_VOLTAGE_PLUSMINUS_10V:
return true;
default:
return false;
}
} | 0 | [
"CWE-787"
] | linux | 9d47964bfd471f0dd4c89f28556aec68bffa0020 | 66,804,420,455,801,090,000,000,000,000,000,000,000 | 12 | iio: ad5755: fix off-by-one on devnr limit check
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
compariso... |
rsvg_filter_primitive_offset_render (RsvgFilterPrimitive * self, RsvgFilterContext * ctx)
{
guchar ch;
gint x, y;
gint rowstride, height, width;
RsvgIRect boundarys;
guchar *in_pixels;
guchar *output_pixels;
RsvgFilterPrimitiveOutput out;
RsvgFilterPrimitiveOffset *upself;
cairo_s... | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 287,067,383,456,316,930,000,000,000,000,000,000,000 | 75 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = (void __user *)arg;
int r;
union {
struct kvm_lapic_state *lapic;
struct kvm_xsave *xsave;
struct kvm_xcrs *xcrs;
void *buffer;
} u;
u.buffer = NULL;
s... | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 101,214,359,560,341,760,000,000,000,000,000,000,000 | 288 | 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 __bufsize_v4l2_format(struct v4l2_format32 __user *up, u32 *size)
{
u32 type;
if (get_user(type, &up->type))
return -EFAULT;
switch (type) {
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: {
u32 clipcount;
if (get_user(clipcount, &up->fmt.win.clipcount))
return -EF... | 0 | [
"CWE-787"
] | linux | a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a | 59,279,112,526,754,020,000,000,000,000,000,000,000 | 24 | media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit
equivalent. It converts 32-bit data structures into its 64-bit
equivalents and needs to provide the data to the 64-bit ioctl in user
space memory which is commonly allocated using
compat... |
static inline unsigned long group_faults_shared(struct numa_group *ng)
{
unsigned long faults = 0;
int node;
for_each_online_node(node) {
faults += ng->faults[task_faults_idx(NUMA_MEM, node, 0)];
}
return faults;
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 280,031,936,816,424,220,000,000,000,000,000,000,000 | 11 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
static unsigned char *get_mcs(int bitrate)
{
struct yam_mcs *p;
p = yam_data;
while (p) {
if (p->bitrate == bitrate)
return p->bits;
p = p->next;
}
/* Load predefined mcs data */
switch (bitrate) {
case 1200:
/* setting predef as YAM_1200 for loading predef 1200 mcs */
return add_mcs(NULL, bitrate, ... | 0 | [
"CWE-401"
] | linux | 29eb31542787e1019208a2e1047bb7c76c069536 | 133,793,977,531,995,070,000,000,000,000,000,000,000 | 21 | yam: fix a memory leak in yam_siocdevprivate()
ym needs to be free when ym->cmd != SIOCYAMSMCS.
Fixes: 0781168e23a2 ("yam: fix a missing-check bug")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int ptrace_setoptions(struct task_struct *child, unsigned long data)
{
unsigned flags;
int ret;
ret = check_ptrace_options(data);
if (ret)
return ret;
/* Avoid intermediate state when all opts are cleared */
flags = child->ptrace;
flags &= ~(PTRACE_O_MASK << PT_OPT_FLAG_SHIFT);
flags |= (data << PT_O... | 0 | [
"CWE-276",
"CWE-703",
"CWE-863"
] | linux | ee1fee900537b5d9560e9f937402de5ddc8412f3 | 315,801,124,649,429,600,000,000,000,000,000,000,000 | 17 | ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
Setting PTRACE_O_SUSPEND_SECCOMP is supposed to be a highly privileged
operation because it allows the tracee to completely bypass all seccomp
filters on kernels with CONFIG_CHECKPOINT_RESTORE=y. It is only supposed to
be settable by a process with glob... |
gnome_desktop_thumbnail_factory_class_init (GnomeDesktopThumbnailFactoryClass *class)
{
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (class);
gobject_class->finalize = gnome_desktop_thumbnail_factory_finalize;
g_type_class_add_private (class, sizeof (GnomeDesktopThumbnailFactoryPrivate));
} | 0 | [] | nautilus | 2ddba428ef2b13d0620bd599c3635b9c11044659 | 226,786,193,330,057,600,000,000,000,000,000,000,000 | 10 | Update gnome-desktop code
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/987 |
static int op64_get_current_rxslot(struct b43_dmaring *ring)
{
u32 val;
val = b43_dma_read(ring, B43_DMA64_RXSTATUS);
val &= B43_DMA64_RXSTATDPTR;
return (val / sizeof(struct b43_dmadesc64));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 279,657,630,056,352,040,000,000,000,000,000,000,000 | 9 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable)
{
struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn);
return gfn_to_hva_memslot_prot(slot, gfn, writable);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 229,158,219,027,242,020,000,000,000,000,000,000,000 | 6 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int FUZ_mallocTests(unsigned seed, double compressibility, unsigned part)
{
(void)seed; (void)compressibility; (void)part;
return 0;
} | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 331,202,986,874,979,470,000,000,000,000,000,000,000 | 5 | fixed T36302429 |
bool LibarchivePlugin::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
Q_UNUSED(files)
Q_UNUSED(destination)
Q_UNUSED(options)
return false;
} | 0 | [
"CWE-59",
"CWE-61"
] | ark | 8bf8c5ef07b0ac5e914d752681e470dea403a5bd | 252,587,313,096,233,900,000,000,000,000,000,000,000 | 7 | Pass the ARCHIVE_EXTRACT_SECURE_SYMLINKS flag to libarchive
There are archive types which allow to first create a symlink and then
later on dereference it. If the symlink points outside of the archive,
this results in writing outside of the destination directory.
With the ARCHIVE_EXTRACT_SECURE_SYMLINKS option set, l... |
schemeToProxy(int scheme)
{
ParsedURL *pu = NULL; /* for gcc */
switch (scheme) {
case SCM_HTTP:
pu = &HTTP_proxy_parsed;
break;
#ifdef USE_SSL
case SCM_HTTPS:
pu = &HTTPS_proxy_parsed;
break;
#endif
case SCM_FTP:
pu = &FTP_proxy_parsed;
break;
#ifdef USE_GOPHER
case SCM_GOPHER:
pu = &GOP... | 0 | [
"CWE-119"
] | w3m | ba9d78faeba9024c3e8840579c3b0e959ae2cb0f | 180,064,575,614,410,070,000,000,000,000,000,000,000 | 27 | Prevent global-buffer-overflow in parseURL()
Bug-Debian: https://github.com/tats/w3m/issues/41 |
static int econet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;
struct sock *sk;
struct econet_sock *eo;
/*
* Check legality
*/
if (addr_len < sizeof(struct sockaddr_ec) ||
sec->sec_family != AF_ECONET)
return -EINVAL;
mutex_... | 0 | [
"CWE-200"
] | linux-2.6 | 80922bbb12a105f858a8f0abb879cb4302d0ecaa | 72,473,236,791,753,190,000,000,000,000,000,000,000 | 28 | econet: Fix econet_getname() leak
econet_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int sc_asn1_encode(sc_context_t *ctx, const struct sc_asn1_entry *asn1,
u8 **ptr, size_t *size)
{
return asn1_encode(ctx, asn1, ptr, size, 0);
} | 0 | [
"CWE-119",
"CWE-787"
] | OpenSC | 412a6142c27a5973c61ba540e33cdc22d5608e68 | 26,569,893,839,896,066,000,000,000,000,000,000,000 | 5 | fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz |
static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
int closing, int tx_ring)
{
struct pgv *pg_vec = NULL;
struct packet_sock *po = pkt_sk(sk);
int was_running, order = 0;
struct packet_ring_buffer *rb;
struct sk_buff_head *rb_queue;
__be16 num;
int err = -EINVAL;
/* Added to avoid minimal... | 1 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 106,097,602,093,951,040,000,000,000,000,000,000,000 | 150 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
static int query_formats(AVFilterContext *ctx)
{
AVFilterFormats *formats;
enum AVPixelFormat pix_fmt;
int ret;
/** accept any input pixel format that is not hardware accelerated, not
* a bitstream format, and does not have vertically sub-sampled chroma */
if (ctx->inputs[0]) {
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 232,829,042,140,428,770,000,000,000,000,000,000,000 | 26 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
int EmitCIEBasedABC(cmsIOHANDLER* m, cmsFloat64Number* Matrix, cmsToneCurve** CurveSet, cmsCIEXYZ* BlackPoint)
{
int i;
_cmsIOPrintf(m, "[ /CIEBasedABC\n");
_cmsIOPrintf(m, "<<\n");
_cmsIOPrintf(m, "/DecodeABC [ ");
EmitNGamma(m, 3, CurveSet);
_cmsIOPrintf(m, "]\n");
_cmsIOPrintf(m, "/Ma... | 0 | [] | Little-CMS | d1fcbdc6bcdd50432ae95e9c6f83e79338f87690 | 213,531,686,868,548,170,000,000,000,000,000,000,000 | 35 | Buffer overflow fix.
BuildColorantList() concatenates 32 bit data in each iteration. The max value of iteration can be 16.
Thus buffer overflow can occur with storage of 128 bytes. It would need 512 bytes in worst case. |
static void perf_event_bpf_emit_ksymbols(struct bpf_prog *prog,
enum perf_bpf_event_type type)
{
bool unregister = type == PERF_BPF_EVENT_PROG_UNLOAD;
int i;
if (prog->aux->func_cnt == 0) {
perf_event_ksymbol(PERF_RECORD_KSYMBOL_TYPE_BPF,
(u64)(unsigned long)prog->bpf_func,
prog->jited_len, un... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 272,269,716,485,332,200,000,000,000,000,000,000,000 | 23 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
static void idr(H264Context *h)
{
int i;
ff_h264_remove_all_refs(h);
h->prev_frame_num =
h->prev_frame_num_offset = 0;
h->prev_poc_msb = 1<<16;
h->prev_poc_lsb = 0;
for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
h->last_pocs[i] = INT_MIN;
} | 0 | [
"CWE-703"
] | FFmpeg | e8714f6f93d1a32f4e4655209960afcf4c185214 | 95,890,470,114,770,750,000,000,000,000,000,000,000 | 11 | avcodec/h264: Clear delayed_pic on deallocation
Fixes use of freed memory
Fixes: case5_av_frame_copy_props.mp4
Found-by: Michal Zalewski <lcamtuf@coredump.cx>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
EXPORTED int check_precond(struct transaction_t *txn, const void *data,
const char *etag, time_t lastmod)
{
const char *lock_token = NULL;
unsigned locked = 0;
hdrcache_t hdrcache = txn->req_hdrs;
const char **hdr;
time_t since;
#ifdef WITH_DAV
struct dav_data *ddata = (struct dav_data *) d... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 258,048,892,209,108,480,000,000,000,000,000,000,000 | 120 | HTTP: don't overrun buffer when parsing strings with sscanf() |
static void plugin_instance_finalize(PluginInstance *plugin)
{
if (plugin->browser_toplevel) {
g_object_unref(plugin->browser_toplevel);
plugin->browser_toplevel = NULL;
}
if (plugin->instance) {
free(plugin->instance);
plugin->instance = NULL;
}
} | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 327,380,973,403,447,640,000,000,000,000,000,000,000 | 11 | Support all the new variables added |
static void ip6_evictor(struct net *net, struct inet6_dev *idev)
{
int evicted;
evicted = inet_frag_evictor(&net->ipv6.frags, &ip6_frags);
if (evicted)
IP6_ADD_STATS_BH(net, idev, IPSTATS_MIB_REASMFAILS, evicted);
} | 0 | [] | linux-2.6 | 70789d7052239992824628db8133de08dc78e593 | 226,767,978,544,525,720,000,000,000,000,000,000,000 | 8 | ipv6: discard overlapping fragment
RFC5722 prohibits reassembling fragments when some data overlaps.
Bug spotted by Zhang Zuotao <zuotao.zhang@6wind.com>.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
stonith_set_debug (Stonith* s, int debuglevel)
{
StonithPlugin* sp = (StonithPlugin*)s;
if (StonithPIsys == NULL) {
return;
}
PILSetDebugLevel(StonithPIsys, STONITH_TYPE_S, sp->s.stype, debuglevel);
} | 0 | [
"CWE-287"
] | cluster-glue | 3d7b464439ee0271da76e0ee9480f3dc14005879 | 211,466,857,431,787,040,000,000,000,000,000,000,000 | 8 | Medium: stonith: add -E option to get the configuration from the environment |
void TABLE::restore_blob_values(String *blob_storage)
{
Field **vfield_ptr;
for (vfield_ptr= vfield; *vfield_ptr; vfield_ptr++)
{
if ((*vfield_ptr)->type() == MYSQL_TYPE_BLOB &&
!(*vfield_ptr)->vcol_info->stored_in_db)
{
Field_blob *blob= ((Field_blob*) *vfield_ptr);
blob->value.free()... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 44,400,565,734,316,850,000,000,000,000,000,000,000 | 15 | 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. |
StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer )
{
uint8_t * pucAllocatedMemory;
uint8_t ucFlags;
... | 1 | [
"CWE-190"
] | FreeRTOS-Kernel | d05b9c123f2bf9090bce386a244fc934ae44db5b | 218,343,301,167,279,600,000,000,000,000,000,000 | 61 | Add addition overflow check for stream buffer (#226) |
static int ipv6_hex(unsigned char *out, const char *in, int inlen)
{
unsigned char c;
unsigned int num = 0;
int x;
if (inlen > 4)
return 0;
while (inlen--) {
c = *in++;
num <<= 4;
x = OPENSSL_hexchar2int(c);
if (x < 0)
return 0;
num |= (ch... | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 94,842,342,542,294,780,000,000,000,000,000,000,000 | 20 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static int talk_to_netback_xdp(struct netfront_info *np, int xdp)
{
int err;
unsigned short headroom;
headroom = xdp ? XDP_PACKET_HEADROOM : 0;
err = xenbus_printf(XBT_NIL, np->xbdev->nodename,
"xdp-headroom", "%hu",
headroom);
if (err)
pr_warn("Error writing xdp-headroom\n");
return err;
} | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 213,895,088,067,346,300,000,000,000,000,000,000,000 | 14 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
copy_from_lzss_window(struct archive_read *a, const void **buffer,
int64_t startpos, int length)
{
int windowoffs, firstpart;
struct rar *rar = (struct rar *)(a->format->data);
if (!rar->unp_buffer)
{
if ((rar->unp_buffer = malloc(rar->unp_buffer_size)) == NULL)
{
archive_... | 0 | [
"CWE-125",
"CWE-193"
] | libarchive | 5562545b5562f6d12a4ef991fae158bf4ccf92b6 | 135,730,725,764,736,120,000,000,000,000,000,000,000 | 48 | Avoid a read off-by-one error for UTF16 names in RAR archives.
Reported-By: OSS-Fuzz issue 573 |
RawTile KakaduImage::getRegion( int seq, int ang, unsigned int res, int layers, int x, int y, unsigned int w, unsigned int h )
{
// Scale up our output bit depth to the nearest factor of 8
unsigned int obpc = bpc;
if( bpc <= 16 && bpc > 8 ) obpc = 16;
else if( bpc <= 8 ) obpc = 8;
#ifdef DEBUG
Timer timer;
... | 1 | [
"CWE-190"
] | iipsrv | 882925b295a80ec992063deffc2a3b0d803c3195 | 163,046,629,309,483,980,000,000,000,000,000,000,000 | 31 | - Modified TileManager.cc to verify that malloc() has correctly allocated memory.
- Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve... |
static void last_valueFinalizeFunc(sqlite3_context *pCtx){
struct LastValueCtx *p;
p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( p && p->pVal ){
sqlite3_result_value(pCtx, p->pVal);
sqlite3_value_free(p->pVal);
p->pVal = 0;
}
} | 0 | [
"CWE-476"
] | sqlite | 75e95e1fcd52d3ec8282edb75ac8cd0814095d54 | 34,608,929,913,318,580,000,000,000,000,000,000,000 | 9 | When processing constant integer values in ORDER BY clauses of window
definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable
the constant value to avoid an invalid pointer dereference if the expression
is ever duplicated. This fixes a crash report from Yongheng and Rui.
FossilOrigin-Name: 1ca0bd982ab11... |
static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
int ret;
qemu_co_mutex_lock(&s->lock);
ret = qcow2_cache_flush(bs, s->l2_table_cache);
if (ret < 0) {
qemu_co_mutex_unlock(&s->lock);
return ret;
}
if (qcow2_need_accurate_re... | 0 | [
"CWE-476"
] | qemu | 11b128f4062dd7f89b14abc8877ff20d41b28be9 | 133,889,395,381,997,850,000,000,000,000,000,000,000 | 23 | qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshot... |
wav_read_acid_chunk (SF_PRIVATE *psf, uint32_t chunklen)
{ char buffer [512] ;
uint32_t bytesread = 0 ;
int beats, flags ;
short rootnote, q1, meter_denom, meter_numer ;
float q2, tempo ;
chunklen += (chunklen & 1) ;
bytesread += psf_binheader_readf (psf, "422f", &flags, &rootnote, &q1, &q2) ;
snprintf (buffe... | 0 | [
"CWE-476"
] | libsndfile | 6f3266277bed16525f0ac2f0f03ff4626f1923e5 | 37,353,074,156,331,910,000,000,000,000,000,000,000 | 42 | Fix max channel count bug
The code was allowing files to be written with a channel count of exactly
`SF_MAX_CHANNELS` but was failing to read some file formats with the same
channel count. |
static int bitmap_position(const unsigned char *sha1)
{
int pos = bitmap_position_packfile(sha1);
return (pos >= 0) ? pos : bitmap_position_extended(sha1);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 218,447,670,093,286,360,000,000,000,000,000,000,000 | 5 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
camel_pop3_store_class_init (CamelPOP3StoreClass *class)
{
GObjectClass *object_class;
CamelServiceClass *service_class;
CamelStoreClass *store_class;
object_class = G_OBJECT_CLASS (class);
object_class->set_property = pop3_store_set_property;
object_class->get_property = pop3_store_get_property;
object_class->... | 0 | [
"CWE-74"
] | evolution-data-server | ba82be72cfd427b5d72ff21f929b3a6d8529c4df | 58,431,082,915,674,350,000,000,000,000,000,000,000 | 38 | I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226 |
static zend_object_value spl_array_object_clone(zval *zobject TSRMLS_DC)
{
zend_object_value new_obj_val;
zend_object *old_object;
zend_object *new_object;
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
spl_array_object *intern;
old_object = zend_objects_get_address(zobject TSRMLS_CC);
new_obj_val = spl_a... | 0 | [] | php-src | a374dfab567ff7f0ab0dc150f14cc891b0340b47 | 36,679,772,295,238,340,000,000,000,000,000,000,000 | 16 | Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion |
R_API ut64 r_bin_java_signature_attr_calc_size(RBinJavaAttrInfo *attr) {
ut64 size = 0;
if (attr == NULL) {
// TODO eprintf allocation fail
return size;
}
size += 6;
// attr->info.source_file_attr.sourcefile_idx = R_BIN_JAVA_USHORT (buffer, offset);
size += 2;
// attr->info.signature_attr.signature_idx = R_B... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 226,817,701,800,274,400,000,000,000,000,000,000,000 | 13 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned long *dest)
{
return _kvm_get_dr(emul_to_vcpu(ctxt), dr, dest);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 160,938,768,287,705,420,000,000,000,000,000,000,000 | 4 | 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... |
void helperTestQueryString(char const * uriString, int pairsExpected) {
UriParserStateA state;
UriUriA uri;
state.uri = &uri;
int res = uriParseUriA(&state, uriString);
TEST_ASSERT(res == URI_SUCCESS);
UriQueryListA * queryList = NULL;
int itemCount = 0;
res = uriDissectQueryMallocA(&queryList, &item... | 0 | [
"CWE-787"
] | uriparser | 864f5d4c127def386dd5cc926ad96934b297f04e | 116,328,857,860,196,110,000,000,000,000,000,000,000 | 18 | UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex
Reported by Google Autofuzz team |
static void ipa_functions(wmfAPI *API)
{
wmf_magick_t
*ddata = 0;
wmfFunctionReference
*FR = (wmfFunctionReference *) API->function_reference;
/*
IPA function reference links
*/
FR->device_open = ipa_device_open;
FR->device_close = ipa_device_close;
FR->device_begin = ipa_device_begin;
F... | 0 | [
"CWE-772"
] | ImageMagick | b2b48d50300a9fbcd0aa0d9230fd6d7a08f7671e | 336,847,599,779,955,860,000,000,000,000,000,000,000 | 57 | https://github.com/ImageMagick/ImageMagick/issues/544 |
static void i40e_fdir_filter_exit(struct i40e_pf *pf)
{
struct i40e_fdir_filter *filter;
struct i40e_flex_pit *pit_entry, *tmp;
struct hlist_node *node2;
hlist_for_each_entry_safe(filter, node2,
&pf->fdir_filter_list, fdir_node) {
hlist_del(&filter->fdir_node);
kfree(filter);
}
list_for_each_entry_saf... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 324,133,479,928,069,000,000,000,000,000,000,000,000 | 52 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static int parse_tlsfeatures(ASN1_TYPE c2, gnutls_x509_tlsfeatures_t f, unsigned flags)
{
char nptr[ASN1_MAX_NAME_SIZE];
int result;
unsigned i, indx, j;
unsigned int feature;
if (!(flags & GNUTLS_EXT_FLAG_APPEND))
f->size = 0;
for (i = 1;; i++) {
unsigned skip = 0;
snprintf(nptr, sizeof(nptr), "?%u", i);... | 0 | [
"CWE-415"
] | gnutls | c5aaa488a3d6df712dc8dff23a049133cab5ec1b | 176,384,897,510,976,860,000,000,000,000,000,000,000 | 51 | gnutls_x509_ext_import_proxy: fix issue reading the policy language
If the language was set but the policy wasn't, that could lead to
a double free, as the value returned to the user was freed. |
static void ql_phy_init_ex(struct ql3_adapter *qdev)
{
ql_phy_reset_ex(qdev);
PHY_Setup(qdev);
ql_phy_start_neg_ex(qdev);
} | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 246,447,520,247,425,780,000,000,000,000,000,000,000 | 6 | 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... |
int ext4_mb_init_group(struct super_block *sb, ext4_group_t group, gfp_t gfp)
{
struct ext4_group_info *this_grp;
struct ext4_buddy e4b;
struct page *page;
int ret = 0;
might_sleep();
mb_debug(sb, "init group %u\n", group);
this_grp = ext4_get_group_info(sb, group);
/*
* This ensures that we don't reinit th... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 158,017,716,293,910,200,000,000,000,000,000,000,000 | 60 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
sg_proc_init(void)
{
struct proc_dir_entry *p;
p = proc_mkdir("scsi/sg", NULL);
if (!p)
return 1;
proc_create("allow_dio", S_IRUGO | S_IWUSR, p, &adio_proc_ops);
proc_create_seq("debug", S_IRUGO, p, &debug_seq_ops);
proc_create("def_reserved_size", S_IRUGO | S_IWUSR, p, &dressz_proc_ops);
proc_create_single(... | 0 | [] | linux | 83c6f2390040f188cc25b270b4befeb5628c1aee | 279,020,747,513,494,430,000,000,000,000,000,000,000 | 17 | scsi: sg: add sg_remove_request in sg_write
If the __copy_from_user function failed we need to call sg_remove_request
in sg_write.
Link: https://lore.kernel.org/r/610618d9-e983-fd56-ed0f-639428343af7@huawei.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
Signed-off-by: M... |
ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
void *buffer, size_t buffer_size)
{
struct buffer_head *bh = NULL;
struct ext4_xattr_entry *entry;
size_t size;
void *end;
int error;
struct mb_cache *ea_block_cache = EA_BLOCK_CACHE(inode);
ea_idebug(inode, "name=%d.%s, buffer=%... | 1 | [] | linux | 54dd0e0a1b255f115f8647fc6fb93273251b01b9 | 127,014,153,535,097,250,000,000,000,000,000,000,000 | 53 | ext4: add extra checks to ext4_xattr_block_get()
Add explicit checks in ext4_xattr_block_get() just in case the
e_value_offs and e_value_size fields in the the xattr block are
corrupted in memory after the buffer_verified bit is set on the xattr
block.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.or... |
void HtmlOutputDev::beginString(GfxState *state, const GooString *s) {
pages->beginString(state, s);
} | 0 | [
"CWE-824"
] | poppler | 30c731b487190c02afff3f036736a392eb60cd9a | 105,391,709,930,140,870,000,000,000,000,000,000,000 | 3 | Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit.
Closes #742 |
PHP_FUNCTION(imagecolorexactalpha)
{
zval *IM;
long red, green, blue, alpha;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
RETURN_LONG(gdImageColorExactAlpha... | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 219,468,162,585,784,270,000,000,000,000,000,000,000 | 14 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
inline void Http2Session::SetChunksSinceLastWrite(size_t n) {
chunks_sent_since_last_write_ = n;
} | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 97,608,318,697,297,670,000,000,000,000,000,000,000 | 3 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
virtual bool check_index_dependence(void *arg) { return 0; } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 139,748,655,385,892,520,000,000,000,000,000,000,000 | 1 | 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 ... |
static int TIFFWriteDirectoryTagDoublePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value)
{
static const char module[] = "TIFFWriteDirectoryTagDoublePerSample";
double* m;
double* na;
uint16 nb;
int o;
if (dir==NULL)
{
(*ndir)++;
return(1);
}
m=_TIFFmalloc(tif->tif_dir.td_sample... | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 111,898,799,146,576,500,000,000,000,000,000,000,000 | 24 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
int ssl3_get_client_certificate(SSL *s)
{
int i,ok,al,ret= -1;
X509 *x=NULL;
unsigned long l,nc,llen,n;
const unsigned char *p,*q;
unsigned char *d;
STACK_OF(X509) *sk=NULL;
n=s->method->ssl_get_message(s,
SSL3_ST_SR_CERT_A,
SSL3_ST_SR_CERT_B,
-1,
s->max_cert_list,
&ok);
if (!ok) return((int)n);
... | 0 | [
"CWE-310"
] | openssl | ce325c60c74b0fa784f5872404b722e120e5cab0 | 296,388,984,992,731,020,000,000,000,000,000,000,000 | 177 | Only allow ephemeral RSA keys in export ciphersuites.
OpenSSL clients would tolerate temporary RSA keys in non-export
ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which
enabled this server side. Remove both options as they are a
protocol violation.
Thanks to Karthikeyan Bhargavan for reporting this issue.... |
static void io_req_task_queue_fail(struct io_kiocb *req, int ret)
{
req->result = ret;
req->io_task_work.func = io_req_task_cancel;
io_req_task_work_add(req);
} | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 22,957,049,579,455,570,000,000,000,000,000,000,000 | 6 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
void SpatialMaxPool(OpKernelContext* context, Tensor* output,
const Tensor& tensor_in, const PoolParameters& params,
const Padding& padding) {
if (output->NumElements() == 0) {
return;
}
// On GPU, use Eigen's Spatial Max Pooling. On CPU, use an
// Ei... | 0 | [
"CWE-354"
] | tensorflow | 4dddb2fd0b01cdd196101afbba6518658a2c9e07 | 125,139,611,671,914,630,000,000,000,000,000,000,000 | 105 | Fix segfault in pools on empty shapes when certain dimension were very large.
Pooling ops multiply certain components of the input shape, e.g. by multiplying input.shape[1] * input.shape[2] * input.shape[3]. This multiplication could overflow an int64 value if shape[0] was 0 but shape[1], shape[2], and shape[3] were v... |
static inline struct hso_serial *dev2ser(struct hso_device *hso_dev)
{
return hso_dev->port_data.dev_serial;
} | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 169,103,992,850,905,280,000,000,000,000,000,000,000 | 4 | 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 ... |
void readDataAvailable(size_t /* len */) noexcept override {} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 285,647,341,502,221,700,000,000,000,000,000,000,000 | 1 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
struct xt_table *xt_find_table_lock(int af, const char *name)
{
struct xt_table *t;
if (mutex_lock_interruptible(&xt[af].mutex) != 0)
return ERR_PTR(-EINTR);
list_for_each_entry(t, &xt[af].tables, list)
if (strcmp(t->name, name) == 0 && try_module_get(t->me))
return t;
mutex_unlock(&xt[af].mutex);
return ... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 115,996,926,667,649,130,000,000,000,000,000,000,000 | 13 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
void InstanceKlass::set_enclosing_method_indices(u2 class_index,
u2 method_index) {
Array<jushort>* inner_class_list = inner_classes();
assert (inner_class_list != NULL, "_inner_classes list is not set up");
int length = inner_class_list->length();
if (length % i... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 7,328,830,923,488,700,000,000,000,000,000,000,000 | 13 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
ArgParser::readArgsFromFile(char const* filename)
{
std::list<std::string> lines;
if (strcmp(filename, "-") == 0)
{
QTC::TC("qpdf", "qpdf read args from stdin");
lines = QUtil::read_lines_from_file(std::cin);
}
else
{
QTC::TC("qpdf", "qpdf read args from file");
l... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 136,163,864,658,381,300,000,000,000,000,000,000,000 | 20 | 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 ... |
static void dump_backtrace_entry(unsigned long where, unsigned long stack)
{
print_ip_sym(where);
if (in_exception_text(where))
dump_mem("", "Exception stack", stack,
stack + sizeof(struct pt_regs));
} | 0 | [
"CWE-703"
] | linux | 9955ac47f4ba1c95ecb6092aeaefb40a22e99268 | 75,292,051,640,975,800,000,000,000,000,000,000,000 | 7 | arm64: don't kill the kernel on a bad esr from el0
Rather than completely killing the kernel if we receive an esr value we
can't deal with in the el0 handlers, send the process a SIGILL and log
the esr value in the hope that we can debug it. If we receive a bad esr
from el1, we'll die() as before.
Signed-off-by: Mark... |
static int selinux_task_movememory(struct task_struct *p)
{
return avc_has_perm(&selinux_state,
current_sid(), task_sid_obj(p), SECCLASS_PROCESS,
PROCESS__SETSCHED, NULL);
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 274,755,636,598,768,200,000,000,000,000,000,000,000 | 6 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
rsvg_new_text (void)
{
RsvgNodeText *text;
text = g_new (RsvgNodeText, 1);
_rsvg_node_init (&text->super);
text->super.draw = _rsvg_node_text_draw;
text->super.set_atts = _rsvg_node_text_set_atts;
text->x = text->y = text->dx = text->dy = _rsvg_css_parse_length ("0");
return &text->super;
} | 1 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 257,362,848,512,948,800,000,000,000,000,000,000,000 | 10 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
CiffComponent* CiffDirectory::doAdd(CrwDirs& crwDirs, uint16_t crwTagId)
{
/*
add()
if stack not empty
pop from stack
find dir among components
if not found, create it
add()
else
find tag among compon... | 0 | [
"CWE-125"
] | exiv2 | 9628f82084ed30d494ddd4f7360d233801e22967 | 237,583,392,090,129,300,000,000,000,000,000,000,000 | 53 | Avoid integer overflow.
(cherry picked from commit c0ecc2ae36f34462be98623deb85ba1747ae2175) |
static int vlv_gt_eq_to_index(struct vlv_context *ac,
struct GUID *guid_array,
struct ldb_vlv_req_control *vlv_details,
struct ldb_server_sort_control *sort_details,
int *status)
{
/* this has a >= comparison string, which needs to be
* converted into indices.
*/
size_t len = a... | 0 | [
"CWE-416"
] | samba | 32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c | 305,581,514,956,240,400,000,000,000,000,000,000,000 | 54 | CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls
Otherwise a paged search on the GC port will fail as the ->data was
not kept around for the second page of searches.
An example command to produce this is
bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD
This shows up later in the... |
ofputil_decode_role_status(const struct ofp_header *oh,
struct ofputil_role_status *rs)
{
struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length));
enum ofpraw raw = ofpraw_pull_assert(&b);
ovs_assert(raw == OFPRAW_OFPT14_ROLE_STATUS);
const struct ofp14_role_status ... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 62,191,787,583,736,860,000,000,000,000,000,000,000 | 21 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
set_unescape_error (GMarkupParseContext *context,
GError **error,
const gchar *remaining_text,
GMarkupError code,
const gchar *format,
...)
{
GError *tmp_error;
gchar *s;
va... | 0 | [
"CWE-476"
] | glib | fccef3cc822af74699cca84cd202719ae61ca3b9 | 228,883,274,491,718,600,000,000,000,000,000,000,000 | 38 | gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.
Inclu... |
adv_error adv_png_read_iend(adv_fz* f, const unsigned char* data, unsigned data_size, unsigned type)
{
if (type == ADV_PNG_CN_IEND)
return 0;
/* ancillary bit. bit 5 of first byte. 0 (uppercase) = critical, 1 (lowercase) = ancillary. */
if ((type & 0x20000000) == 0) {
char buf[4];
be_uint32_write(buf, type);
... | 0 | [
"CWE-119"
] | advancecomp | 78a56b21340157775be2462a19276b4d31d2bd01 | 81,999,737,616,066,940,000,000,000,000,000,000,000 | 38 | Fix a buffer overflow caused by invalid images |
conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch,
ovs_be16 dl_type, bool force, bool commit, uint16_t zone,
const uint32_t *setmark,
const struct ovs_key_ct_labels *setlabel,
const char *helper,
const stru... | 0 | [
"CWE-400"
] | ovs | 35c280072c1c3ed58202745b7d27fbbd0736999b | 170,701,786,309,798,570,000,000,000,000,000,000,000 | 25 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static void js_setvar(js_State *J, const char *name)
{
js_Environment *E = J->E;
do {
js_Property *ref = jsV_getproperty(J, E->variables, name);
if (ref) {
if (ref->setter) {
js_pushobject(J, ref->setter);
js_pushobject(J, E->variables);
js_copy(J, -3);
js_call(J, 1);
js_pop(J, 1);
retu... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 149,470,063,434,441,650,000,000,000,000,000,000,000 | 26 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
BOOL update_write_patblt_order(wStream* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt)
{
if (!Stream_EnsureRemainingCapacity(s, update_approximate_patblt_order(orderInfo, patblt)))
return FALSE;
orderInfo->fieldFlags = 0;
orderInfo->fieldFlags |= ORDER_FIELD_01;
update_write_coord(s, patblt->nLeftRect);
orderI... | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 171,292,188,430,026,700,000,000,000,000,000,000,000 | 28 | Fixed #6013: Check new length is > 0 |
static void iowarrior_disconnect(struct usb_interface *interface)
{
struct iowarrior *dev;
int minor;
dev = usb_get_intfdata(interface);
mutex_lock(&iowarrior_open_disc_lock);
usb_set_intfdata(interface, NULL);
/* prevent device read, write and ioctl */
dev->present = 0;
minor = dev->minor;
mutex_unlock(&iow... | 1 | [
"CWE-416"
] | linux | edc4746f253d907d048de680a621e121517f484b | 89,920,402,995,718,520,000,000,000,000,000,000,000 | 39 | USB: iowarrior: fix use-after-free on disconnect
A recent fix addressing a deadlock on disconnect introduced a new bug
by moving the present flag out of the critical section protected by the
driver-data mutex. This could lead to a racing release() freeing the
driver data before disconnect() is done with it.
Due to in... |
GF_DashSegmenterInput *set_dash_input(GF_DashSegmenterInput *dash_inputs, char *name, u32 *nb_dash_inputs)
{
GF_DashSegmenterInput *di;
char *other_opts = NULL;
char *sep = gf_url_colon_suffix(name);
dash_inputs = gf_realloc(dash_inputs, sizeof(GF_DashSegmenterInput) * (*nb_dash_inputs + 1) );
memset(&dash_inputs... | 0 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 243,973,782,433,467,350,000,000,000,000,000,000,000 | 133 | fixed #1565 |
static int __elevator_change(struct request_queue *q, const char *name)
{
char elevator_name[ELV_NAME_MAX];
struct elevator_type *e;
/* Make sure queue is not in the middle of being removed */
if (!test_bit(QUEUE_FLAG_REGISTERED, &q->queue_flags))
return -ENOENT;
/*
* Special case for mq, turn off scheduling... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 173,260,733,871,195,530,000,000,000,000,000,000,000 | 30 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.