func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
{
zval *id, *docp = NULL;
xmlDoc *doc = NULL, *newdoc = NULL;
xsltStylesheetPtr sheetp, oldsheetp;
xsl_object *intern;
int prevSubstValue, prevExtDtdValue, clone_docu = 0;
xmlNode *nodep = NULL;
zend_object_handlers *std_hnd;
zval *cloneDocu, *member;
if (zen... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 39,685,237,598,312,155,000,000,000,000,000,000,000 | 81 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
**/
T& atNXYZC(const int pos, const int x, const int y, const int z, const int c) {
if (is_empty())
throw CImgInstanceException(_cimglist_instance
"atNXYZC(): Empty instance.",
cimglist_instance);
return _atNXYZC(pos,x,... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 329,270,193,119,065,500,000,000,000,000,000,000,000 | 8 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int nf_tables_fill_obj_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event, u32 flags,
int family, const struct nft_table *table,
struct nft_object *obj, bool reset)
{
struct nlmsghdr *nlh;
event = nfnl_msg_type(NFNL_SUBSYS_NFTABLES, event);
nlh = nfnl_msg_put(skb, ... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 154,412,625,220,344,100,000,000,000,000,000,000,000 | 33 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
int ptrace_request(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
bool seized = child->ptrace & PT_SEIZED;
int ret = -EIO;
siginfo_t siginfo, *si;
void __user *datavp = (void __user *) data;
unsigned long __user *datalp = datavp;
unsigned long flags;
switch (request) {
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | d049f74f2dbe71354d43d393ac3a188947811348 | 298,221,517,735,790,520,000,000,000,000,000,000,000 | 213 | exec/ptrace: fix get_dumpable() incorrect tests
The get_dumpable() return value is not boolean. Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0). The SUID_DUMP_ROOT(2) is also considered a
protected state. Almost all places did this correctly, excepti... |
static unsigned long __gfn_to_hva_many(const struct kvm_memory_slot *slot, gfn_t gfn,
gfn_t *nr_pages, bool write)
{
if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
return KVM_HVA_ERR_BAD;
if (memslot_is_readonly(slot) && write)
return KVM_HVA_ERR_RO_BAD;
if (nr_pages)
*nr_pages = slot->npages - ... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 202,245,516,843,751,000,000,000,000,000,000,000,000 | 14 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
DLLIMPORT int cfg_opt_setcomment(cfg_opt_t *opt, char *comment)
{
char *oldcomment, *newcomment;
if (!opt || !comment) {
errno = EINVAL;
return CFG_FAIL;
}
oldcomment = opt->comment;
newcomment = strdup(comment);
if (!newcomment)
return CFG_FAIL;
if (oldcomment)
free(oldcomment);
opt->comment = newco... | 0 | [] | libconfuse | d73777c2c3566fb2647727bb56d9a2295b81669b | 218,865,058,399,007,520,000,000,000,000,000,000,000 | 22 | Fix #163: unterminated username used with getpwnam()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com> |
static int ioctl_connadd(struct hidp_connadd_req *req)
{
int ctl, err = 0;
ctl = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HIDP);
if (ctl < 0)
return -errno;
if (ioctl(ctl, HIDPCONNADD, req) < 0)
err = -errno;
close(ctl);
return err;
} | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 333,037,760,038,327,560,000,000,000,000,000,000,000 | 15 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
static inline void copy_xregs_to_kernel(struct xregs_state *xstate)
{
u64 mask = -1;
u32 lmask = mask;
u32 hmask = mask >> 32;
int err;
WARN_ON_FPU(!alternatives_patched);
XSTATE_XSAVE(xstate, lmask, hmask, err);
/* We should never fault when copying to a kernel buffer: */
WARN_ON_FPU(err);
} | 0 | [
"CWE-119",
"CWE-732",
"CWE-787"
] | linux | 59c4bd853abcea95eccc167a7d7fd5f1a5f47b98 | 97,492,272,350,267,520,000,000,000,000,000,000,000 | 14 | x86/fpu: Don't cache access to fpu_fpregs_owner_ctx
The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing
to the context that is currently loaded. It never changed during the
lifetime of a task - it remained stable/constant.
After deferred FPU registers loading until return to userland was
implement... |
static void setup_ksp_vsid(struct task_struct *p, unsigned long sp)
{
#ifdef CONFIG_PPC_BOOK3S_64
unsigned long sp_vsid;
unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp;
if (radix_enabled())
return;
if (mmu_has_feature(MMU_FTR_1T_SEGMENT))
sp_vsid = get_kernel_vsid(sp, MMU_SEGSIZE_1T)
<< SLB_VSID... | 0 | [
"CWE-862"
] | linux | 8205d5d98ef7f155de211f5e2eb6ca03d95a5a60 | 36,602,793,016,116,646,000,000,000,000,000,000,000 | 19 | powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
When we take an FP unavailable exception in a transaction we have to
account for the hardware FP TM checkpointed registers being
incorrect. In this case for this process we know the current and
checkpointed FP registers must be the same (since FP wasn'... |
struct ath6kl_vif *ath6kl_get_vif_by_index(struct ath6kl *ar, u8 if_idx)
{
struct ath6kl_vif *vif, *found = NULL;
if (WARN_ON(if_idx > (ar->vif_max - 1)))
return NULL;
/* FIXME: Locking */
spin_lock_bh(&ar->list_lock);
list_for_each_entry(vif, &ar->vif_list, list) {
if (vif->fw_vif_idx == if_idx) {
found ... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 206,918,181,983,116,080,000,000,000,000,000,000,000 | 19 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
DEFUN (no_neighbor_attr_unchanged,
no_neighbor_attr_unchanged_cmd,
NO_NEIGHBOR_CMD2 "attribute-unchanged",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"BGP attribute is propagated unchanged to this neighbor\n")
{
return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 213,688,859,891,369,230,000,000,000,000,000,000,000 | 14 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
size_t mg_mqtt_next_sub(struct mg_mqtt_message *msg, struct mg_str *topic,
uint8_t *qos, size_t pos) {
uint8_t tmp;
return mg_mqtt_next_topic(msg, topic, qos == NULL ? &tmp : qos, pos);
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 105,569,819,700,302,320,000,000,000,000,000,000,000 | 5 | Protect against the directory traversal in mg_upload() |
**/
CImg<T> operator|(const char *const expression) const {
return (+*this)|=expression; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 108,006,714,650,982,080,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
**/
CImgDisplay& paint() {
return assign(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 37,802,944,446,459,836,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int ethtool_get_settings(struct net_device *dev, void __user *useraddr)
{
struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
int err;
if (!dev->ethtool_ops->get_settings)
return -EOPNOTSUPP;
err = dev->ethtool_ops->get_settings(dev, &cmd);
if (err < 0)
return err;
if (copy_to_user(useraddr, &cmd, siz... | 0 | [
"CWE-190"
] | linux-2.6 | db048b69037e7fa6a7d9e95a1271a50dc08ae233 | 300,625,689,843,726,220,000,000,000,000,000,000,000 | 16 | ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer
overflow and the buffer may be smaller than needed. Since
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
least denial of service.
Signed-off-by: Ben Hutching... |
int bus_set_address_system_remote(sd_bus *b, const char *host) {
_cleanup_free_ char *e = NULL;
char *m = NULL, *c = NULL, *a, *rbracket = NULL, *p = NULL;
assert(b);
assert(host);
/* Skip ":"s in ipv6 addresses */
if (*host == '[') {
char *t;
... | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 14,926,520,906,272,722,000,000,000,000,000,000,000 | 89 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... |
main (int argc, char *argv[])
{
guint n;
guint ret;
gint rc;
gboolean opt_show_help;
gboolean opt_show_version;
gboolean opt_disable_internal_agent;
PolkitAuthority *authority;
PolkitAuthorizationResult *result;
PolkitSubject *subject;
PolkitDetails *details;
GError *error;
gchar *action_id;
g... | 1 | [
"CWE-787"
] | polkit | a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 | 159,095,594,814,592,400,000,000,000,000,000,000,000 | 610 | pkexec: local privilege escalation (CVE-2021-4034) |
double PSNR(const CImg<t>& img, const double max_value=255) const {
const double vMSE = (double)std::sqrt(MSE(img));
return (vMSE!=0)?(double)(20*std::log10(max_value/vMSE)):(double)(cimg::type<double>::max());
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 281,444,711,173,059,050,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
polkit_system_bus_name_set_name (PolkitSystemBusName *system_bus_name,
const gchar *name)
{
g_return_if_fail (POLKIT_IS_SYSTEM_BUS_NAME (system_bus_name));
g_return_if_fail (g_dbus_is_unique_name (name));
g_free (system_bus_name->name);
system_bus_name->name = g_strdup (... | 0 | [
"CWE-754"
] | polkit | a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 | 257,338,378,985,704,300,000,000,000,000,000,000,000 | 8 | GHSL-2021-074: authentication bypass vulnerability in polkit
initial values returned if error caught |
//! Blur image with the median filter \newinstance.
CImg<T> get_blur_median(const unsigned int n, const float threshold=0) const {
if (is_empty() || n<=1) return +*this;
CImg<T> res(_width,_height,_depth,_spectrum);
T *ptrd = res._data;
cimg::unused(ptrd);
const int hr = (int)n/2, ... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 171,494,027,490,702,300,000,000,000,000,000,000,000 | 112 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void remote_function(void *data)
{
struct remote_function_call *tfc = data;
struct task_struct *p = tfc->p;
if (p) {
/* -EAGAIN */
if (task_cpu(p) != smp_processor_id())
return;
/*
* Now that we're on right CPU with IRQs disabled, we can test
* if we hit the right task without races.
*/
... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 268,729,076,466,877,600,000,000,000,000,000,000,000 | 22 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
qtdemux_tree_get_sibling_by_type_full (GNode * node, guint32 fourcc,
GstByteReader * parser)
{
GNode *child;
guint8 *buffer;
guint32 child_fourcc, child_len;
for (child = g_node_next_sibling (node); child;
child = g_node_next_sibling (child)) {
buffer = (guint8 *) child->data;
child_fourcc =... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 294,150,362,606,820,480,000,000,000,000,000,000,000 | 26 | qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.
https://bugzilla.gnome.org/show_bug.cgi?id=775451 |
static void i40e_restore_vlan(struct i40e_vsi *vsi)
{
u16 vid;
if (!vsi->netdev)
return;
if (vsi->netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
i40e_vlan_stripping_enable(vsi);
else
i40e_vlan_stripping_disable(vsi);
for_each_set_bit(vid, vsi->active_vlans, VLAN_N_VID)
i40e_vlan_rx_add_vid_up(vsi->netdev, ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 299,081,794,108,963,850,000,000,000,000,000,000,000 | 16 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
void Box_iref::add_reference(heif_item_id from_id, uint32_t type, std::vector<heif_item_id> to_ids)
{
Reference ref;
ref.header.set_short_type(type);
ref.from_item_ID = from_id;
ref.to_item_ID = to_ids;
m_references.push_back(ref);
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 260,763,732,639,527,940,000,000,000,000,000,000,000 | 9 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
str_node_split_last_char(StrNode* sn, OnigEncoding enc)
{
const UChar *p;
Node* n = NULL_NODE;
if (sn->end > sn->s) {
p = onigenc_get_prev_char_head(enc, sn->s, sn->end);
if (p && p > sn->s) { /* can be splitted. */
n = node_new_str(p, sn->end);
if ((sn->flag & NSTR_RAW) != 0)
NSTRING_SET_RA... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 315,399,842,392,324,900,000,000,000,000,000,000,000 | 16 | onig-5.9.2 |
static int format8BIM(Image *ifile, Image *ofile)
{
char
temp[MagickPathExtent];
unsigned int
foundOSType;
int
ID,
resCount,
i,
c;
ssize_t
count;
unsigned char
*PString,
*str;
resCount=0;
foundOSType=0; /* found the OSType */
(void) foundOSType;
c=ReadBlobByte(... | 0 | [
"CWE-772"
] | ImageMagick | 46382526a3f09cebf9f2af680fc55b2a668fcbef | 256,636,256,438,110,800,000,000,000,000,000,000,000 | 147 | https://github.com/ImageMagick/ImageMagick/issues/643 |
QUtil::utf8_to_mac_roman(std::string const& utf8, std::string& mac,
char unknown_char)
{
return transcode_utf8(utf8, mac, e_macroman, unknown_char);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 261,313,867,610,476,370,000,000,000,000,000,000,000 | 5 | 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 ... |
virDomainBlockCommit(virDomainPtr dom, const char *disk,
const char *base, const char *top,
unsigned long bandwidth, unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(dom, "disk=%s, base=%s, top=%s, bandwidth=%lu, flags=%x",
disk, NULLSTR(... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 42,814,476,722,858,820,000,000,000,000,000,000,000 | 32 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
ext4_group_t group)
{
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
struct ext4_prealloc_space *pa;
struct list_head *cur;
ext4_group_t groupnr;
ext4_grpblk_t start;
int preallocated = 0;
int len;
/* all form of preallocat... | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 301,374,057,145,445,730,000,000,000,000,000,000,000 | 34 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
int load_elf(const char *filename,
uint64_t (*elf_note_fn)(void *, void *, bool),
uint64_t (*translate_fn)(void *, uint64_t),
void *translate_opaque, uint64_t *pentry, uint64_t *lowaddr,
uint64_t *highaddr, int big_endian, int elf_machine,
int clear_lsb, ... | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 238,215,415,060,320,440,000,000,000,000,000,000,000 | 11 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
static BOOL update_read_stream_bitmap_first_order(wStream* s,
STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first)
{
if (Stream_GetRemainingLength(s) < 10) // 8 + 2 at least
return FALSE;
Stream_Read_UINT8(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */... | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 191,247,042,997,213,400,000,000,000,000,000,000,000 | 38 | Fixed #6013: Check new length is > 0 |
ConnectionHandlerTest()
: socket_factory_(std::make_shared<Network::MockListenSocketFactory>()),
handler_(new ConnectionHandlerImpl(dispatcher_)),
filter_chain_(Network::Test::createEmptyFilterChainWithRawBufferSockets()),
listener_filter_matcher_(std::make_shared<NiceMock<Network::MockL... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 230,961,730,316,761,000,000,000,000,000,000,000,000 | 7 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
cmd_http_txresp(CMD_ARGS)
{
struct http *hp;
const char *proto = "HTTP/1.1";
const char *status = "200";
const char *msg = "Ok";
int bodylen = 0;
char *b, *c;
char *body = NULL, *nullbody;
int nolen = 0;
(void)cmd;
(void)vl;
CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC);
ONLY_SERVER(hp, av);
assert(!strcmp(av[0... | 0 | [
"CWE-269"
] | Varnish-Cache | 85e8468bec9416bd7e16b0d80cb820ecd2b330c3 | 143,772,997,998,551,820,000,000,000,000,000,000,000 | 105 | Do not consider a CR by itself as a valid line terminator
Varnish (prior to version 4.0) was not following the standard with
regard to line separator.
Spotted and analyzed by: Régis Leroy [regilero] regis.leroy@makina-corpus.com |
static int nntp_attempt_features(struct NntpServer *nserv)
{
struct Connection *conn = nserv->conn;
char buf[LONG_STRING];
/* no CAPABILITIES, trying DATE, LISTGROUP, LIST NEWSGROUPS */
if (!nserv->hasCAPABILITIES)
{
if (mutt_socket_send(conn, "DATE\r\n") < 0 ||
mutt_socket_readln(buf, sizeof(buf... | 0 | [
"CWE-20"
] | neomutt | 9e927affe3a021175f354af5fa01d22657c20585 | 211,792,045,864,398,250,000,000,000,000,000,000,000 | 135 | Add alloc fail check in nntp_fetch_headers |
rdpsnd_auto_select(void)
{
static RD_BOOL failed = False;
if (!failed)
{
current_driver = drivers;
while (current_driver != NULL)
{
logger(Sound, Debug, "rdpsnd_auto_select(), trying driver '%s'",
current_driver->name);
if (current_driver->wave_out_open())
{
logger(Sound, Verbose, "rdps... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 30,247,735,203,294,320,000,000,000,000,000,000,000 | 28 | 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 ... |
LibRaw_bigfile_datastream::LibRaw_bigfile_datastream(const char *fname): filename(fname)
#ifdef WIN32
,wfilename()
#endif
{
if(filename.size()>0)
{
#ifndef WIN32
struct stat st;
if(!stat(filename.c_str(),&st))
_fsize = st.st_size;
#else
struct _stati64 st;
if(!_stati64(filename.... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 200,103,225,734,888,100,000,000,000,000,000,000,000 | 28 | cumulated data checks patch |
static int ConfirmSignature(SignatureCtx* sigCtx,
const byte* buf, word32 bufSz,
const byte* key, word32 keySz, word32 keyOID,
const byte* sig, word32 sigSz, word32 sigOID, byte* rsaKeyIdx)
{
int ret = 0;
#ifndef WOLFSSL_RENESAS_TSIP_TLS
(void)rsaKeyIdx;
#endif
if (sigCtx == NULL || buf == NULL ... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 103,717,768,568,610,200,000,000,000,000,000,000,000 | 472 | OCSP: improve handling of OCSP no check extension |
static int sched_rt_global_constraints(void)
{
int ret = 0;
mutex_lock(&rt_constraints_mutex);
if (!__rt_schedulable(NULL, 1, 0))
ret = -EINVAL;
mutex_unlock(&rt_constraints_mutex);
return ret;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 189,648,605,708,867,600,000,000,000,000,000,000,000 | 11 | 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 ... |
ex_write(exarg_T *eap)
{
if (eap->usefilter) /* input lines to shell command */
do_bang(1, eap, FALSE, TRUE, FALSE);
else
(void)do_write(eap);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 205,128,630,280,347,260,000,000,000,000,000,000,000 | 7 | 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. |
TEST_F(Http1ServerConnectionImplTest, Http10AbsoluteNoOp) {
initialize();
TestRequestHeaderMapImpl expected_headers{{":path", "/"}, {":method", "GET"}};
Buffer::OwnedImpl buffer("GET / HTTP/1.0\r\n\r\n");
expectHeadersTest(Protocol::Http10, true, buffer, expected_headers);
} | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 267,601,297,348,183,180,000,000,000,000,000,000,000 | 7 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
find_matching_refs (GHashTable *refs,
const char *opt_name,
const char *opt_branch,
const char *opt_default_branch,
const char *opt_arch,
const char *opt_defaul... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 172,611,056,010,446,300,000,000,000,000,000,000,000 | 129 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction)
{
FDrive *cur_drv = get_cur_drv(fdctrl);
uint32_t pos;
pos = fdctrl->data_pos - 1;
pos %= FD_SECTOR_LEN;
if (fdctrl->fifo[pos] & 0x80) {
/* Command parameters done */
if (fdctrl->fifo[pos] & 0x40) {... | 0 | [
"CWE-787"
] | qemu | defac5e2fbddf8423a354ff0454283a2115e1367 | 230,557,244,203,268,950,000,000,000,000,000,000,000 | 24 | hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)
Per the 82078 datasheet, if the end-of-track (EOT byte in
the FIFO) is more than the number of sectors per side, the
command is terminated unsuccessfully:
* 5.2.5 DATA TRANSFER TERMINATION
The 82078 supports terminal count explicitly through
the TC pin a... |
elapsed(DWORD start_tick)
{
DWORD now = GetTickCount();
return (long)now - (long)start_tick;
} | 0 | [
"CWE-120"
] | vim | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 | 42,794,962,662,469,020,000,000,000,000,000,000,000 | 6 | patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change. |
void Image::printStructure(std::ostream&, PrintStructureOption,int /*depth*/)
{
throw Error(kerUnsupportedImageType, io_->path());
} | 0 | [
"CWE-835"
] | exiv2 | ae49250942f4395639961abeed3c15920fcd7241 | 47,354,626,425,771,950,000,000,000,000,000,000,000 | 4 | Check in Image::printIFDStructure if seek and reads are OK |
start_job (job, foreground)
int job, foreground;
{
register PROCESS *p;
int already_running;
sigset_t set, oset;
char *wd, *s;
static TTYSTRUCT save_stty;
BLOCK_CHILD (set, oset);
if (DEADJOB (job))
{
internal_error (_("%s: job has terminated"), this_command_name);
UNBLOCK_CHILD (os... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 221,156,164,440,864,570,000,000,000,000,000,000,000 | 111 | bash-4.4-rc2 release |
get_tabpage_arg(exarg_T *eap)
{
int tab_number;
int unaccept_arg0 = (eap->cmdidx == CMD_tabmove) ? 0 : 1;
if (eap->arg && *eap->arg != NUL)
{
char_u *p = eap->arg;
char_u *p_save;
int relative = 0; /* argument +N/-N means: go to N places to the
* right/left relative to the current positi... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 55,768,411,913,154,050,000,000,000,000,000,000,000 | 94 | 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. |
static int bus_socket_make_message(sd_bus *bus, size_t size) {
sd_bus_message *t;
void *b;
int r;
assert(bus);
assert(bus->rbuffer_size >= size);
assert(IN_SET(bus->state, BUS_RUNNING, BUS_HELLO));
r = bus_rqueue_make_room(bus);
if (r < 0)
... | 1 | [
"CWE-787"
] | systemd | 6d586a13717ae057aa1b4127400c3de61cd5b9e7 | 139,792,925,306,537,630,000,000,000,000,000,000,000 | 41 | sd-bus: if we receive an invalid dbus message, ignore and proceeed
dbus-daemon might have a slightly different idea of what a valid msg is
than us (for example regarding valid msg and field sizes). Let's hence
try to proceed if we can and thus drop messages rather than fail the
connection if we fail to validate a mess... |
void InstanceKlass::get_jmethod_id_length_value(jmethodID* cache,
size_t idnum, size_t *length_p, jmethodID* id_p) {
assert(cache != NULL, "sanity check");
assert(length_p != NULL, "sanity check");
assert(id_p != NULL, "sanity check");
// cache size is stored in element[0], other elements offset by one
... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 144,581,893,952,406,900,000,000,000,000,000,000,000 | 14 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((__unused__)),
const void *buf, size_t nb)
{
int m = 0, rv = 0, looks_text = 0;
int mime = ms->flags & MAGIC_MIME;
const unsigned char *ubuf = CAST(const unsigned char *, buf);
unichar *u8buf = NULL;
size_t ulen;
const char *code = NU... | 0 | [
"CWE-119",
"CWE-787"
] | file | 6713ca45e7757297381f4b4cdb9cf5e624a9ad36 | 95,862,178,981,923,100,000,000,000,000,000,000,000 | 130 | PR/454: Fix memory corruption when the continuation level jumps by more than
20 in a single step. |
hufUncompress (const char compressed[],
int nCompressed,
unsigned short raw[],
int nRaw)
{
//
// need at least 20 bytes for header
//
if (nCompressed < 20 )
{
if (nRaw != 0)
notEnoughData();
return;
}
int im = readUInt (compressed);
int iM = readUInt (com... | 1 | [
"CWE-190"
] | openexr | ed560b8a932c78d5e8e5990ce36fe7808b35d9f0 | 82,257,838,968,811,910,000,000,000,000,000,000,000 | 73 | prevent overflow in hufUncompress if nBits is large (#836)
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
loadplugin(argv)
char **argv;
{
char *arg = *argv;
void *handle;
const char *err;
void (*init) __P((void));
char *path = arg;
const char *vers;
if (strchr(arg, '/') == 0) {
const char *base = _PATH_PLUGIN;
int l = strlen(base) + strlen(arg) + 2;
path = malloc(l);
if (path == 0)
... | 0 | [
"CWE-415",
"CWE-119"
] | ppp | 7658e8257183f062dc01f87969c140707c7e52cb | 131,706,536,626,475,700,000,000,000,000,000,000,000 | 52 | pppd: Eliminate potential integer overflow in option parsing
When we are reading in a word from an options file, we maintain a count
of the length we have seen so far in 'len', which is an int. When len
exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the
buffer but we continue to increment len. Sin... |
static rfbBool rfbInitConnection(rfbClient* client)
{
/* Unless we accepted an incoming connection, make a TCP connection to the
given VNC server */
if (!client->listenSpecified) {
if (!client->serverHost)
return FALSE;
if (client->destHost) {
if (!ConnectToRFBRepeater(client,client->serve... | 1 | [
"CWE-20"
] | libvncserver | 85a778c0e45e87e35ee7199f1f25020648e8b812 | 115,921,840,641,836,280,000,000,000,000,000,000,000 | 58 | Check for MallocFrameBuffer() return value
If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to
NULL. Subsequent writes into that buffer could lead to memory
corruption, or even arbitrary code execution. |
EXPORTED int annotatemore_lookupmask(const char *mboxname, const char *entry,
const char *userid, struct buf *value)
{
return annotatemore_msg_lookupmask(mboxname, /*uid*/0, entry, userid, value);
} | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 70,596,571,594,529,190,000,000,000,000,000,000,000 | 5 | annotate: don't allow everyone to write shared server entries |
get_cmd_line_args (pid_t pid)
{
int fd;
char path[PATH_MAX];
char *buffer;
size_t allocated;
size_t used = 0;
int ret;
int i, argc = 0;
char **argv;
if (pid)
sprintf (path, "/proc/%d/cmdline", pid);
else
strcpy (path, "/proc/self/cmdline");
fd = open (path, O_RDONLY);
if (fd < 0)
re... | 0 | [] | libpod | d400f0b5b2d68c4148a7c173e7fbbfd9b377a660 | 151,250,901,813,348,380,000,000,000,000,000,000,000 | 76 | rootless: fix segfault when open fd >= FD_SETSIZE
if there are more than FD_SETSIZE open fds passed down to the Podman
process, the initialization code could crash as it attempts to store
them into a fd_set. Use an array of fd_set structs, each of them
holding only FD_SETSIZE file descriptors.
Signed-off-by: Giusepp... |
Status ClientConnectionImpl::sendProtocolError(absl::string_view details) {
if (pending_response_.has_value()) {
ASSERT(!pending_response_done_);
pending_response_.value().encoder_.setDetails(details);
}
return okStatus();
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 312,798,560,151,749,200,000,000,000,000,000,000,000 | 7 | 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> |
bool print_bits_hint_cb(ut64 addr, int bits, void *user) {
HintNode *node = RZ_NEW0(HintNode);
if (!node) {
return false;
}
node->addr = addr;
node->type = HINT_NODE_BITS;
node->bits = bits;
rz_rbtree_insert(user, &addr, &node->rb, hint_node_cmp, NULL);
return true;
} | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 78,587,782,772,068,420,000,000,000,000,000,000,000 | 11 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
TPMI_ECC_CURVE_Unmarshal(TPMI_ECC_CURVE *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPM_ECC_CURVE_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target) {
#if ECC_BN_P256
case TPM_ECC_BN_P256:
#endif
#if ECC_BN_P638... | 1 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 202,696,040,265,723,030,000,000,000,000,000,000,000 | 43 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static RAnalValue *anal_fill_ai_rg(RAnal *anal, int idx) {
RAnalValue *ret = r_anal_value_new ();
ret->reg = r_reg_get (anal->reg, regs[idx], R_REG_TYPE_GPR);
return ret;
} | 0 | [
"CWE-125"
] | radare2 | 77c47cf873dd55b396da60baa2ca83bbd39e4add | 207,825,230,973,839,060,000,000,000,000,000,000,000 | 5 | Fix #9903 - oobread in RAnal.sh |
bool stmt_causes_implicit_commit(THD *thd, uint mask)
{
LEX *lex= thd->lex;
bool skip= FALSE;
DBUG_ENTER("stmt_causes_implicit_commit");
if (!(sql_command_flags[lex->sql_command] & mask))
DBUG_RETURN(FALSE);
switch (lex->sql_command) {
case SQLCOM_DROP_TABLE:
case SQLCOM_DROP_SEQUENCE:
skip= (le... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 309,193,461,142,982,400,000,000,000,000,000,000,000 | 40 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void vxlan_vs_del_dev(struct vxlan_dev *vxlan)
{
struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id);
spin_lock(&vn->sock_lock);
hlist_del_init_rcu(&vxlan->hlist4.hlist);
#if IS_ENABLED(CONFIG_IPV6)
hlist_del_init_rcu(&vxlan->hlist6.hlist);
#endif
spin_unlock(&vn->sock_lock);
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 219,989,520,538,120,570,000,000,000,000,000,000,000 | 11 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static void megasas_queue_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
return;
} | 0 | [
"CWE-401"
] | qemu | 765a707000e838c30b18d712fe6cb3dd8e0435f3 | 113,738,125,922,941,200,000,000,000,000,000,000,000 | 5 | megasas: fix guest-triggered memory leak
If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd
will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory.
Avoid this by returning only the status from map_dcmd, and loading
cmd->iov_size in the caller.
Reported-by: Li Qiang <liqiang6-s@360.c... |
pk_transaction_repo_set_data (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
const gchar *repo_id;
const gchar *parameter;
const gchar *value;
_cleanup_error_free_ GError *error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 131,249,372,153,268,700,000,000,000,000,000,000,000 | 56 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
static ssize_t ucma_bind(struct ucma_file *file, const char __user *inbuf,
int in_len, int out_len)
{
struct rdma_ucm_bind cmd;
struct ucma_context *ctx;
int ret;
if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
return -EFAULT;
if (cmd.reserved || !cmd.addr_size ||
cmd.addr_size != rdma_addr_size_kss(&cm... | 0 | [
"CWE-416",
"CWE-703"
] | linux | cb2595c1393b4a5211534e6f0a0fbad369e21ad8 | 185,594,817,250,879,820,000,000,000,000,000,000,000 | 22 | infiniband: fix a possible use-after-free bug
ucma_process_join() will free the new allocated "mc" struct,
if there is any error after that, especially the copy_to_user().
But in parallel, ucma_leave_multicast() could find this "mc"
through idr_find() before ucma_process_join() frees it, since it
is already published... |
Cached_item_item(Item *arg) : item(arg) {} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 57,359,834,169,386,120,000,000,000,000,000,000,000 | 1 | 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.... |
static void delete_parameter(zval *zv)
{
sdlParamPtr param = Z_PTR_P(zv);
if (param->paramName) {
efree(param->paramName);
}
efree(param);
} | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 328,622,722,147,367,970,000,000,000,000,000,000,000 | 8 | Fix bug #80672 - Null Dereference in SoapClient |
void smtp_server_cmd_starttls(struct smtp_server_cmd_ctx *cmd,
const char *params)
{
struct smtp_server_connection *conn = cmd->conn;
struct smtp_server_command *command = cmd->cmd;
enum smtp_capability capabilities = conn->set.capabilities;
if (conn->ssl_secured) {
i_assert((capabilities & SMTP_CAPABIL... | 0 | [
"CWE-77"
] | core | 321c339756f9b2b98fb7326359d1333adebb5295 | 163,225,114,465,296,100,000,000,000,000,000,000,000 | 31 | lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability.
The input handler kept reading more commands even though the input was locked by
the STARTTLS command, thereby causing it to read the command pipelined beyond
STARTTLS. This causes a STARTTLS command injection vulerability. |
int credssp_sizeof_pub_key_auth(int length)
{
length = ber_sizeof_octet_string(length);
length += ber_sizeof_contextual_tag(length);
return length;
} | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 106,992,731,939,272,100,000,000,000,000,000,000,000 | 6 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
zone_namerd_tostr(dns_zone_t *zone, char *buf, size_t length) {
isc_result_t result = ISC_R_FAILURE;
isc_buffer_t buffer;
REQUIRE(buf != NULL);
REQUIRE(length > 1U);
/*
* Leave space for terminating '\0'.
*/
isc_buffer_init(&buffer, buf, (unsigned int)length - 1);
if (zone->type != dns_zone_redirect && zon... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 301,142,871,641,540,400,000,000,000,000,000,000,000 | 36 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
zputdeviceparams(i_ctx_t *i_ctx_p)
{
uint count = ref_stack_counttomark(&o_stack);
ref *prequire_all;
ref *ppolicy;
ref *pdev;
gx_device *dev;
stack_param_list list;
int code;
int old_width, old_height;
int i, dest;
if (count == 0)
return_error(gs_error_unmatchedmark);
... | 0 | [] | ghostpdl | 661e8d8fb8248c38d67958beda32f3a5876d0c3f | 26,001,785,285,789,710,000,000,000,000,000,000,000 | 69 | Bug 700176: check the *output* device for LockSafetyParams
When calling .setdevice we were checking if LockSafetyParams was set, and if so
throwing an invalidaccess error.
The problem is, if another device, for example the pdf14 compositor is the 'top'
device, that does not (and cannot) honour LockSafetyParams.
To s... |
static int io_sqe_files_update(struct io_ring_ctx *ctx, void __user *arg,
unsigned nr_args)
{
struct io_uring_files_update up;
__s32 __user *fds;
int fd, i, err;
__u32 done;
if (!ctx->file_table)
return -ENXIO;
if (!nr_args)
return -EINVAL;
if (copy_from_user(&up, arg, sizeof(up)))
return -EFAUL... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 70,927,499,813,281,980,000,000,000,000,000,000,000 | 70 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
void irc_server_send_away(IRC_SERVER_REC *server, const char *reason)
{
char *recoded = NULL;
if (!IS_IRC_SERVER(server))
return;
if (*reason != '\0' || server->usermode_away) {
g_free_and_null(server->away_reason);
if (*reason != '\0') {
server->away_reason = g_strdup(reason);
reason = r... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 321,463,015,489,597,730,000,000,000,000,000,000,000 | 20 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
lexer_consume_generator (parser_context_t *context_p) /**< context */
{
if (!(context_p->token.flags & LEXER_NO_SKIP_SPACES))
{
lexer_skip_spaces (context_p);
context_p->token.flags = (uint8_t) (context_p->token.flags | LEXER_NO_SKIP_SPACES);
}
if (context_p->source_p >= context_p->source_end_p || cont... | 0 | [
"CWE-288"
] | jerryscript | f3a420b672927037beb4508d7bdd68fb25d2caf6 | 267,670,209,282,250,400,000,000,000,000,000,000,000 | 19 | Fix class static block opening brace parsing (#4942)
The next character should not be consumed after finding the static block opening brace.
This patch fixes #4916.
JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu |
start_monitoring_file_list (NautilusDirectory *directory)
{
DirectoryLoadState *state;
if (!directory->details->file_list_monitored) {
g_assert (!directory->details->directory_load_in_progress);
directory->details->file_list_monitored = TRUE;
nautilus_file_list_ref (directory->details->file_list);
}
if (di... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 223,111,652,709,803,800,000,000,000,000,000,000,000 | 63 | 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 option_export_marks(const char *marks)
{
export_marks_file = make_fast_import_path(marks);
safe_create_leading_directories_const(export_marks_file);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 171,986,916,987,035,200,000,000,000,000,000,000,000 | 5 | 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... |
format_SET_L4_SRC_PORT(const struct ofpact_l4_port *a,
const struct ofpact_format_params *fp)
{
ds_put_format(fp->s, "%smod_tp_src:%s%d",
colors.param, colors.end, a->port);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 324,862,280,777,218,500,000,000,000,000,000,000,000 | 6 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
int diskutil_grub(const char *path, const char *mnt_pt, const int part, const char *kernel, const char *ramdisk)
{
int ret = EUCA_ERROR;
if ((ret = diskutil_grub_files(mnt_pt, part, kernel, ramdisk)) != EUCA_OK)
return (ret);
ret = diskutil_grub2_mbr(path, part, mnt_pt);
return (ret);
} | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 43,559,729,130,491,280,000,000,000,000,000,000,000 | 10 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
static struct kobject *exact_match(dev_t devt, int *partno, void *data)
{
struct gendisk *p = data;
return &disk_to_dev(p)->kobj;
} | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 57,378,946,562,536,840,000,000,000,000,000,000,000 | 6 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
int sr_drive_status(struct cdrom_device_info *cdi, int slot)
{
struct scsi_cd *cd = cdi->handle;
struct scsi_sense_hdr sshdr;
struct media_event_desc med;
if (CDSL_CURRENT != slot) {
/* we have no changer support */
return -EINVAL;
}
if (!scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES, &sshdr))
r... | 0 | [
"CWE-119",
"CWE-787"
] | linux | f7068114d45ec55996b9040e98111afa56e010fe | 66,565,705,107,043,765,000,000,000,000,000,000,000 | 56 | sr: pass down correctly sized SCSI sense buffer
We're casting the CDROM layer request_sense to the SCSI sense
buffer, but the former is 64 bytes and the latter is 96 bytes.
As we generally allocate these on the stack, we end up blowing
up the stack.
Fix this by wrapping the scsi_execute() call with a properly
sized s... |
QAction *MainWindow::actionAddCustomProfile() const
{
return ui->actionAddCustomProfile;
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 199,992,147,981,996,650,000,000,000,000,000,000,000 | 4 | fix upgrade check is not using TLS correctly |
TEST(IndexBoundsBuilderTest, TranslateGteCode) {
auto testIndex = buildSimpleIndexEntry();
BSONObj obj = BSON("a" << BSON("$gte" << BSONCode("function(){ return 0; }")));
auto expr = parseMatchExpression(obj);
BSONElement elt = obj.firstElement();
OrderedIntervalList oil;
IndexBoundsBuilder::Bou... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 75,617,414,667,983,610,000,000,000,000,000,000,000 | 15 | SERVER-44377 generate correct plan for indexed inequalities to null |
static int io_uring_create(unsigned entries, struct io_uring_params *p)
{
struct user_struct *user = NULL;
struct io_ring_ctx *ctx;
bool account_mem;
int ret;
if (!entries || entries > IORING_MAX_ENTRIES)
return -EINVAL;
/*
* Use twice as many entries for the CQ ring. It's possible for the
* application t... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 328,604,250,639,832,800,000,000,000,000,000,000,000 | 97 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
Subgraph::Subgraph(ErrorReporter* error_reporter,
TfLiteExternalContext** external_contexts,
std::vector<std::unique_ptr<Subgraph>>* subgraphs,
resource::ResourceMap* resources)
: external_contexts_(external_contexts),
error_reporter_(error_reporter),
... | 0 | [
"CWE-476"
] | tensorflow | f8378920345f4f4604202d4ab15ef64b2aceaa16 | 255,481,897,968,739,000,000,000,000,000,000,000,000 | 31 | Prevent a null pointer dereference in TFLite.
PiperOrigin-RevId: 370800353
Change-Id: Ic9c9712ce5c6e384c954dcd640a5bd9ff05c9a05 |
ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
zval *orig_op1 = op1;
zval op1_copy, op2_copy;
ZVAL_UNDEF(&op1_copy);
ZVAL_UNDEF(&op2_copy);
do {
if (UNEXPECTED(Z_TYPE_P(op1) != IS_STRING)) {
if (Z_ISREF_P(op1)) {
op1 = Z_REFVAL_P(op1);
if (Z_TYPE_P(... | 1 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 325,572,835,313,014,970,000,000,000,000,000,000,000 | 105 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
static inline bool io_sqring_full(struct io_ring_ctx *ctx)
{
struct io_rings *r = ctx->rings;
return READ_ONCE(r->sq.tail) - ctx->cached_sq_head == ctx->sq_entries;
} | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 236,210,070,563,783,630,000,000,000,000,000,000,000 | 6 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
static void usb_xhci_init(XHCIState *xhci)
{
DeviceState *dev = DEVICE(xhci);
XHCIPort *port;
int i, usbports, speedmask;
xhci->usbsts = USBSTS_HCH;
if (xhci->numports_2 > MAXPORTS_2) {
xhci->numports_2 = MAXPORTS_2;
}
if (xhci->numports_3 > MAXPORTS_3) {
xhci->numports_3 =... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 44,957,870,961,460,370,000,000,000,000,000,000,000 | 54 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
ri_add_cast_to(StringInfo buf, Oid typid)
{
HeapTuple typetup;
Form_pg_type typform;
char *typname;
char *nspname;
typetup = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid));
if (!HeapTupleIsValid(typetup))
elog(ERROR, "cache lookup failed for type %u", typid);
typform = (Form_pg_type) GETSTRUCT(typetu... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 249,852,468,053,141,140,000,000,000,000,000,000,000 | 20 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
CImgDisplay& assign(const unsigned int dimw, const unsigned int dimh, const char *const title=0,
const unsigned int normalization_type=3,
const bool fullscreen_flag=false, const bool closed_flag=false) {
if (!dimw || !dimh) return assign();
_assign(dimw,d... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 304,881,231,344,350,800,000,000,000,000,000,000,000 | 11 | Fix other issues in 'CImg<T>::load_bmp()'. |
BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
{
_noLibzError();
return NULL;
} | 1 | [
"CWE-20"
] | libgd | fe9ed49dafa993e3af96b6a5a589efeea9bfb36f | 290,010,411,397,926,050,000,000,000,000,000,000,000 | 5 | Fix DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully. |
DnsServerFeatureLevel dns_server_possible_feature_level(DnsServer *s) {
DnsServerFeatureLevel best;
assert(s);
/* Determine the best feature level we care about. If DNSSEC mode is off there's no point in using anything
* better than EDNS0, hence don't even try. */
if (dns_serv... | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 23,477,162,495,539,147,000,000,000,000,000,000,000 | 119 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
static bool shall_try_append_again(JournalFile *f, int r) {
switch(r) {
case -E2BIG: /* Hit configured limit */
case -EFBIG: /* Hit fs limit */
case -EDQUOT: /* Quota limit hit */
case -ENOSPC: /* Disk... | 0 | [
"CWE-770"
] | systemd | 084eeb865ca63887098e0945fb4e93c852b91b0f | 92,123,769,374,448,870,000,000,000,000,000,000,000 | 44 | journald: do not store the iovec entry for process commandline on stack
This fixes a crash where we would read the commandline, whose length is under
control of the sending program, and then crash when trying to create a stack
allocation for it.
CVE-2018-16864
https://bugzilla.redhat.com/show_bug.cgi?id=1653855
The ... |
g_file_get_child (GFile *file,
const char *name)
{
g_return_val_if_fail (G_IS_FILE (file), NULL);
g_return_val_if_fail (name != NULL, NULL);
return g_file_resolve_relative_path (file, name);
} | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 10,200,014,663,019,376,000,000,000,000,000,000,000 | 8 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static void rb_init_page(struct buffer_data_page *bpage)
{
local_set(&bpage->commit, 0);
} | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 277,657,746,322,223,040,000,000,000,000,000,000,000 | 4 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
static int check_xadd(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn)
{
int err;
if ((BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) ||
insn->imm != 0) {
verbose(env, "BPF_XADD uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg_arg(e... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 175,469,245,538,144,030,000,000,000,000,000,000,000 | 43 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
get_data(char *buf, int len)
{
char *data;
int pos = 0;
while (pos < len && buf[pos] != '{')
pos++;
if (pos == len) {
return NULL;
}
data = buf + pos - 1;
return data;
} | 0 | [
"CWE-78",
"CWE-787"
] | shadowsocks-libev | c67d275803dc6ea22c558d06b1f7ba9f94cd8de3 | 147,725,726,272,685,410,000,000,000,000,000,000,000 | 14 | Fix #1734 |
static void removePaddingBits(unsigned char* out, const unsigned char* in,
size_t olinebits, size_t ilinebits, unsigned h)
{
/*
After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need
to be removed (except at last scanline of (Adam7-red... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 214,353,545,270,948,180,000,000,000,000,000,000,000 | 26 | Fixed #5645: realloc return handling |
static int verify_mfa(RGWRados *store, RGWUserInfo *user, const string& mfa_str, bool *verified)
{
vector<string> params;
get_str_vec(mfa_str, " ", params);
if (params.size() != 2) {
ldout(store->ctx(), 5) << "NOTICE: invalid mfa string provided: " << mfa_str << dendl;
return -EINVAL;
}
string& seri... | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 237,525,300,637,791,360,000,000,000,000,000,000,000 | 29 | 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) |
static void set_tac_srv_addr (unsigned int srv_no, const struct addrinfo *addr)
{
_pam_log(LOG_DEBUG, "%s: server [%s]", __FUNCTION__,
tac_ntop(addr->ai_addr));
if (srv_no < TAC_PLUS_MAXSERVERS) {
if (addr) {
if (addr->ai_family == AF_INET6) {
tac_srv_addr[... | 0 | [
"CWE-532"
] | pam_tacplus | 4a9852c31c2fd0c0e72fbb689a586aabcfb11cb0 | 222,181,712,247,794,350,000,000,000,000,000,000,000 | 30 | pam: don't leak TACACS+ secret to journald
If journald for syslog is used, the journal is going to store everything,
even DEBUG loglevel messages. Pre-journald logging of system-wide DEBUG
loglevel could be avoided and is not affected in all cases.
With journald presence it's probably safe to no longer log sensitive
... |
static int append_exec_command(sd_bus_message *reply, ExecCommand *c) {
int r;
assert(reply);
assert(c);
if (!c->path)
return 0;
r = sd_bus_message_open_container(reply, 'r', "sasbttttuii");
if (r < 0)
return r;
r = sd_bus_messa... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 214,515,252,670,553,820,000,000,000,000,000,000,000 | 35 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
void SetUp() override {
AllVerifierTest::SetUp();
const char allow_failed_yaml[] = R"(
requires_all:
requirements:
- requires_any:
requirements:
- provider_name: "example_provider"
- allow_missing: {}
- requires_any:
requirements:
- provider_name: "other_provider"
- a... | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 66,274,158,108,600,540,000,000,000,000,000,000,000 | 17 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
get_8bit_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
/* This version is for reading 8-bit colormap indexes */
{
tga_source_ptr source = (tga_source_ptr)sinfo;
register int t;
register JSAMPROW ptr;
register JDIMENSION col;
register JSAMPARRAY colormap = source->colormap;
ptr = source->pub.buffer[0];
... | 0 | [
"CWE-834"
] | libjpeg-turbo | 909a8cfc7bca9b2e6707425bdb74da997e8fa499 | 237,775,775,315,480,060,000,000,000,000,000,000,000 | 19 | Fix CVE-2018-11813
Refer to change log for details.
Fixes #242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.