func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void l2cap_le_flowctl_send(struct l2cap_chan *chan)
{
int sent = 0;
BT_DBG("chan %p", chan);
while (chan->tx_credits && !skb_queue_empty(&chan->tx_q)) {
l2cap_do_send(chan, skb_dequeue(&chan->tx_q));
chan->tx_credits--;
sent++;
}
BT_DBG("Sent %d credits %u queued %u", sent, chan->tx_credits,
... | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 90,275,900,185,828,660,000,000,000,000,000,000,000 | 15 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
if (argv) {
/* if argv != NULL, alloc as 'temp' */
int i;
for(i = 0; i < argc; i++) { argv[i] = (VALUE)NULL; }
#if 0 /* use Tcl_EventuallyFree */
Tcl_EventuallyFree((ClientData)argv, TCL_DYNAMIC); /* XXXXXXXX */
#else
#if 0 /* use Tcl_Preserve/Release */
Tcl_Release((ClientData)argv);... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 239,524,754,760,220,400,000,000,000,000,000,000,000 | 15 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
int sort_write_record(MI_SORT_PARAM *sort_param)
{
int flag;
uint length;
ulong block_length,reclength;
uchar *from;
uchar block_buff[8];
SORT_INFO *sort_info=sort_param->sort_info;
MI_CHECK *param=sort_info->param;
MI_INFO *info=sort_info->info;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("sort_write_r... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 150,011,343,117,341,120,000,000,000,000,000,000,000 | 108 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
void hns_rcb_get_ring_regs(struct hnae_queue *queue, void *data)
{
u32 *regs = data;
struct ring_pair_cb *ring_pair
= container_of(queue, struct ring_pair_cb, q);
u32 i = 0;
/*rcb ring registers */
regs[0] = dsaf_read_dev(queue, RCB_RING_RX_RING_BASEADDR_L_REG);
regs[1] = dsaf_read_dev(queue, RCB_RING_RX_RING_... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 202,270,758,500,059,130,000,000,000,000,000,000,000 | 50 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
kadm5_purgekeys(void *server_handle,
krb5_principal principal,
int keepkvno)
{
kadm5_server_handle_t handle = server_handle;
kadm5_ret_t ret;
krb5_db_entry *kdb;
osa_princ_ent_rec adb;
krb5_key_data *old_keydata;
int n_old_keydata;
int i, j, k;
CHECK_HAND... | 0 | [
"CWE-522",
"CWE-255"
] | krb5 | af0ed4df4dfae762ab5fb605f5a0c8f59cb4f6ca | 85,259,302,845,500,130,000,000,000,000,000,000,000 | 61 | Return only new keys in randkey [CVE-2014-5351]
In kadmind's randkey operation, if a client specifies the keepold
flag, do not include the preserved old keys in the response.
CVE-2014-5351:
An authenticated remote attacker can retrieve the current keys for a
service principal when generating a new set of keys for th... |
rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size)
{
/* Dynamic allocate of destination string if not provided */
*string = xmalloc(in_len * 2);
*str_size = in_len * 2;
#ifdef HAVE_ICONV
size_t ibl = in_len, obl = *str_size - 1;
char *pin = (char *) s->p, *pout = *string;
static iconv_t iconv_... | 1 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 109,004,942,617,650,020,000,000,000,000,000,000,000 | 74 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
void kvm_mmu_try_split_huge_pages(struct kvm *kvm,
const struct kvm_memory_slot *memslot,
u64 start, u64 end,
int target_level)
{
if (is_tdp_mmu_enabled(kvm))
kvm_tdp_mmu_try_split_huge_pages(kvm, memslot, start, end,
target_level, false);
/*
* A TLB flush is unnecessary at this point... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 300,120,574,347,002,670,000,000,000,000,000,000,000 | 14 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
struct elevator_queue *elevator_alloc(struct request_queue *q,
struct elevator_type *e)
{
struct elevator_queue *eq;
eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node);
if (unlikely(!eq))
return NULL;
eq->type = e;
kobject_init(&eq->kobj, &elv_ktype);
mutex_init(&eq->sysfs_lock);
hash_init(eq->hash);
... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 260,663,393,254,225,320,000,000,000,000,000,000,000 | 16 | 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... |
static HashTable *exif_get_tag_ht(tag_info_type *tag_table)
{
HashTable *ht;
if (!EXIF_G(tag_table_cache)) {
EXIF_G(tag_table_cache) = malloc(sizeof(HashTable));
zend_hash_init(EXIF_G(tag_table_cache), 0, NULL, exif_tag_ht_dtor, 1);
}
ht = zend_hash_index_find_ptr(EXIF_G(tag_table_cache), (uintptr_t) tag_tabl... | 0 | [
"CWE-125"
] | php-src | 0c77b4307df73217283a4aaf9313e1a33a0967ff | 105,627,060,486,016,250,000,000,000,000,000,000,000 | 18 | Fixed bug #79282 |
COND *Item_equal::build_equal_items(THD *thd, COND_EQUAL *inherited,
bool link_item_fields,
COND_EQUAL **cond_equal_ref)
{
COND *cond= Item_func::build_equal_items(thd, inherited, link_item_fields,
cond_... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 258,682,516,363,018,280,000,000,000,000,000,000,000 | 10 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
struct rds_connection *rds_conn_create_outgoing(struct net *net,
__be32 laddr, __be32 faddr,
struct rds_transport *trans, gfp_t gfp)
{
return __rds_conn_create(net, laddr, faddr, trans, gfp, 1);
} | 0 | [
"CWE-703"
] | linux | 74e98eb085889b0d2d4908f59f6e00026063014f | 212,097,577,472,429,100,000,000,000,000,000,000,000 | 6 | RDS: verify the underlying transport exists before creating a connection
There was no verification that an underlying transport exists when creating
a connection, this would cause dereferencing a NULL ptr.
It might happen on sockets that weren't properly bound before attempting to
send a message, which will cause a N... |
virtual ~Finder()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 246,638,891,441,860,970,000,000,000,000,000,000,000 | 3 | 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 ... |
Word pthread_equalHandler(void*, Word left, Word right) { return left.u64_ == right.u64_; } | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 144,954,976,351,664,790,000,000,000,000,000,000,000 | 1 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
DepsTracker::State DocumentSourceLookUp::getDependencies(DepsTracker* deps) const {
if (wasConstructedWithPipelineSyntax()) {
// We will use the introspection pipeline which we prebuilt during construction.
invariant(_resolvedIntrospectionPipeline);
// We are not attempting to enforce that ... | 0 | [
"CWE-416"
] | mongo | d6133a3a5464fac202f512b0310dfeb200c126f9 | 13,676,446,459,724,626,000,000,000,000,000,000,000 | 34 | SERVER-43350 $lookup with no local default or user-specified collation should explicitly set the simple collation on the foreign expression context |
dup_typedef_check(const char *type, struct lys_tpdf *tpdf, int size)
{
int i;
for (i = 0; i < size; i++) {
if (!strcmp(type, tpdf[i].name)) {
/* name collision */
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
} | 0 | [
"CWE-787"
] | libyang | f6d684ade99dd37b21babaa8a856f64faa1e2e0d | 101,545,675,971,795,020,000,000,000,000,000,000,000 | 13 | parser BUGFIX long identity name buffer overflow
STRING_OVERFLOW (CWE-120) |
get_win_number(win_T *wp, win_T *first_win)
{
int i = 1;
win_T *w;
for (w = first_win; w != NULL && w != wp; w = W_NEXT(w))
++i;
if (w == NULL)
return 0;
else
return i;
} | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 325,503,379,288,317,160,000,000,000,000,000,000,000 | 13 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
str_duplicate(VALUE klass, VALUE str)
{
VALUE dup = str_alloc(klass);
str_replace(dup, str);
return dup;
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 128,535,815,632,492,020,000,000,000,000,000,000,000 | 6 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void dump_marks(void)
{
static struct lock_file mark_lock;
FILE *f;
if (!export_marks_file)
return;
if (hold_lock_file_for_update(&mark_lock, export_marks_file, 0) < 0) {
failure |= error("Unable to write marks file %s: %s",
export_marks_file, strerror(errno));
return;
}
f = fdopen_lock_file(&m... | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 156,171,754,409,936,220,000,000,000,000,000,000,000 | 30 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
static inline struct io_context *ioc_task_link(struct io_context *ioc)
{
/*
* if ref count is zero, don't allow sharing (ioc is going away, it's
* a race).
*/
if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) {
atomic_inc(&ioc->nr_tasks);
return ioc;
}
return NULL;
} | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | linux | b69f2292063d2caf37ca9aec7d63ded203701bf3 | 290,646,447,925,722,560,000,000,000,000,000,000,000 | 13 | block: Fix io_context leak after failure of clone with CLONE_IO
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never
decremented whenever copy_process() fails afterwards, which prevents
exit_io_context() from calling IO schedulers exit functions.
Give a task_struct to exit_io_context(), and call exi... |
void __fastcall TNullConsole::Progress(TScriptProgress & /*Progress*/)
{
DebugFail();
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 52,860,262,967,340,550,000,000,000,000,000,000,000 | 4 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
void CompactProtocolReader::readMessageBegin(
std::string& name,
MessageType& messageType,
int32_t& seqid) {
int8_t protocolId;
int8_t versionAndType;
readByte(protocolId);
if (protocolId != detail::compact::PROTOCOL_ID) {
throwBadProtocolIdentifier();
}
readByte(versionAndType);
if ((in... | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 281,202,088,229,628,520,000,000,000,000,000,000,000 | 24 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
static s32 gf_hevc_read_vps_bs_internal(GF_BitStream *bs, HEVCState *hevc, Bool stop_at_vps_ext)
{
u8 vps_sub_layer_ordering_info_present_flag, vps_extension_flag;
u32 i, j;
s32 vps_id;
HEVC_VPS *vps;
u8 layer_id_included_flag[MAX_LHVC_LAYERS][64];
//nalu header already parsed
vps_id = gf_bs_read_int_log(bs, 4,... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 256,019,965,357,454,100,000,000,000,000,000,000,000 | 106 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
static void rds6_tcp_tc_info(struct socket *sock, unsigned int len,
struct rds_info_iterator *iter,
struct rds_info_lengths *lens)
{
struct rds6_info_tcp_socket tsinfo6;
struct rds_tcp_connection *tc;
unsigned long flags;
spin_lock_irqsave(&rds_tcp_tc_list_lock, flags);
if (len / sizeof(tsinfo6) ... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cb66ddd156203daefb8d71158036b27b0e2caf63 | 190,057,633,005,296,570,000,000,000,000,000,000,000 | 37 | net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
When it is to cleanup net namespace, rds_tcp_exit_net() will call
rds_tcp_kill_sock(), if t_sock is NULL, it will not call
rds_conn_destroy(), rds_conn_path_destroy() and rds_tcp_conn_free() to free
connection, and the worker cp_conn_w is ... |
MainWindow::~MainWindow()
{
delete ui;
Mlt::Controller::destroy();
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 13,985,191,562,690,554,000,000,000,000,000,000,000 | 5 | fix upgrade check is not using TLS correctly |
void send_message_osd_cluster(Message *m, const ConnectionRef& con) {
con->send_message(m);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 286,814,202,941,834,000,000,000,000,000,000,000,000 | 3 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
void Server::setConf(const QString &key, const QVariant &value) {
ServerDB::setConf(iServerNum, key, value);
} | 0 | [
"CWE-20"
] | mumble | 6b33dda344f89e5a039b7d79eb43925040654242 | 269,901,170,890,720,320,000,000,000,000,000,000,000 | 3 | Don't crash on long usernames |
cifs_get_tcp_session(struct smb_vol *volume_info)
{
struct TCP_Server_Info *tcp_ses = NULL;
struct sockaddr_storage addr;
struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr;
struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr;
int rc;
memset(&addr, 0, sizeof(struct sockaddr_storage));
c... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 4ff67b720c02c36e54d55b88c2931879b7db1cd2 | 6,742,335,648,281,378,000,000,000,000,000,000,000 | 125 | cifs: clean up cifs_find_smb_ses (try #2)
This patch replaces the earlier patch by the same name. The only
difference is that MAX_PASSWORD_SIZE has been increased to attempt to
match the limits that windows enforces.
Do a better job of matching sessions by authtype. Matching by username
for a Kerberos session is inco... |
gdk_pixbuf_load_async (GLoadableIcon *icon,
int size,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GTask *task;
task = g_task_new (icon, cancellab... | 0 | [] | gdk-pixbuf | deb78d971c4bcb9e3ccbb71e7925bc6baa707188 | 313,932,074,455,151,870,000,000,000,000,000,000,000 | 12 | Use g_try_malloc_n where it makes sense
This lets us avoid some manual overflow checks. |
CImg<T>& load_rgba(const char *const filename, const unsigned int dimw, const unsigned int dimh=1) {
return _load_rgba(0,filename,dimw,dimh);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 54,521,806,404,446,010,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void write_setup_cb(DBusMessageIter *iter, void *user_data)
{
struct pending_op *op = user_data;
DBusMessageIter array, dict;
dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, "y", &array);
dbus_message_iter_append_fixed_array(&array, DBUS_TYPE_BYTE,
&op->data.iov_base, op->data.iov_len);
dbus_m... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 197,759,078,076,286,150,000,000,000,000,000,000,000 | 26 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
void dm_internal_suspend_fast(struct mapped_device *md)
{
mutex_lock(&md->suspend_lock);
if (dm_suspended_md(md) || dm_suspended_internally_md(md))
return;
set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags);
synchronize_srcu(&md->io_barrier);
flush_workqueue(md->wq);
dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE)... | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 207,770,642,379,594,540,000,000,000,000,000,000,000 | 11 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
cache_fill_missing(struct module_env* env, uint16_t qclass,
struct regional* region, struct delegpt* dp)
{
struct delegpt_ns* ns;
struct msgreply_entry* neg;
struct ub_packed_rrset_key* akey;
time_t now = *env->now;
for(ns = dp->nslist; ns; ns = ns->next) {
akey = rrset_cache_lookup(env->rrset_cache, ns->name,... | 1 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 123,770,468,554,378,680,000,000,000,000,000,000,000 | 51 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
**/
CImg<T>& atan() {
if (is_empty()) return *this;
cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=8192))
cimg_rof(*this,ptrd,T) *ptrd = (T)std::atan((double)*ptrd);
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 123,899,318,065,593,810,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
void tcf_block_put(struct tcf_block *block)
{
struct tcf_block_ext_info ei = {0, };
if (!block)
return;
tcf_block_put_ext(block, block->q, &ei);
} | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 94,403,380,727,051,510,000,000,000,000,000,000,000 | 8 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
supports_expose_pids (void)
{
const char *path = g_find_program_in_path (flatpak_get_bwrap ());
struct stat st;
/* This is supported only if bwrap exists and is not setuid */
return
path != NULL &&
stat (path, &st) == 0 &&
(st.st_mode & S_ISUID) == 0;
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 42,117,583,756,694,215,000,000,000,000,000,000,000 | 11 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
cib_post_notify(int options, const char *op, xmlNode * update,
int result, xmlNode * new_obj)
{
gboolean needed = FALSE;
g_hash_table_foreach(client_list, need_post_notify, &needed);
if (needed == FALSE) {
return;
}
do_cib_notify(options, op, update, result, new_obj, T_CIB_... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 260,556,657,391,363,900,000,000,000,000,000,000,000 | 12 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
void set_result_field(Field *field) { result_field= field; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 93,537,804,990,322,820,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static int cap_sb_alloc_security(struct super_block *sb)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 140,070,927,373,256,530,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... |
HttpTransact::build_request(State* s, HTTPHdr* base_request, HTTPHdr* outgoing_request, HTTPVersion outgoing_version)
{
// this part is to restore the original URL in case, multiple cache
// lookups have happened - client request has been changed as the result
//
// notice that currently, based_request IS clien... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 168,816,201,508,903,940,000,000,000,000,000,000,000 | 125 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
struct json_parser *json_parser_init(struct istream *input)
{
return json_parser_init_flags(input, 0);
} | 0 | [] | core | 973769d74433de3c56c4ffdf4f343cb35d98e4f7 | 19,662,000,991,904,500,000,000,000,000,000,000,000 | 4 | lib: json - Escape invalid UTF-8 as unicode bytes
This prevents dovecot from crashing if invalid UTF-8 input
is given. |
int kern_addr_valid(unsigned long addr)
{
pgd_t *pgdp;
pud_t *pudp, pud;
pmd_t *pmdp, pmd;
pte_t *ptep, pte;
if ((((long)addr) >> VA_BITS) != -1UL)
return 0;
pgdp = pgd_offset_k(addr);
if (pgd_none(READ_ONCE(*pgdp)))
return 0;
pudp = pud_offset(pgdp, addr);
pud = READ_ONCE(*pudp);
if (pud_none(pud))
... | 0 | [] | linux | 15122ee2c515a253b0c66a3e618bc7ebe35105eb | 198,174,820,476,731,700,000,000,000,000,000,000,000 | 37 | arm64: Enforce BBM for huge IO/VMAP mappings
ioremap_page_range doesn't honour break-before-make and attempts to put
down huge mappings (using p*d_set_huge) over the top of pre-existing
table entries. This leads to us leaking page table memory and also gives
rise to TLB conflicts and spurious aborts, which have been s... |
void virtio_init(VirtIODevice *vdev, const char *name,
uint16_t device_id, size_t config_size)
{
int i;
vdev->device_id = device_id;
vdev->status = 0;
vdev->isr = 0;
vdev->queue_sel = 0;
vdev->config_vector = VIRTIO_NO_VECTOR;
vdev->vq = g_malloc0(sizeof(VirtQueue) * VIRTIO_... | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 142,874,818,839,973,920,000,000,000,000,000,000,000 | 27 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
_XimMakeICAttrIDList(
Xic ic,
XIMResourceList res_list,
unsigned int res_num,
XIMArg *arg,
CARD16 *buf,
INT16 *len,
unsigned long mode)
{
register XIMArg *p;
XIMResourceList res;
int check;
XrmQuark pre_quark;
XrmQuark sts_quark;
char *name;
INT1... | 0 | [
"CWE-190"
] | libx11 | 1703b9f3435079d3c6021e1ee2ec34fd4978103d | 131,784,730,585,924,180,000,000,000,000,000,000,000 | 83 | Change the data_len parameter of _XimAttributeToValue() to CARD16
It's coming from a length in the protocol (unsigned) and passed
to functions that expect unsigned int parameters (_XCopyToArg()
and memcpy()).
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Todd Carson <toc@daybefore.net> |
static void __inject_pit_timer_intr(struct kvm *kvm)
{
struct kvm_vcpu *vcpu;
int i;
kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 1);
kvm_set_irq(kvm, kvm->arch.vpit->irq_source_id, 0, 0);
/*
* Provides NMI watchdog support via Virtual Wire mode.
* The route is: PIT -> PIC -> LVT0 in NMI mode.
*
* ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | ee73f656a604d5aa9df86a97102e4e462dd79924 | 220,724,990,468,612,800,000,000,000,000,000,000,000 | 21 | KVM: PIT: control word is write-only
PIT control word (address 0x43) is write-only, reads are undefined.
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> |
static int process_metadata (WavpackContext *wpc, WavpackMetadata *wpmd)
{
WavpackStream *wps = wpc->streams [wpc->current_stream];
switch (wpmd->id) {
case ID_DUMMY:
return TRUE;
case ID_DECORR_TERMS:
return read_decorr_terms (wps, wpmd);
case ID_DECORR_WEIGHT... | 1 | [
"CWE-476",
"CWE-703"
] | WavPack | 25b4a2725d8568212e7cf89ca05ca29d128af7ac | 322,814,565,023,164,670,000,000,000,000,000,000,000 | 103 | issue #121: NULL pointer dereference in wvunpack.c
* check for NULL pointer before dereferencing in wvunpack.c
* sanitize custom extensions to be alphanumeric only |
utf_convert(
int a,
convertStruct table[],
int tableSize)
{
int start, mid, end; // indices into table
int entries = tableSize / sizeof(convertStruct);
start = 0;
end = entries;
while (start < end)
{
// need to search further
mid = (end + start) / 2;
if (table[mid].rangeEnd <... | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 139,249,617,873,542,770,000,000,000,000,000,000,000 | 27 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
static int nf_conntrack_standalone_init_proc(struct net *net)
{
struct proc_dir_entry *pde;
kuid_t root_uid;
kgid_t root_gid;
pde = proc_create_net("nf_conntrack", 0440, net->proc_net, &ct_seq_ops,
sizeof(struct ct_iter_state));
if (!pde)
goto out_nf_conntrack;
root_uid = make_kuid(net->user_ns, 0);
root_... | 0 | [
"CWE-203"
] | linux | 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 | 248,797,176,125,517,500,000,000,000,000,000,000,000 | 27 | netfilter: conntrack: Make global sysctls readonly in non-init netns
These sysctls point to global variables:
- NF_SYSCTL_CT_MAX (&nf_conntrack_max)
- NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
- NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)
Because their data pointers are not updated to point to per-netns
s... |
static short get_segment_selector(struct pt_regs *regs, int seg_reg_idx)
{
#ifdef CONFIG_X86_64
unsigned short sel;
switch (seg_reg_idx) {
case INAT_SEG_REG_IGNORE:
return 0;
case INAT_SEG_REG_CS:
return (unsigned short)(regs->cs & 0xffff);
case INAT_SEG_REG_SS:
return (unsigned short)(regs->ss & 0xffff);
... | 0 | [
"CWE-416",
"CWE-362"
] | linux | de9f869616dd95e95c00bdd6b0fcd3421e8a4323 | 308,630,215,291,264,560,000,000,000,000,000,000,000 | 75 | x86/insn-eval: Fix use-after-free access to LDT entry
get_desc() computes a pointer into the LDT while holding a lock that
protects the LDT from being freed, but then drops the lock and returns the
(now potentially dangling) pointer to its caller.
Fix it by giving the caller a copy of the LDT entry instead.
Fixes: 6... |
InputFile::~InputFile ()
{
if (_data->_deleteStream)
delete _data->_streamData->is;
// unless this file was opened via the multipart API,
// delete the streamData object too
if (_data->partNumber==-1 && _data->_streamData)
delete _data->_streamData;
if (_data) delete _data;
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 123,218,933,473,085,020,000,000,000,000,000,000,000 | 12 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
makeRGBToIndexTables(l_int32 cqlevels,
l_uint32 **prtab,
l_uint32 **pgtab,
l_uint32 **pbtab)
{
l_int32 i;
l_uint32 *rtab, *gtab, *btab;
PROCNAME("makeRGBToIndexTables");
if (cqlevels < 1 || cqlevels > 6)
return ERROR_INT("cqleve... | 0 | [
"CWE-125"
] | leptonica | 5ee24b398bb67666f6d173763eaaedd9c36fb1e5 | 339,342,197,708,385,870,000,000,000,000,000,000,000 | 93 | Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow
* color quantized pix must be 8 bpp before extra colors are added. |
static void emit_add_line(const char *reset, struct emit_callback *ecbdata, const char *line, int len)
{
const char *ws = diff_get_color(ecbdata->color_diff, DIFF_WHITESPACE);
const char *set = diff_get_color(ecbdata->color_diff, DIFF_FILE_NEW);
if (!*ws)
emit_line(ecbdata->file, set, reset, line, len);
else {
... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 267,309,237,449,456,660,000,000,000,000,000,000,000 | 15 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
mrb_exc_get_id(mrb_state *mrb, mrb_sym name)
{
struct RClass *exc, *e;
mrb_value c = mrb_const_get(mrb, mrb_obj_value(mrb->object_class), name);
if (!mrb_class_p(c)) {
mrb_raise(mrb, mrb->eException_class, "exception corrupted");
}
exc = e = mrb_class_ptr(c);
while (e) {
if (e == mrb->eException_c... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 221,766,620,892,797,480,000,000,000,000,000,000,000 | 17 | class.c: clear method cache after `remove_method`. |
static long setup_tm_sigcontexts(struct sigcontext __user *sc,
struct sigcontext __user *tm_sc,
struct pt_regs *regs,
int signr, sigset_t *set, unsigned long handler)
{
/* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the
* process never used altivec yet (MSR_VEC is zero in pt_regs of
... | 0 | [
"CWE-20",
"CWE-284",
"CWE-369"
] | linux | d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 | 231,630,479,117,790,900,000,000,000,000,000,000,000 | 123 | powerpc/tm: Block signal return setting invalid MSR state
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit s... |
static int r_core_bin_file_print(RCore *core, RBinFile *binfile, int mode) {
RListIter *iter;
RBinObject *obj;
const char *name = binfile ? binfile->file : NULL;
(void)r_bin_get_info (core->bin); // XXX is this necssary for proper iniitialization
ut32 id = binfile ? binfile->id : 0;
ut32 fd = binfile ? binfile->f... | 0 | [
"CWE-416"
] | radare2 | f85bc674b2a2256a364fe796351bc1971e106005 | 167,467,146,330,490,200,000,000,000,000,000,000,000 | 46 | Fix #7698 - UAF in r_config_set when loading a dex |
Metadata(const String *str)
{
my_string_metadata_get(this, str->charset(), str->ptr(), str->length());
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 31,463,988,448,074,732,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
int verify_permission() override { return 0; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 67,917,667,160,364,840,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 <... |
static bool load_ltks_timeout(gpointer user_data)
{
struct btd_adapter *adapter = user_data;
btd_error(adapter->dev_id, "Loading LTKs timed out for hci%u",
adapter->dev_id);
adapter->load_ltks_timeout = 0;
mgmt_cancel(adapter->mgmt, adapter->load_ltks_id);
adapter->load_ltks_id = 0;
return FALSE;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 5,429,965,560,134,749,000,000,000,000,000,000,000 | 14 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
static int packet_bind_spkt(struct socket *sock, struct sockaddr *uaddr,
int addr_len)
{
struct sock *sk = sock->sk;
char name[sizeof(uaddr->sa_data) + 1];
/*
* Check legality
*/
if (addr_len != sizeof(struct sockaddr))
return -EINVAL;
/* uaddr->sa_data comes from the userspace, it's not guaranteed ... | 0 | [
"CWE-119"
] | linux | 2b6867c2ce76c596676bec7d2d525af525fdc6e2 | 228,782,335,931,776,160,000,000,000,000,000,000,000 | 20 | net/packet: fix overflow in check for priv area size
Subtracting tp_sizeof_priv from tp_block_size and casting to int
to check whether one is less then the other doesn't always work
(both of them are unsigned ints).
Compare them as is instead.
Also cast tp_sizeof_priv to u64 before using BLK_PLUS_PRIV, as
it can ove... |
static void set_voice_volume(int voice, int volume, int main_vol)
{
unsigned char vol1, vol2, vol3, vol4;
struct sbi_instrument *instr;
struct physical_voice_info *map;
if (voice < 0 || voice >= devc->nr_voice)
return;
map = &pv_map[devc->lv_map[voice]];
instr = devc->act_i[voice];
if (!instr)
instr = &de... | 0 | [
"CWE-119",
"CWE-264",
"CWE-284"
] | linux | 4d00135a680727f6c3be78f8befaac009030e4df | 113,034,988,353,043,160,000,000,000,000,000,000,000 | 86 | sound/oss/opl3: validate voice and channel indexes
User-controllable indexes for voice and channel values may cause reading
and writing beyond the bounds of their respective arrays, leading to
potentially exploitable memory corruption. Validate these indexes.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
C... |
static int ixgbe_pci_sriov_disable(struct pci_dev *dev)
{
struct ixgbe_adapter *adapter = pci_get_drvdata(dev);
int err;
#ifdef CONFIG_PCI_IOV
u32 current_flags = adapter->flags;
int prev_num_vf = pci_num_vf(dev);
#endif
err = ixgbe_disable_sriov(adapter);
/* Only reinit if no error and state changed */
#ifdef ... | 0 | [
"CWE-20"
] | linux | 63e39d29b3da02e901349f6cd71159818a4737a6 | 1,413,071,307,416,138,800,000,000,000,000,000,000 | 20 | ixgbe: fix large MTU request from VF
Check that the MTU value requested by the VF is in the supported
range of MTUs before attempting to set the VF large packet enable,
otherwise reject the request. This also avoids unnecessary
register updates in the case of the 82599 controller.
Fixes: 872844ddb9e4 ("ixgbe: Enable ... |
static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
format[MaxTextExtent],
keyword[MaxTextExtent],
tag[MaxTextExtent],
value[MaxTextExtent];
double
gamma;
Image
*image;
int
c;
MagickBooleanType
status,
value_expected;
register Quan... | 1 | [
"CWE-20",
"CWE-703",
"CWE-835"
] | ImageMagick | 97aa7d7cfd2027f6ba7ce42caf8b798541b9cdc6 | 216,190,011,410,323,240,000,000,000,000,000,000,000 | 365 | Fixed infinite loop and added checks for the sscanf result. |
Vdbe *sqlite3GetVdbe(Parse *pParse){
if( pParse->pVdbe ){
return pParse->pVdbe;
}
if( pParse->pToplevel==0
&& OptimizationEnabled(pParse->db,SQLITE_FactorOutConst)
){
pParse->okConstFactor = 1;
}
return sqlite3VdbeCreate(pParse);
} | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 47,050,564,006,956,920,000,000,000,000,000,000,000 | 11 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
static int oz_cdev_open(struct inode *inode, struct file *filp)
{
struct oz_cdev *dev = container_of(inode->i_cdev, struct oz_cdev, cdev);
oz_dbg(ON, "major = %d minor = %d\n", imajor(inode), iminor(inode));
filp->private_data = dev;
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c2c65cd2e14ada6de44cb527e7f1990bede24e15 | 315,157,754,011,337,800,000,000,000,000,000,000,000 | 9 | staging: ozwpan: prevent overflow in oz_cdev_write()
We need to check "count" so we don't overflow the ei->data buffer.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <t... |
TagLib::uint Ogg::XiphComment::year() const
{
if(!d->fieldListMap["DATE"].isEmpty())
return d->fieldListMap["DATE"].front().toInt();
if(!d->fieldListMap["YEAR"].isEmpty())
return d->fieldListMap["YEAR"].front().toInt();
return 0;
} | 0 | [
"CWE-20"
] | taglib | ab8a0ee8937256311e649a88e8ddd7c7f870ad59 | 178,385,161,194,793,620,000,000,000,000,000,000,000 | 8 | Don't store the output of ByteVector::toUInt() in int, use uint instead |
u32 gf_rtp_build_au_hdr_write(GP_RTPPacketizer *builder, u32 PayloadSize, u32 RTP_TS)
{
u32 nbBits = 0;
s32 delta;
/*selective encryption*/
if (builder->flags & GP_RTP_PCK_SELECTIVE_ENCRYPTION) {
gf_bs_write_int(builder->pck_hdr, builder->is_encrypted, 1);
gf_bs_write_int(builder->pck_hdr, 0, 7);
nbBits = 8;... | 0 | [
"CWE-787"
] | gpac | 1773b7a34bc08734aee7d3f5dfe65d06389fe15a | 225,268,305,693,361,100,000,000,000,000,000,000,000 | 97 | fixed #2173 |
void tracer_tracing_off(struct trace_array *tr)
{
if (tr->trace_buffer.buffer)
ring_buffer_record_off(tr->trace_buffer.buffer);
/*
* This flag is looked at when buffers haven't been allocated
* yet, or by some tracers (like irqsoff), that just want to
* know if the ring buffer has been disabled, but it can ha... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 178,752,409,160,102,130,000,000,000,000,000,000,000 | 16 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
template <typename T, typename R> void testAssertEqual(const char * msg, const T a, const R b)
{
if (a != T(b))
{
fprintf(stderr, msg, a, T(b));
exit(1);
}
} | 0 | [
"CWE-476"
] | graphite | db132b4731a9b4c9534144ba3a18e65b390e9ff6 | 196,139,298,133,260,430,000,000,000,000,000,000,000 | 8 | Deprecate and make ineffective gr_face_dumbRendering |
void wait_for_other(int fd) {
//****************************
// wait for the parent to be initialized
//****************************
char childstr[BUFLEN + 1];
int newfd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
if (newfd == -1)
errExit("fcntl");
FILE* stream;
stream = fdopen(newfd, "r");
*childstr = '\0';
if (fgets... | 1 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 119,779,614,081,483,970,000,000,000,000,000,000,000 | 51 | fixing CVE-2022-31214 |
static void discovery_remove(struct discovery_client *client)
{
struct btd_adapter *adapter = client->adapter;
DBG("owner %s", client->owner);
adapter->set_filter_list = g_slist_remove(adapter->set_filter_list,
client);
adapter->discovery_list = g_slist_remove(adapter->discovery_list,
client);
... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 101,353,124,927,322,530,000,000,000,000,000,000,000 | 30 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
WindowByNumber(str)
char *str;
{
int i;
char *s;
for (i = 0, s = str; *s; s++)
{
if (*s < '0' || *s > '9')
break;
i = i * 10 + (*s - '0');
}
return *s ? -1 : i;
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 149,553,103,882,422,580,000,000,000,000,000,000,000 | 14 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
void iriap_close(struct iriap_cb *self)
{
struct iriap_cb *entry;
IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
if (self->lsap) {
irlmp_close_lsap(self->lsap);
self->lsap = NULL;
}
entry = (struct iriap_cb *) hashbin_remove(iriap, (... | 0 | [] | linux-2.6 | d370af0ef7951188daeb15bae75db7ba57c67846 | 224,749,872,231,402,700,000,000,000,000,000,000,000 | 19 | irda: validate peer name and attribute lengths
Length fields provided by a peer for names and attributes may be longer
than the destination array sizes. Validate lengths to prevent stack
buffer overflows.
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <da... |
static int hash_walk_new_entry(struct crypto_hash_walk *walk)
{
struct scatterlist *sg;
sg = walk->sg;
walk->pg = sg_page(sg);
walk->offset = sg->offset;
walk->entrylen = sg->length;
if (walk->entrylen > walk->total)
walk->entrylen = walk->total;
walk->total -= walk->entrylen;
return hash_walk_next(walk);
... | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 163,857,037,580,768,990,000,000,000,000,000,000,000 | 15 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
tr_variant* tr_variantDictAddRaw(tr_variant* dict, tr_quark const key, void const* src, size_t len)
{
tr_variant* child = dictFindOrAdd(dict, key, TR_VARIANT_TYPE_STR);
tr_variantInitRaw(child, src, len);
return child;
} | 0 | [
"CWE-416",
"CWE-284"
] | transmission | 2123adf8e5e1c2b48791f9d22fc8c747e974180e | 311,509,572,992,415,730,000,000,000,000,000,000,000 | 6 | CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk
In libtransmission/variant.c, function tr_variantWalk, when the variant
stack is reallocated, a pointer to the previously allocated memory
region is kept. This address is later accessed (heap use-after-free)
while walking back down the stack, causing the applic... |
switch (yych) {
case 'a': goto yy18;
default: goto yy17;
} | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 167,158,894,082,472,430,000,000,000,000,000,000,000 | 4 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
GF_Err fpar_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_Err e;
FilePartitionBox *ptr = (FilePartitionBox *)s;
ISOM_DECREASE_SIZE(ptr, ((ptr->version ? 4 : 2) + 12) );
ptr->itemID = gf_bs_read_int(bs, ptr->version ? 32 : 16);
ptr->packet_payload_size = gf_bs_read_u16(bs);
gf_bs_read_u8(bs);
ptr->FEC_enco... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 209,859,018,476,858,770,000,000,000,000,000,000,000 | 34 | fixed #1587 |
ModuleExport size_t RegisterWEBPImage(void)
{
char
version[MagickPathExtent];
MagickInfo
*entry;
*version='\0';
entry=AcquireMagickInfo("WEBP","WEBP","WebP Image Format");
#if defined(MAGICKCORE_WEBP_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadWEBPImage;
entry->encoder=(EncodeImageHandler ... | 0 | [
"CWE-400"
] | ImageMagick | cb63560ba25e4a6c51ab282538c24877fff7d471 | 84,617,078,919,978,710,000,000,000,000,000,000,000 | 27 | https://github.com/ImageMagick/ImageMagick/issues/641 |
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
{
sk_tx_queue_clear(sk);
sk->sk_socket = sock;
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 151,990,500,312,657,600,000,000,000,000,000,000,000 | 5 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static void gem_transmit(CadenceGEMState *s)
{
uint32_t desc[DESC_MAX_NUM_WORDS];
hwaddr packet_desc_addr;
uint8_t *p;
unsigned total_bytes;
int q = 0;
/* Do nothing if transmit is not enabled. */
if (!(s->regs[GEM_NWCTRL] & GEM_NWCTRL_TXENA)) {
return;
}
DB_PRINT("\... | 1 | [
"CWE-835"
] | qemu | e73adfbeec9d4e008630c814759052ed945c3fed | 281,039,173,001,832,050,000,000,000,000,000,000,000 | 150 | cadence_gem: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redha... |
zop_def(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
os_ptr op1 = op - 1;
ref *pvslot;
/* The following combines a check_op(2) with a type check. */
switch (r_type(op1)) {
case t_name: {
/* We can use the fast single-probe lookup here. */
uint nidx = name_index(imemory, op1)... | 0 | [] | ghostpdl | d683d1e6450d74619e6277efeebfc222d9a5cb91 | 263,112,919,981,968,320,000,000,000,000,000,000,000 | 50 | Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps.
We were under the impression that the Windows driver 'PScript5.dll' used
superexec, but after testing with our extensive suite of PostScript file,
and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear
that this operator is ... |
int ndpi_load_ipv4_ptree(struct ndpi_detection_module_struct *ndpi_str,
const char *path, u_int16_t protocol_id) {
char buffer[128], *line, *addr, *cidr, *saveptr;
FILE *fd;
int len;
u_int num_loaded = 0;
fd = fopen(path, "r");
if(fd == NULL) {
NDPI_LOG_ERR(ndpi_str, "Unable to open file %s [%s]\n... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 232,422,951,948,072,470,000,000,000,000,000,000,000 | 45 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
static int kvm_arch_vcpu_ioctl_set_initial_psw(struct kvm_vcpu *vcpu, psw_t psw)
{
int rc = 0;
if (!is_vcpu_stopped(vcpu))
rc = -EBUSY;
else {
vcpu->run->psw_mask = psw.mask;
vcpu->run->psw_addr = psw.addr;
}
return rc;
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 128,705,985,006,864,300,000,000,000,000,000,000,000 | 12 | 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... |
int inet6_register_protosw(struct inet_protosw *p)
{
struct list_head *lh;
struct inet_protosw *answer;
struct list_head *last_perm;
int protocol = p->protocol;
int ret;
spin_lock_bh(&inetsw6_lock);
ret = -EINVAL;
if (p->type >= SOCK_MAX)
goto out_illegal;
/* If we are trying to override a permanent proto... | 0 | [] | net | 79462ad02e861803b3840cc782248c7359451cd9 | 110,962,708,866,547,480,000,000,000,000,000,000,000 | 54 | net: add validation for the socket syscall protocol argument
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:
int socket_fd;
struct sockaddr_in addr;
addr.sin_port = 0;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = 10;
socket_fd = socket(10,3,0x40000000);
connect(s... |
bool Curl_ssl_data_pending(const struct connectdata *conn,
int connindex)
{
return Curl_ssl->data_pending(conn, connindex);
} | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 327,495,252,431,840,460,000,000,000,000,000,000,000 | 5 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
TEST(QueryProjectionTest, InclusionProjectionDefaults) {
auto proj = createProjection("{}", "{_id: 1}");
ASSERT_FALSE(proj.metadataDeps()[DocumentMetadataFields::kSortKey]);
ASSERT_FALSE(proj.requiresDocument());
ASSERT_FALSE(proj.requiresMatchDetails());
ASSERT_FALSE(proj.metadataDeps()[DocumentMe... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 260,708,824,846,863,170,000,000,000,000,000,000,000 | 10 | SERVER-53929 Add stricter parser checks around positional projection |
static void convert_6u32s_C1R(const OPJ_BYTE* pSrc, OPJ_INT32* pDst,
OPJ_SIZE_T length)
{
OPJ_SIZE_T i;
for (i = 0; i < (length & ~(OPJ_SIZE_T)3U); i += 4U) {
OPJ_UINT32 val0 = *pSrc++;
OPJ_UINT32 val1 = *pSrc++;
OPJ_UINT32 val2 = *pSrc++;
pDst[i + 0... | 0 | [
"CWE-787"
] | openjpeg | e5285319229a5d77bf316bb0d3a6cbd3cb8666d9 | 226,249,565,878,385,000,000,000,000,000,000,000,000 | 29 | pgxtoimage(): fix write stack buffer overflow (#997) |
static int set_helper_option(struct transport *transport,
const char *name, const char *value)
{
struct helper_data *data = transport->data;
struct strbuf buf = STRBUF_INIT;
int i, ret, is_bool = 0;
get_helper(transport);
if (!data->option)
return 1;
if (!strcmp(name, "deepen-not"))
return string_list... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 336,126,485,174,972,700,000,000,000,000,000,000,000 | 39 | 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)... |
void put_unused_fd(unsigned int fd)
{
struct files_struct *files = current->files;
spin_lock(&files->file_lock);
__put_unused_fd(files, fd);
spin_unlock(&files->file_lock);
} | 0 | [
"CWE-732"
] | linux-stable | e57712ebebbb9db7d8dcef216437b3171ddcf115 | 279,020,362,254,434,840,000,000,000,000,000,000,000 | 7 | merge fchmod() and fchmodat() guts, kill ancient broken kludge
The kludge in question is undocumented and doesn't work for 32bit
binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as
mode had (since 0.99.14v and contrary to behaviour of any
other Unix, prescriptions of POSIX, SuS and our own manpages)
was kinda-... |
expand_arith_string (string, quoted)
char *string;
int quoted;
{
WORD_DESC td;
WORD_LIST *list, *tlist;
size_t slen;
int i, saw_quote;
char *ret;
DECLARE_MBSTATE;
/* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */
slen = (MB_CUR_MAX > 1) ? strlen (string) : 0;
... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 109,068,266,421,773,160,000,000,000,000,000,000,000 | 59 | bash-4.4-rc2 release |
static void init_macros(void)
{
hash_init(&smacros, HASH_LARGE);
hash_init(&mmacros, HASH_LARGE);
} | 0 | [
"CWE-125"
] | nasm | 3144e84add8b152cc7a71e44617ce6f21daa4ba3 | 254,024,721,793,589,700,000,000,000,000,000,000,000 | 5 | preproc: Don't access offsting byte on unterminated strings
https://bugzilla.nasm.us/show_bug.cgi?id=3392446
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> |
static opj_image_t* bmp8toimage(const OPJ_UINT8* pData, OPJ_UINT32 stride, opj_image_t* image, OPJ_UINT8 const* const* pLUT)
{
OPJ_UINT32 width, height;
const OPJ_UINT8 *pSrc = NULL;
width = image->comps[0].w;
height = image->comps[0].h;
pSrc = pData + (height - 1U) * stride;
if (image->numcomps == 1U) {
o... | 0 | [
"CWE-703",
"CWE-125"
] | openjpeg | 15f081c89650dccee4aa4ae66f614c3fdb268767 | 46,359,592,012,105,900,000,000,000,000,000,000,000 | 22 | Fix Out-Of-Bounds Read in sycc42x_to_rgb function (#745)
42x Images with an odd x0/y0 lead to subsampled component starting at the
2nd column/line.
That is offset = comp->dx * comp->x0 - image->x0 = 1
Fix #726 |
do_tags(exarg_T *eap UNUSED)
{
int i;
char_u *name;
taggy_T *tagstack = curwin->w_tagstack;
int tagstackidx = curwin->w_tagstackidx;
int tagstacklen = curwin->w_tagstacklen;
// Highlight title
msg_puts_title(_("\n # TO tag FROM line in file/text"));
for (i = 0; i < tagstack... | 0 | [
"CWE-416"
] | vim | adce965162dd89bf29ee0e5baf53652e7515762c | 201,331,348,858,052,020,000,000,000,000,000,000,000 | 35 | patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer
Problem: Using freed memory when 'tagfunc' deletes the buffer.
Solution: Make a copy of the tag name. |
QPDFNumberTreeObjectHelper::getMax()
{
if (this->m->entries.empty())
{
return 0;
}
// Our map is sorted in reverse.
return this->m->entries.begin()->first;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 98,683,464,615,835,010,000,000,000,000,000,000,000 | 9 | 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 rtc_status_pending_eoi_check_valid(struct kvm_ioapic *ioapic)
{
if (WARN_ON(ioapic->rtc_status.pending_eoi < 0))
kvm_rtc_eoi_tracking_restore_all(ioapic);
} | 0 | [
"CWE-703",
"CWE-125"
] | linux | 81cdb259fb6d8c1c4ecfeea389ff5a73c07f5755 | 332,003,208,547,029,670,000,000,000,000,000,000,000 | 5 | KVM: x86: fix out-of-bounds accesses of rtc_eoi map
KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be
bigger that the maximal number of VCPUs, resulting in out-of-bounds
access.
Found by syzkaller:
BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...]
Write of size 1 ... |
MonoReflectionType*
mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
{
g_assert_not_reached ();
return NULL; | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 175,982,380,834,080,120,000,000,000,000,000,000,000 | 5 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
ldns_rdf2buffer_str_dname(ldns_buffer *output, const ldns_rdf *dname)
{
/* can we do with 1 pos var? or without at all? */
uint8_t src_pos = 0;
uint8_t len;
uint8_t *data;
uint8_t i;
unsigned char c;
data = (uint8_t*)ldns_rdf_data(dname);
len = data[src_pos];
if (ldns_rdf_size(dname) > LDNS_MAX_DOMAINLEN) {
... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 23,853,170,769,240,166,000,000,000,000,000,000,000 | 50 | CAA and URI |
xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
int terminate) {
int end_in_lf = 0;
int remain = 0;
size_t old_avail = 0;
size_t avail = 0;
if (ctxt == NULL)
return(XML_ERR_INTERNAL_ERROR);
if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
... | 1 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 11,229,387,013,454,492,000,000,000,000,000,000,000 | 164 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
parser_emit_cbc_call (parser_context_t *context_p, /**< context */
uint16_t opcode, /**< opcode */
size_t call_arguments) /**< number of arguments */
{
JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_BYTE_ARG));
JERRY_ASSERT (call_arguments <= CBC_MAXIMUM_BYTE_VALUE);
if... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 311,584,772,370,868,860,000,000,000,000,000,000,000 | 15 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int check_ssl_ca(const X509 *x)
{
int ca_ret;
ca_ret = check_ca(x);
if(!ca_ret) return 0;
/* check nsCertType if present */
if(ca_ret != 5 || x->ex_nscert & NS_SSL_CA) return ca_ret;
else return 0;
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 203,179,078,677,719,040,000,000,000,000,000,000,000 | 9 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
int32_t cli_bcapi_pdf_get_obj_num(struct cli_bc_ctx *ctx)
{
if (!ctx->pdf_phase)
return -1;
return ctx->pdf_nobjs;
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 288,646,657,142,858,500,000,000,000,000,000,000,000 | 6 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
GROW;
if (CUR == '<') {
if (NXT(1) == '!') {
switch (NXT(2)) {
case 'E':
if (NXT(3) == 'L')
xmlParseElementDecl(ctxt);
else if (NXT(3) == 'N')
xmlParseEntityDecl(ctxt);
break;
case 'A':
xmlParseAttributeList... | 0 | [
"CWE-703",
"CWE-835"
] | libxml2 | 899a5d9f0ed13b8e32449a08a361e0de127dd961 | 178,176,072,227,607,730,000,000,000,000,000,000,000 | 48 | Detect infinite recursion in parameter entities
When expanding a parameter entity in a DTD, infinite recursion could
lead to an infinite loop or memory exhaustion.
Thanks to Wei Lei for the first of many reports.
Fixes bug 759579. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.