func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
nft_rule_is_active_next(struct net *net, const struct nft_rule *rule)
{
return (rule->genmask & (1 << gencursor_next(net))) == 0;
} | 0 | [
"CWE-19"
] | nf | a2f18db0c68fec96631c10cad9384c196e9008ac | 14,400,259,529,762,963,000,000,000,000,000,000,000 | 4 | netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896... |
squashfs_operations *read_filesystem_tables_4()
{
long long table_start;
/* Read xattrs */
if(sBlk.s.xattr_id_table_start != SQUASHFS_INVALID_BLK) {
/* sanity check super block contents */
if(sBlk.s.xattr_id_table_start >= sBlk.s.bytes_used) {
ERROR("read_filesystem_tables: xattr id table start too large in ... | 0 | [
"CWE-22"
] | squashfs-tools | 79b5a555058eef4e1e7ff220c344d39f8cd09646 | 6,958,532,841,502,200,000,000,000,000,000,000,000 | 123 | Unsquashfs: fix write outside destination directory exploit
An issue on Github (https://github.com/plougher/squashfs-tools/issues/72)
shows how some specially crafted Squashfs filesystems containing
invalid file names (with '/' and ..) can cause Unsquashfs to write
files outside of the destination directory.
This com... |
**/
T& back() {
return *(_data + size() - 1); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 8,336,716,798,446,263,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
SYSCALL_DEFINE2(getpriority, int, which, int, who)
{
struct task_struct *g, *p;
struct user_struct *user;
const struct cred *cred = current_cred();
long niceval, retval = -ESRCH;
struct pid *pgrp;
if (which > PRIO_USER || which < PRIO_PROCESS)
return -EINVAL;
rcu_read_lock();
read_lock(&tasklist_lock);
swi... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 196,351,755,765,912,100,000,000,000,000,000,000,000 | 61 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const TensorShape& input_shape = input.shape();
const Tensor& out_backprop = context->input(2);
const TensorShape& out_backprop_shape = out_backprop.shape();
TensorShape filter_shape;
if (takes_shape_)... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | 174c5096f303d5be7ed2ca2662b08371bff4ab88 | 31,490,391,388,696,703,000,000,000,000,000,000,000 | 238 | Fix failed check in Conv3DBackpropFilterV2.
Passing in a rank-0 `filter_size` causes a check fail and crash,
coming from a `filter_size.vec<>()` call. Here we check the size
first.
PiperOrigin-RevId: 445517122 |
ctl_getitem(
const struct ctl_var *var_list,
char **data
)
{
static const struct ctl_var eol = { 0, EOV, NULL };
static char buf[128];
static u_long quiet_until;
const struct ctl_var *v;
const char *pch;
char *cp;
char *tp;
/*
* Delete leading commas and white space
*/
while (reqpt < reqend && (*reqpt ... | 0 | [
"CWE-22"
] | ntp | 184516e143ce4448ddb5b9876dd372008cc779f6 | 96,551,201,566,959,300,000,000,000,000,000,000,000 | 83 | [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command. |
static int get_indirect(struct vhost_virtqueue *vq,
struct iovec iov[], unsigned int iov_size,
unsigned int *out_num, unsigned int *in_num,
struct vhost_log *log, unsigned int *log_num,
struct vring_desc *indirect)
{
struct vring_desc desc;
unsigned int i = 0, count, found = 0;
u32 len = vhost32_to_cpu(v... | 1 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 24,115,254,860,866,740,000,000,000,000,000,000,000 | 97 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
static void ext4_print_free_blocks(struct inode *inode)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
printk(KERN_EMERG "Total free blocks count %lld\n",
ext4_count_free_blocks(inode->i_sb));
printk(KERN_EMERG "Free/Dirty block details\n");
printk(KERN_EMERG "free_blocks=%lld\n",
(long long)percpu_counte... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 259,585,803,040,158,800,000,000,000,000,000,000,000 | 17 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
const AsyncTransportCertificate* AsyncSSLSocket::getSelfCertificate() const {
if (selfCertData_) {
return selfCertData_.get();
}
if (ssl_ != nullptr) {
auto selfX509 = SSL_get_certificate(ssl_.get());
if (selfX509) {
// need to upref
X509_up_ref(selfX509);
folly::ssl::X509UniquePtr p... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 63,878,179,800,692,030,000,000,000,000,000,000,000 | 17 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
MagickExport Image *ExcerptImage(const Image *image,
const RectangleInfo *geometry,ExceptionInfo *exception)
{
#define ExcerptImageTag "Excerpt/Image"
CacheView
*excerpt_view,
*image_view;
Image
*excerpt_image;
MagickBooleanType
status;
MagickOffsetType
progress;
ssize_t
y;
... | 0 | [
"CWE-190"
] | ImageMagick | 64dc80b2e1907f7f20bf34d4df9483f938b0de71 | 142,271,945,104,582,100,000,000,000,000,000,000,000 | 109 | https://github.com/ImageMagick/ImageMagick/issues/1731 |
QPDFPageObjectHelper::QPDFPageObjectHelper(QPDFObjectHandle oh) :
QPDFObjectHelper(oh)
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 244,029,533,840,448,180,000,000,000,000,000,000,000 | 4 | 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 ... |
int walk_memory_blocks(unsigned long start, unsigned long size,
void *arg, walk_memory_blocks_func_t func)
{
const unsigned long start_block_id = phys_to_block_id(start);
const unsigned long end_block_id = phys_to_block_id(start + size - 1);
struct memory_block *mem;
unsigned long block_id;
int ret = 0;
... | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 234,622,062,669,825,560,000,000,000,000,000,000,000 | 24 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static void *__alloc_from_pool(size_t size, struct page **ret_page, gfp_t flags)
{
unsigned long val;
void *ptr = NULL;
if (!atomic_pool) {
WARN(1, "coherent pool not initialised!\n");
return NULL;
}
val = gen_pool_alloc(atomic_pool, size);
if (val) {
phys_addr_t phys = gen_pool_virt_to_phys(atomic_pool, ... | 1 | [
"CWE-200"
] | linux | 6829e274a623187c24f7cfc0e3d35f25d087fcc5 | 88,080,456,643,252,000,000,000,000,000,000,000,000 | 22 | arm64: dma-mapping: always clear allocated buffers
Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha,
ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures.
It turned out that some drivers rely on this 'feature'. Allocated buffer
might be also exposed to userspace with dma_mmap() c... |
push_callout(i_ctx_t *i_ctx_p, const char *callout_name)
{
int code;
check_estack(1);
code = name_enter_string(imemory, callout_name, esp + 1);
if (code < 0)
return code;
++esp;
r_set_attrs(esp, a_executable);
return o_push_estack;
} | 0 | [] | ghostpdl | 5516c614dc33662a2afdc377159f70218e67bde5 | 315,169,555,207,022,480,000,000,000,000,000,000,000 | 12 | Improve restore robustness
Prompted by looking at Bug 699654:
There are two variants of the restore operator in Ghostscript: one is Level 1
(restoring VM), the other is Level 2+ (adding page device restoring to the
Level operator).
This was implemented by the Level 2+ version restoring the device in the
graphics sta... |
static size_t optsize (lua_State *L, char opt, const char **fmt) {
switch (opt) {
case 'B': case 'b': return sizeof(char);
case 'H': case 'h': return sizeof(short);
case 'L': case 'l': return sizeof(long);
case 'T': return sizeof(size_t);
case 'f': return sizeof(float);
case 'd': return size... | 1 | [
"CWE-61",
"CWE-190",
"CWE-787"
] | redis | ef764dde1cca2f25d00686673d1bc89448819571 | 128,291,153,872,254,690,000,000,000,000,000,000,000 | 20 | [FIX] revisit CVE-2015-8080 vulnerability |
print_platform(void)
{
struct stat stat_buf;
char *uname = NULL;
char *distro = NULL;
char *platform = NULL;
char *productName = NULL;
char *productVersion = NULL;
char line[1025];
GPtrArray *argv_ptr;
if (!stat("/usr/bin/lsb_release", &stat_buf)) {
argv_ptr = g_ptr_array_new();
... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 32,819,194,943,831,150,000,000,000,000,000,000,000 | 144 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
MagickExport MagickBooleanType ContrastStretchImage(Image *image,
const double black_point,const double white_point,ExceptionInfo *exception)
{
#define MaxRange(color) ((double) ScaleQuantumToMap((Quantum) (color)))
#define ContrastStretchImageTag "ContrastStretch/Image"
CacheView
*image_view;
double
... | 0 | [
"CWE-835"
] | ImageMagick | a80ee0ee1a083b4991d12ed4c07b7c7c5890f329 | 195,443,429,009,117,200,000,000,000,000,000,000,000 | 258 | https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506 |
hfinfo_number_value_format(const header_field_info *hfinfo, char buf[32], guint32 value)
{
int display = hfinfo->display;
if (hfinfo->type == FT_FRAMENUM) {
/*
* Frame numbers are always displayed in decimal.
*/
display = BASE_DEC;
}
return hfinfo_number_value_format_display(hfinfo, display, buf, value)... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 258,275,206,373,016,440,000,000,000,000,000,000,000 | 13 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static void pe_add_heuristic_property(cli_ctx *ctx, const char *key)
{
struct json_object *heuristics;
struct json_object *pe;
struct json_object *str;
pe = get_pe_property(ctx);
if (!(pe))
return;
if (!json_object_object_get_ex(pe, "Heuristics", &heuristics)) {
heuristics = j... | 0 | [
"CWE-119",
"CWE-787"
] | clamav-devel | fc3794a54d2affe5770c1f876484a871c783e91e | 334,530,769,773,425,500,000,000,000,000,000,000,000 | 24 | Merge fix from security/bb11155 branch |
kvaser_usb_leaf_usbcan_conditionally_rx_error(const struct kvaser_usb *dev,
struct kvaser_usb_err_summary *es)
{
struct kvaser_usb_net_priv *priv;
unsigned int channel;
bool report_error;
channel = es->channel;
if (channel >= dev->nchannels) {
dev_err(&dev->intf->dev,
"Invalid channel number (%d)\... | 0 | [
"CWE-200",
"CWE-908"
] | linux | da2311a6385c3b499da2ed5d9be59ce331fa93e9 | 279,710,523,759,761,160,000,000,000,000,000,000,000 | 34 | can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Uninitialized Kernel memory can leak to USB devices.
Fix this by using kzalloc() instead of kmalloc().
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_... |
ath6kl_usb_alloc_urb_from_pipe(struct ath6kl_usb_pipe *pipe)
{
struct ath6kl_urb_context *urb_context = NULL;
unsigned long flags;
spin_lock_irqsave(&pipe->ar_usb->cs_lock, flags);
if (!list_empty(&pipe->urb_list_head)) {
urb_context =
list_first_entry(&pipe->urb_list_head,
struct ath6kl_urb_conte... | 1 | [
"CWE-476"
] | linux | 39d170b3cb62ba98567f5c4f40c27b5864b304e5 | 279,436,034,842,263,440,000,000,000,000,000,000,000 | 17 | ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe()
The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath6kl_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath6kl_usb_setup_pipe_resources`:
for (i = 0; i <... |
f_mzeval(typval_T *argvars, typval_T *rettv)
{
char_u *str;
char_u buf[NUMBUFLEN];
if (check_restricted() || check_secure())
return;
str = tv_get_string_buf(&argvars[0], buf);
do_mzeval(str, rettv);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 216,469,709,797,277,370,000,000,000,000,000,000,000 | 10 | 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. |
void fx_TypedArray_prototype_reduceRight(txMachine* the)
{
mxTypedArrayDeclarations;
txInteger delta = dispatch->value.typedArray.dispatch->size;
txSlot* function = fxArgToCallback(the, 0);
txInteger index = length - 1;
if (mxArgc > 1)
*mxResult = *mxArgv(1);
else if (index >= 0) {
(*dispatch->value.typedArra... | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 180,906,236,219,580,800,000,000,000,000,000,000,000 | 19 | XS: #896 |
_outCollateExpr(StringInfo str, const CollateExpr *node)
{
WRITE_NODE_TYPE("COLLATE");
WRITE_NODE_FIELD(arg);
WRITE_OID_FIELD(collOid);
WRITE_LOCATION_FIELD(location);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 188,830,450,989,970,850,000,000,000,000,000,000,000 | 8 | 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... |
int numa_migrate_prep(struct page *page, struct vm_area_struct *vma,
unsigned long addr, int current_nid)
{
get_page(page);
count_vm_numa_event(NUMA_HINT_FAULTS);
if (current_nid == numa_node_id())
count_vm_numa_event(NUMA_HINT_FAULTS_LOCAL);
return mpol_misplaced(page, vma, addr);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | b4cbb197c7e7a68dbad0d491242e3ca67420c13e | 297,266,882,151,332,000,000,000,000,000,000,000,000 | 11 | 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... |
hook_fd_set (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook;
int max_fd;
max_fd = 0;
for (ptr_hook = weechat_hooks[HOOK_TYPE_FD]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr_hook->deleted)
{
if (HOOK_FD(ptr_hook, f... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 143,487,895,517,798,510,000,000,000,000,000,000,000 | 34 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
std::string AuthorizationSession::getAuthenticatedUserNamesToken() {
std::string ret;
for (UserNameIterator nameIter = getAuthenticatedUserNames(); nameIter.more();
nameIter.next()) {
ret += '\0'; // Using a NUL byte which isn't valid in usernames to separate them.
ret += nameIter->get... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 102,448,022,303,288,220,000,000,000,000,000,000,000 | 10 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
internal_putbytes(const char *s, size_t len)
{
size_t amount;
while (len > 0)
{
/* If buffer is full, then flush it out */
if (PqSendPointer >= PqSendBufferSize)
{
socket_set_nonblocking(false);
if (internal_flush())
return EOF;
}
amount = PqSendBufferSize - PqSendPointer;
if (amount > len)
... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 262,063,761,343,614,730,000,000,000,000,000,000,000 | 23 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
mobility_print(netdissect_options *ndo,
const u_char *bp, const u_char *bp2 _U_)
{
const struct ip6_mobility *mh;
const u_char *ep;
unsigned mhlen, hlen;
uint8_t type;
mh = (const struct ip6_mobility *)bp;
/* 'ep' points to the end of available data. */
ep = ndo->ndo_snapend;
if (!ND_TTEST(mh-... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | b8e559afaeb8fe0604a1f8e3ad4dc1445de07a00 | 216,825,896,569,549,720,000,000,000,000,000,000,000 | 143 | CVE-2017-13023/IPv6 mobility: Add a bounds check before fetching data
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't cause 'tcpdump: pcap_loop: truncated dump file' |
HttpHdrRangeSpec::Create(const char *field, int flen)
{
HttpHdrRangeSpec spec;
if (!spec.parseInit(field, flen))
return NULL;
return new HttpHdrRangeSpec(spec);
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 190,496,963,494,877,250,000,000,000,000,000,000,000 | 9 | Handle more Range requests (#790)
Also removed some effectively unused code. |
poly_center(PG_FUNCTION_ARGS)
{
POLYGON *poly = PG_GETARG_POLYGON_P(0);
Datum result;
CIRCLE *circle;
circle = DatumGetCircleP(DirectFunctionCall1(poly_circle,
PolygonPGetDatum(poly)));
result = DirectFunctionCall1(circle_center,
CirclePGetDatum(circle));
PG_RETURN_DATUM(result);
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 119,040,191,100,775,180,000,000,000,000,000,000,000 | 13 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static int tipc_getsockopt(struct socket *sock, int lvl, int opt,
char __user *ov, int __user *ol)
{
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct tipc_service_range seq;
int len, scope;
u32 value;
int res;
if ((lvl == IPPROTO_TCP) && (sock->type == SOCK_STREAM))
return put_use... | 0 | [
"CWE-200",
"CWE-909"
] | linux | d6d86830705f173fca6087a3e67ceaf68db80523 | 187,584,475,073,312,270,000,000,000,000,000,000,000 | 66 | net ticp:fix a kernel-infoleak in __tipc_sendmsg()
struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently
copying it to user space,causing kernel-infoleak.
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
BUG: KMSAN: kernel-infoleak in instrument_c... |
PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr,
const char *end) {
UNUSED_P(enc);
switch ((end - ptr) / MINBPC(enc)) {
case 2:
if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
switch (BYTE_TO_ASCII(enc, ptr)) {
case ASCII_l:
return ASCII_... | 0 | [
"CWE-116"
] | libexpat | 3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6 | 87,477,262,298,003,000,000,000,000,000,000,000,000 | 52 | lib: Add missing validation of encoding (CVE-2022-25235) |
static void dmar_invalid_context_cache_global(struct dmar_drhd_rt *dmar_unit)
{
dmar_invalid_context_cache(dmar_unit, 0U, 0U, 0U, DMAR_CIRG_GLOBAL);
} | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 97,669,726,240,411,000,000,000,000,000,000,000,000 | 4 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
NTSTATUS winsdb_lookup(struct winsdb_handle *h,
const struct nbt_name *name,
TALLOC_CTX *mem_ctx,
struct winsdb_record **_rec)
{
NTSTATUS status;
struct ldb_result *res = NULL;
int ret;
struct winsdb_record *rec;
struct ldb_context *wins_db = h->ldb;
TALLOC_CTX *tmp_ctx = talloc_new(me... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 28,658,516,854,942,000,000,000,000,000,000,000,000 | 38 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
unknown_pubkey_warning (int algo)
{
static byte unknown_pubkey_algos[256];
/* First check whether the algorithm is usable but not suitable for
encryption/signing. */
if (pubkey_get_npkey (algo))
{
if (opt.verbose)
{
if (!pubkey_get_nsig (algo))
log_info ("public key ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 151,123,134,081,567,130,000,000,000,000,000,000,000 | 29 | 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 ... |
GGadget *GSimpleListFieldCreate(struct gwindow *base, GGadgetData *gd,void *data) {
GListField *ge = calloc(1,sizeof(GListField));
ge->gt.listfield = true;
if ( gd->u.list!=NULL )
ge->ti = GTextInfoArrayFromList(gd->u.list,&ge->ltot);
_GTextFieldCreate(&ge->gt,base,gd,data,&glistfield_box);
ge->gt... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 216,809,785,133,866,830,000,000,000,000,000,000,000 | 10 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
TEST(SerializerTest, DuplicateUnionData) {
// Test that we can handle invalid serialized input with duplicate and
// incomplete union data.
const char data[] =
"\x0c" // type = TType::T_STRUCT
"\x00\x01" // fieldId = 1 (unionField)
"\x0b" // type = TType::T_STRING
"\x00\x01" // fieldId = 1... | 0 | [
"CWE-763"
] | fbthrift | bfda1efa547dce11a38592820916db01b05b9339 | 286,756,161,037,903,900,000,000,000,000,000,000,000 | 21 | Fix handling of invalid union data in table-based serializer
Summary:
Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem... |
static inline void *alloc_rsttbl_from_idx(struct RESTART_TABLE **tbl, u32 vbo)
{
u32 off;
__le32 *e;
struct RESTART_TABLE *rt = *tbl;
u32 bytes = bytes_per_rt(rt);
u16 esize = le16_to_cpu(rt->size);
/* If the entry is not the table, we will have to extend the table. */
if (vbo >= bytes) {
/*
* Extend the s... | 0 | [
"CWE-416"
] | linux | f26967b9f7a830e228bb13fb41bd516ddd9d789d | 25,503,137,152,446,746,000,000,000,000,000,000,000 | 86 | fs/ntfs3: Fix invalid free in log_replay
log_read_rst() returns ENOMEM error when there is not enough memory.
In this case, if info is returned without initialization,
it attempts to kfree the uninitialized info->r_page pointer. This patch
moves the memset initialization code to before log_read_rst() is called.
Repor... |
void __symbol_put(const char *symbol)
{
struct find_symbol_arg fsa = {
.name = symbol,
.gplok = true,
};
preempt_disable();
if (!find_symbol(&fsa))
BUG();
module_put(fsa.owner);
preempt_enable();
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 308,496,897,993,921,700,000,000,000,000,000,000,000 | 13 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
{
const char *p, *q;
char *name;
const char *endptr = val + vallen;
zval *current;
int namelen;
int has_value;
php_unserialize_data_t var_hash;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
p = val;
while (p < endptr) {
zval **tmp;
q = p;
while (*q != PS_DELIMITER) {
... | 1 | [] | php-src | df4bf28f9f104ca3ef78ed94b497859f15b004e5 | 82,701,708,029,841,545,000,000,000,000,000,000,000 | 56 | Fix bug #70219 (Use after free vulnerability in session deserializer) |
int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
{
struct file_list *flist = NULL;
int exit_code = 0, exit_code2 = 0;
char *local_name = NULL;
cleanup_child_pid = pid;
if (!read_batch) {
set_nonblocking(f_in);
set_nonblocking(f_out);
}
io_set_sock_fds(f_in, f_out);
setup_protocol(f_o... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 221,593,237,463,076,860,000,000,000,000,000,000,000 | 113 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
static int orinoco_ioctl_set_genie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct orinoco_private *priv = ndev_priv(dev);
u8 *buf;
unsigned long flags;
/* cut off at IEEE80211_MAX_DATA_LEN */
if ((wrqu->data.length > IEEE80211_MAX_DATA_LEN) ||
... | 0 | [] | linux | 0a54917c3fc295cb61f3fb52373c173fd3b69f48 | 267,544,605,515,647,900,000,000,000,000,000,000,000 | 40 | orinoco: fix TKIP countermeasure behaviour
Enable the port when disabling countermeasures, and disable it on
enabling countermeasures.
This bug causes the response of the system to certain attacks to be
ineffective.
It also prevents wpa_supplicant from getting scan results, as
wpa_supplicant disables countermeasures... |
static CURLcode set_login(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
const char *setuser = CURL_DEFAULT_USER;
const char *setpasswd = CURL_DEFAULT_PASSWORD;
/* If our protocol needs a password and we have none, use the defaults */
if((conn->handler->flags & PROTOPT_NEEDSPWD) && !conn->bits.user_... | 0 | [
"CWE-416"
] | curl | 81d135d67155c5295b1033679c606165d4e28f3f | 332,126,663,436,694,880,000,000,000,000,000,000,000 | 36 | Curl_close: clear data->multi_easy on free to avoid use-after-free
Regression from b46cfbc068 (7.59.0)
CVE-2018-16840
Reported-by: Brian Carpenter (Geeknik Labs)
Bug: https://curl.haxx.se/docs/CVE-2018-16840.html |
static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int len, err = 0;
struct bt_voice voice;
u32 opt;
BT_DBG("sk %p", sk);
lock_sock(sk);
switch (optname) {
case BT_DEFER_SETUP:
if (sk->sk_state != BT... | 0 | [
"CWE-200"
] | net | 5233252fce714053f0151680933571a2da9cbfb4 | 17,991,681,782,470,402,000,000,000,000,000,000,000 | 64 | bluetooth: Validate socket address length in sco_sock_bind().
Signed-off-by: David S. Miller <davem@davemloft.net> |
int out_packet(s2s_t s2s, pkt_t pkt) {
char *rkey;
int rkeylen;
conn_t out;
conn_state_t state;
int ret;
/* perform check against whitelist */
if (s2s->enable_whitelist > 0 &&
(pkt->to->domain != NULL) &&
(s2s_domain_in_whitelist(s2s, pkt->to->domain) == 0)) {
... | 0 | [
"CWE-20"
] | jabberd2 | aabcffae560d5fd00cd1d2ffce5d760353cf0a4d | 206,053,843,368,559,900,000,000,000,000,000,000,000 | 116 | Fixed possibility of Unsolicited Dialback Attacks |
nautilus_file_new_from_filename (NautilusDirectory *directory,
const char *filename,
gboolean self_owned)
{
NautilusFile *file;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (filename != NULL);
g_assert (filename[0] != '\0');
if (NAUTILUS_IS_DESKTOP_DIRECTORY (directory)) {
if (self_owned) {... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 273,015,030,546,159,050,000,000,000,000,000,000,000 | 42 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static void active_load_balance(struct rq *busiest_rq, int busiest_cpu)
{
int target_cpu = busiest_rq->push_cpu;
struct sched_domain *sd;
struct rq *target_rq;
/* Is there any task to move? */
if (busiest_rq->nr_running <= 1)
return;
target_rq = cpu_rq(target_cpu);
/*
* This condition is "impossible", if ... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 206,631,112,680,498,240,000,000,000,000,000,000,000 | 42 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr)
{
struct sock *sk = sock->sk;
struct llc_sock *llc = llc_sk(sk);
struct llc_sap *sap;
int rc = -EINVAL;
if (!sock_flag(sk, SOCK_ZAPPED))
goto out;
rc = -ENODEV;
if (sk->sk_bound_dev_if) {
llc->dev = dev_get_by_index(&init_net, sk->sk... | 0 | [
"CWE-200"
] | net | b8670c09f37bdf2847cc44f36511a53afc6161fd | 205,335,376,454,391,400,000,000,000,000,000,000,000 | 37 | net: fix infoleak in llc
The stack object “info” has a total size of 12 bytes. Its last byte
is padding which is not initialized and leaked via “put_cmsg”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
TEST_P(ProtocolIntegrationTest, ShutdownWithActiveConnPoolConnections) {
auto response = makeHeaderOnlyRequest(nullptr, 0);
// Shut down the server with active connection pool connections.
test_server_.reset();
checkSimpleRequestSuccess(0U, 0U, response.get());
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 291,768,457,791,375,350,000,000,000,000,000,000,000 | 6 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size,
int flags)
{
struct sock_iocb *siocb = kiocb_to_siocb(iocb);
struct scm_cookie tmp_scm;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
int noblock = flags & MSG_DONTWAIT;
struc... | 1 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 4,479,196,348,273,988,500,000,000,000,000,000,000 | 98 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
void *videobuf_to_vmalloc (struct videobuf_buffer *buf)
{
struct videbuf_vmalloc_memory *mem=buf->priv;
BUG_ON (!mem);
MAGIC_CHECK(mem->magic,MAGIC_VMAL_MEM);
return mem->vmalloc;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0b29669c065f60501e7289e1950fa2a618962358 | 206,615,109,764,976,600,000,000,000,000,000,000,000 | 8 | V4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmap
This is pretty serious bug. map->count is never initialized after the
call to kmalloc making the count start at some random trash value. The
end result is leaking videobufs.
Also, fix up the debug statements to print unsigned values.
Pushed to h... |
static int ovl_dir_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
{
int err;
enum ovl_path_type type;
struct path realpath;
type = ovl_path_real(dentry, &realpath);
err = vfs_getattr(&realpath, stat);
if (err)
return err;
stat->dev = dentry->d_sb->s_dev;
stat->ino = dentry->d_i... | 0 | [
"CWE-20"
] | linux | 11f3710417d026ea2f4fcf362d866342c5274185 | 11,164,007,773,462,093,000,000,000,000,000,000,000 | 25 | ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) an... |
JVM_ConstantPoolGetDoubleAt(JNIEnv *env, jobject anObject, jobject constantPool, jint index)
{
Trc_SC_ConstantPoolGetDoubleAt(env);
exit(217);
} | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 256,226,586,380,825,240,000,000,000,000,000,000,000 | 5 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
virDomainObjPtr vm,
const qemuDomainJobObj *job,
virDomainState state,
int reason)
{
qemuDomainJobPrivatePtr jobPriv = job->privateData;
... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 81,255,892,730,582,370,000,000,000,000,000,000,000 | 59 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
static void luma_mc_bi(HEVCContext *s, uint8_t *dst, ptrdiff_t dststride,
AVFrame *ref0, const Mv *mv0, int x_off, int y_off,
int block_w, int block_h, AVFrame *ref1, const Mv *mv1, struct MvField *current_mv)
{
HEVCLocalContext *lc = s->HEVClc;
ptrdiff_t src0strid... | 0 | [
"CWE-476"
] | FFmpeg | 9ccc633068c6fe76989f487c8932bd11886ad65b | 208,787,359,991,778,050,000,000,000,000,000,000,000 | 73 | avcodec/hevcdec: Avoid only partly skiping duplicate first slices
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304
This also fi... |
int RGWHandler_REST_S3Website::serve_errordoc(int http_ret, const string& errordoc_key) {
int ret = 0;
s->formatter->reset(); /* Try to throw it all away */
std::shared_ptr<RGWGetObj_ObjStore_S3Website> getop( static_cast<RGWGetObj_ObjStore_S3Website*>(op_get()));
if (getop.get() == NULL) {
return -1; // T... | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 193,580,288,371,992,800,000,000,000,000,000,000,000 | 70 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
{
return call_netdevice_notifiers_extack(val, dev, NULL);
} | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 195,177,141,466,415,560,000,000,000,000,000,000,000 | 4 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
inline void Sequence::accept(Visitor &v) { v.visit(*this); } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 101,593,443,464,304,440,000,000,000,000,000,000,000 | 1 | Fix #122 |
static void b43_bcma_phy_reset(struct b43_wldev *dev)
{
u32 flags;
/* Put PHY into reset */
flags = bcma_aread32(dev->dev->bdev, BCMA_IOCTL);
flags |= B43_BCMA_IOCTL_PHY_RESET;
flags |= B43_BCMA_IOCTL_PHY_BW_20MHZ; /* Make 20 MHz def */
bcma_awrite32(dev->dev->bdev, BCMA_IOCTL, flags);
udelay(2);
/* Take PHY ... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 163,181,094,763,170,100,000,000,000,000,000,000,000 | 24 | 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... |
str2special_save(
char_u *str,
int is_lhs) // TRUE for lhs, FALSE for rhs
{
garray_T ga;
char_u *p = str;
ga_init2(&ga, 1, 40);
while (*p != NUL)
ga_concat(&ga, str2special(&p, is_lhs));
ga_append(&ga, NUL);
return (char_u *)ga.ga_data;
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 316,657,610,011,526,500,000,000,000,000,000,000,000 | 13 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
GF_Err gf_isom_box_array_read(GF_Box *parent, GF_BitStream *bs)
{
GF_Err e;
u32 parent_type = parent->type;
GF_Box *a = NULL;
Bool skip_logs = (gf_bs_get_cookie(bs) & GF_ISOM_BS_COOKIE_NO_LOGS ) ? GF_TRUE : GF_FALSE;
//we may have terminators in some QT files (4 bytes set to 0 ...)
while (parent->size>=8) {
e... | 0 | [
"CWE-476"
] | gpac | 37592ad86c6ca934d34740012213e467acc4a3b0 | 71,619,305,561,956,950,000,000,000,000,000,000,000 | 85 | fixed #2163 |
Client::endAdaptedBodyConsumption()
{
stopConsumingFrom(adaptedBodySource);
handleAdaptationCompleted();
} | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 51,234,731,047,549,950,000,000,000,000,000,000,000 | 5 | Handle more partial responses (#791) |
static void Ins_DIV( INS_ARG )
{
if ( args[1] == 0 )
{
CUR.error = TT_Err_Divide_By_Zero;
return;
}
args[0] = MulDiv_Round( args[0], 64L, args[1] );
DBG_PRINT1(" %d", args[0]);
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 339,414,593,316,283,420,000,000,000,000,000,000,000 | 11 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
void __fastcall TSCPFileSystem::SkipStartupMessage()
{
try
{
FTerminal->LogEvent(L"Skipping host startup message (if any).");
ExecCommand(fsNull, NULL, 0, 0);
}
catch (Exception & E)
{
FTerminal->CommandError(&E, LoadStr(SKIP_STARTUP_MESSAGE_ERROR), 0, HELP_SKIP_STARTUP_MESSAGE_ERROR);
... | 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 37,260,733,480,074,330,000,000,000,000,000,000,000 | 12 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
void receiveFromReference()
try
{
string packet;
ComboAddress remote;
int res=waitForData(s_socket->getHandle(), g_timeoutMsec/1000, 1000*(g_timeoutMsec%1000));
if(res < 0 || res==0)
return;
while(s_socket->recvFromAsync(packet, remote)) {
try {
s_weanswers++;
MOADNSParser mdp(false, p... | 0 | [
"CWE-787"
] | pdns | f9c57c98da1b1007a51680629b667d57d9b702b8 | 94,001,281,813,343,400,000,000,000,000,000,000,000 | 52 | dnsreplay: Bail out on a too small outgoing buffer |
FLAC_API FLAC__bool FLAC__stream_decoder_process_until_end_of_metadata(FLAC__StreamDecoder *decoder)
{
FLAC__ASSERT(0 != decoder);
FLAC__ASSERT(0 != decoder->protected_);
while(1) {
switch(decoder->protected_->state) {
case FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
if(!find_metadata_(decoder))
return ... | 0 | [
"CWE-119"
] | flac | 5b3033a2b355068c11fe637e14ac742d273f076e | 41,584,270,723,903,983,000,000,000,000,000,000,000 | 26 | src/libFLAC/stream_decoder.c : Fix buffer read overflow.
This is CVE-2014-8962.
Reported-by: Michele Spagnuolo,
Google Security Team <mikispag@google.com> |
static int ieee80211_set_noack_map(struct wiphy *wiphy,
struct net_device *dev,
u16 noack_map)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
sdata->noack_map = noack_map;
ieee80211_check_fast_xmit_iface(sdata);
return 0;
} | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 131,597,396,947,424,000,000,000,000,000,000,000,000 | 12 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
int pmixp_coll_tree_init(pmixp_coll_t *coll, hostlist_t *hl)
{
int max_depth, width, depth, i;
char *p;
pmixp_coll_tree_t *tree = NULL;
tree = &coll->state.tree;
tree->state = PMIXP_COLL_TREE_SYNC;
width = slurm_get_tree_width();
reverse_tree_info(coll->my_peerid, coll->peers_cnt, width,
&tree->prnt_peeri... | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 338,186,686,900,304,140,000,000,000,000,000,000,000 | 85 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
static struct tevent_req *ldapsrv_process_call_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tevent_queue *call_queue,
struct ldapsrv_call *call)
{
struct tevent_req *req;
struct ldapsrv_process_call_state *state;
bool ok;
req = tevent_req_create(mem_ctx, &state,
str... | 0 | [
"CWE-703"
] | samba | f9b2267c6eb8138fc94df7a138ad5d87526f1d79 | 16,534,894,430,727,790,000,000,000,000,000,000,000 | 26 | CVE-2021-3670 ldap_server: Ensure value of MaxQueryDuration is greater than zero
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit e1ab0c43629686d1d2c0b0b2bcdc90057... |
g_tcp_socket_ok(int sck)
{
#if defined(_WIN32)
int opt;
int opt_len;
#else
int opt;
unsigned int opt_len;
#endif
opt_len = sizeof(opt);
if (getsockopt(sck, SOL_SOCKET, SO_ERROR, (char*)(&opt), &opt_len) == 0)
{
if (opt == 0)
{
return 1;
}
}
return 0;
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 186,454,470,039,917,100,000,000,000,000,000,000,000 | 20 | move temp files from /tmp to /tmp/.xrdp |
static inline int sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent)
{
int err = 0;
sco_conn_lock(conn);
if (conn->sk)
err = -EBUSY;
else
__sco_chan_add(conn, sk, parent);
sco_conn_unlock(conn);
return err;
} | 0 | [
"CWE-200"
] | linux | c4c896e1471aec3b004a693c689f60be3b17ac86 | 15,353,285,099,639,878,000,000,000,000,000,000,000 | 13 | Bluetooth: sco: fix information leak to userspace
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. ... |
RGWGetObj_Filter(RGWGetObj_Filter *next): next(next) {} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 281,513,306,907,103,640,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
selCreateFromPta(PTA *pta,
l_int32 cy,
l_int32 cx,
const char *name)
{
l_int32 i, n, x, y, w, h;
BOX *box;
SEL *sel;
PROCNAME("selCreateFromPta");
if (!pta)
return (SEL *)ERROR_PTR("pta not defined", procName, NULL);
if... | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 42,977,987,618,138,530,000,000,000,000,000,000,000 | 34 | 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(). |
const Network::Address::InstanceConstSharedPtr& upstreamLocalAddress() const override {
return upstream_local_address_;
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 117,067,415,264,782,000,000,000,000,000,000,000,000 | 3 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
TEST(ParseOperand, ShouldRecognizeStringLiteral) {
auto resultExpression = parseOperand(BSON(""
<< "foo"));
auto constantExpression = dynamic_cast<ExpressionConstant*>(resultExpression.get());
ASSERT_TRUE(constantExpression);
ASSERT_VALUE_EQ(constantExpressi... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 121,622,067,778,390,520,000,000,000,000,000,000,000 | 7 | SERVER-38070 fix infinite loop in agg expression |
static int __init inotify_setup(void)
{
atomic_set(&inotify_cookie, 0);
return 0;
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 131,327,605,822,333,220,000,000,000,000,000,000,000 | 6 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
static void cap_sb_clone_mnt_opts(const struct super_block *oldsb,
struct super_block *newsb)
{
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 38,292,625,150,753,520,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
SWTPM_NVRAM_StoreData_Intern(const unsigned char *data,
uint32_t length,
uint32_t tpm_number,
const char *name,
TPM_BOOL encrypt /* encrypt if key is set */)
{
TPM_RESULT rc = 0;
uint32... | 1 | [] | swtpm | 2212f25466089937a0ef3f5d44507a2b157c12aa | 300,260,076,308,173,080,000,000,000,000,000,000,000 | 129 | swtpm: Use open() (not fopen()) when accessing statefile (CVE-2020-28407)
This patch addresses CVE-2020-28407.
Use the open() call rather than the fopen() call when accessing
the statefile and make sure we do not follow symlinks using O_NOFOLLOW.
The modification does not allow an attacker to create a symbolic link
... |
static int CreatePCPMap_FW(pcp_info_t *pcp_msg_info)
{
#ifdef ENABLE_UPNPPINHOLE
int uid;
int r;
/* first check if pinhole already exists */
uid = upnp_find_inboundpinhole(NULL, 0,
pcp_msg_info->mapped_str,
pcp_msg_info->int_port,
pcp_msg_info->protocol,
NULL, 0, /* desc */
NULL /* lifetime... | 0 | [
"CWE-476"
] | miniupnp | cb8a02af7a5677cf608e86d57ab04241cf34e24f | 209,831,698,082,396,940,000,000,000,000,000,000,000 | 37 | pcpserver.c: copyIPv6IfDifferent() check for NULL src argument |
static int imagetoraw_common(opj_image_t * image, const char *outfile,
OPJ_BOOL big_endian)
{
FILE *rawFile = NULL;
size_t res;
unsigned int compno;
int w, h, fails;
int line, row, curr, mask;
int *ptr;
unsigned char uc;
(void)big_endian;
if ((image->num... | 0 | [
"CWE-787"
] | openjpeg | c22cbd8bdf8ff2ae372f94391a4be2d322b36b41 | 80,573,894,309,160,050,000,000,000,000,000,000,000 | 140 | Avoid heap buffer overflow in function pnmtoimage of convert.c, and unsigned integer overflow in opj_image_create() (CVE-2016-9118, #861) |
static void option_export_pack_edges(const char *edges)
{
if (pack_edges)
fclose(pack_edges);
pack_edges = xfopen(edges, "a");
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 66,330,941,113,673,300,000,000,000,000,000,000,000 | 6 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
int robust_unlink(const char *fname)
{
#ifndef ETXTBSY
return do_unlink(fname);
#else
static int counter = 1;
int rc, pos, start;
char path[MAXPATHLEN];
rc = do_unlink(fname);
if (rc == 0 || errno != ETXTBSY)
return rc;
if ((pos = strlcpy(path, fname, MAXPATHLEN)) >= MAXPATHLEN)
pos = MAXPATHLEN - 1;
whi... | 0 | [
"CWE-59"
] | rsync | 4cad402ea8a91031f86c53961d78bb7f4f174790 | 135,941,273,880,096,310,000,000,000,000,000,000,000 | 46 | Receiver now rejects invalid filenames in filelist.
If the receiver gets a filename with a leading slash (w/o --relative)
and/or a filename with an embedded ".." dir in the path, it dies with
an error (rather than continuing). Those invalid paths should never
happen in reality, so just reject someone trying to pull a ... |
static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
{
u64 orig_mask = mask;
bool fallback = 0;
int err;
/* Try to set the DMA mask. If it fails, try falling back to a
* lower mask, as we can always also support a lower one. */
while (1) {
err = dma_set_mask(dev->dev->dma_dev, mask);
if (!err) {
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 271,316,127,183,301,280,000,000,000,000,000,000,000 | 38 | 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 |
static inline int ip_skb_dst_mtu(struct sk_buff *skb)
{
struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL;
return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ?
skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb));
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 226,001,432,422,747,280,000,000,000,000,000,000,000 | 7 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
**/
CImg<T>& dilate(const unsigned int s) {
return dilate(s,s,s); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 292,135,858,594,134,230,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void mg_mqtt_unsubscribe(struct mg_connection *nc, char **topics,
size_t topics_len, uint16_t message_id) {
uint16_t netbytes;
size_t i;
uint16_t topic_len;
size_t total_len = 2;
for (i = 0; i < topics_len; i++) {
total_len += 2 + strlen(topics[i]);
}
mg_send_mqtt_header(nc,... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | mongoose | b3e0f780c34cea88f057a62213c012aa88fe2deb | 26,634,759,164,820,374,000,000,000,000,000,000,000 | 23 | Fix heap-based overflow in parse_mqtt
PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b |
grow_headerspace(isc_httpd_t *httpd) {
char *newspace = NULL;
unsigned int newlen;
isc_region_t r;
isc_buffer_region(&httpd->headerbuffer, &r);
newlen = r.length + HTTP_SENDGROW;
if (newlen > HTTP_SEND_MAXLEN) {
return (ISC_R_NOSPACE);
}
newspace = isc_mem_get(httpd->mgr->mctx, newlen);
isc_buffer_reinit(... | 0 | [] | bind9 | d4c5d1c650ae0e97a083b0ce7a705c20fc001f07 | 25,968,166,005,224,733,000,000,000,000,000,000,000 | 19 | Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.
Improve the httpd.c:process_request() function with t... |
static Sdb *store_versioninfo_gnu_verdef(ELFOBJ *bin, Elf_(Shdr) *shdr, int sz) {
const char *section_name = "";
const char *link_section_name = "";
char *end = NULL;
Elf_(Shdr) *link_shdr = NULL;
ut8 dfs[sizeof (Elf_(Verdef))] = {0};
Sdb *sdb;
int cnt, i;
if (shdr->sh_link > bin->ehdr.e_shnum) {
return false... | 1 | [
"CWE-476"
] | radare2 | 62e39f34b2705131a2d08aff0c2e542c6a52cf0e | 146,722,590,071,460,170,000,000,000,000,000,000,000 | 127 | Fix #8764 - huge vd_aux caused pointer wraparound |
void PackLinuxElf64::pack3(OutputFile *fo, Filter &ft)
{
super::pack3(fo, ft); // loader follows compressed PT_LOADs
// Then compressed gaps (including debuginfo.)
unsigned total_in = 0, total_out = 0;
for (unsigned k = 0; k < e_phnum; ++k) {
Extent x;
x.size = find_LOAD_gap(phdri, k, e... | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 128,784,646,399,632,170,000,000,000,000,000,000,000 | 97 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
void update_used_tables()
{
if (field && field->default_value)
field->default_value->expr->update_used_tables();
} | 0 | [
"CWE-89"
] | server | e4e25d2bacc067417c35750f5f6c44cad10c81de | 127,277,295,725,889,900,000,000,000,000,000,000,000 | 5 | MDEV-26423 MariaDB server crash in Create_tmp_table::finalize
Removed prohibition of creating temporary field of Item_default_value
(added by mistake by 1d9b043a1f5db7ff229d5200652cff7a78ea6266 fix of
MDEV-10780 and MDEV-11265). |
static UINT cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s)
{
UINT rc;
size_t pos, size;
BOOL status;
UINT32 dataLen;
UINT32 written;
pos = Stream_GetPosition(s);
if ((pos < 8) || (pos > UINT32_MAX))
{
rc = ERROR_NO_DATA;
goto fail;
}
dataLen = (UINT32)(pos - 8);
Stream_SetPosition... | 0 | [] | FreeRDP | 8e1a1b407565eb0a48923c796f5b1f69167b3c48 | 21,662,233,646,351,250,000,000,000,000,000,000,000 | 32 | Fixed cliprdr_server_receive_capabilities
Thanks to hac425 CVE-2020-11017, CVE-2020-11018 |
static UINT rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int y,
int* contactId)
{
unsigned int i;
int contactIdlocal = -1;
RDPINPUT_CONTACT_DATA contact;
RDPINPUT_CONTACT_POINT* contactPoint = NULL;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*)context->handle;
UINT... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 142,552,144,404,562,800,000,000,000,000,000,000,000 | 41 | Fixed oob read in irp_write and similar |
accumulate_short(struct interface *ifp, unsigned short value)
{
babel_interface_nfo *babel_ifp = babel_get_if_nfo(ifp);
DO_HTONS(babel_ifp->sendbuf + babel_ifp->buffered, value);
babel_ifp->buffered += 2;
} | 0 | [
"CWE-787"
] | frr | c3793352a8d76d2eee1edc38a9a16c1c8a6573f4 | 300,662,205,902,224,200,000,000,000,000,000,000,000 | 6 | babeld: fix #10502 #10503 by repairing the checks on length
This patch repairs the checking conditions on length in four functions:
babel_packet_examin, parse_hello_subtlv, parse_ihu_subtlv, and parse_update_subtlv
Signed-off-by: qingkaishi <qingkaishi@gmail.com> |
pfmfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data,
struct vfsmount *mnt)
{
return get_sb_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC, mnt);
} | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 11,108,293,380,847,823,000,000,000,000,000,000,000 | 5 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
static void update_read_synchronize(rdpUpdate* update, wStream* s)
{
Stream_Seek_UINT16(s); /* pad2Octets (2 bytes) */
/**
* The Synchronize Update is an artifact from the
* T.128 protocol and should be ignored.
*/
} | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 208,305,618,170,888,600,000,000,000,000,000,000,000 | 8 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
static void node_free_rcu(struct rcu_head *head)
{
struct fib6_node *fn = container_of(head, struct fib6_node, rcu);
kmem_cache_free(fib6_node_kmem, fn);
} | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 45,676,242,135,566,060,000,000,000,000,000,000,000 | 6 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
grub_ext2_close (grub_file_t file)
{
grub_free (file->data);
grub_dl_unref (my_mod);
return GRUB_ERR_NONE;
} | 0 | [
"CWE-119"
] | grub | ac8cac1dac50daaf1c390d701cca3b55e16ee768 | 315,732,488,238,354,700,000,000,000,000,000,000,000 | 8 | * grub-core/fs/ext2.c: Remove variable length arrays. |
static u32 lsr_read_vluimsbf5(GF_LASeRCodec *lsr, const char *name)
{
u32 nb_words = 0;
u32 nb_tot, nb_bits, val;
while (gf_bs_read_int(lsr->bs, 1)) nb_words++;
nb_words++;
nb_tot = nb_words;
nb_bits = nb_words*4;
nb_tot += nb_bits;
val = gf_bs_read_int(lsr->bs, nb_bits);
if (name) GF_LOG(GF_LOG_DEBUG, GF_LOG... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 218,328,245,978,234,130,000,000,000,000,000,000,000 | 14 | fixed #2213 |
static int smack_post_notification(const struct cred *w_cred,
const struct cred *cred,
struct watch_notification *n)
{
struct smk_audit_info ad;
struct smack_known *subj, *obj;
int rc;
/* Always let maintenance notifications through. */
if (n->type == WATCH_TYPE_META)
return 0;
if (!cred)
retu... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 179,313,490,086,588,730,000,000,000,000,000,000,000 | 22 | 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.