func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static ssize_t exitcode_proc_write(struct file *file,
const char __user *buffer, size_t count, loff_t *pos)
{
char *end, buf[sizeof("nnnnn\0")];
size_t size;
int tmp;
size = min(count, sizeof(buf));
if (copy_from_user(buf, buffer, size))
return -EFAULT;
tmp = simple_strtol(buf, &end, 0);
if ((*end != '\0')... | 0 | [
"CWE-399",
"CWE-119"
] | linux | 201f99f170df14ba52ea4c52847779042b7a623b | 170,482,767,749,899,500,000,000,000,000,000,000,000 | 18 | uml: check length in exitcode_proc_write()
We don't cap the size of buffer from the user so we could write past the
end of the array here. Only root can write to this file.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
... |
big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
{
const UChar c = *s;
return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 96,765,588,954,757,120,000,000,000,000,000,000,000 | 6 | onig-5.9.2 |
static void tun_get_iff(struct net *net, struct tun_struct *tun,
struct ifreq *ifr)
{
tun_debug(KERN_INFO, tun, "tun_get_iff\n");
strcpy(ifr->ifr_name, tun->dev->name);
ifr->ifr_flags = tun_flags(tun);
} | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 324,112,319,627,141,640,000,000,000,000,000,000,000 | 10 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
int CLASS fcol (int row, int col)
{
static const char filter[16][16] =
{ { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 },
{ 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 },
{ 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 },
{ 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 },
{ 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 },
{ 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 },
... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 88,387,516,221,923,550,000,000,000,000,000,000,000 | 24 | fixed two more problems found by fuzzer |
void run(OperationContext* opCtx, CommandReplyBuilder* result) override {
try {
BSONObjBuilder bob = result->getBodyBuilder();
bool ok = _command->run(opCtx, _dbName, _request->body, bob);
CommandHelpers::appendSimpleCommandStatus(bob, ok);
} catch (const Exceptio... | 0 | [
"CWE-20"
] | mongo | d315547544d7146b93a8e6e94cc4b88cd0d19c95 | 76,822,196,422,964,340,000,000,000,000,000,000,000 | 10 | SERVER-38275 ban explain with UUID |
create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
ORDER *group, bool distinct, bool save_sum_fields,
ulonglong select_options, ha_rows rows_limit,
const LEX_CSTRING *table_alias, bool do_not_open,
bool keep_row_order)
{
MEM_ROOT *mem_root_save, own_root;
... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 112,232,675,986,172,400,000,000,000,000,000,000,000 | 866 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs_readres *res)
{
struct kvec *iov = req->rq_rcv_buf.head;
__be32 *p;
uint32_t count, eof, recvd, hdrlen;
int status;
status = decode_op_hdr(xdr, OP_READ);
if (status)
return status;
p = xdr_inline_decode(xdr, 8);
if (unlikely(!p))... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 198,368,826,321,088,170,000,000,000,000,000,000,000 | 31 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
com_warnings(String *buffer MY_ATTRIBUTE((unused)),
char *line MY_ATTRIBUTE((unused)))
{
show_warnings = 1;
put_info("Show warnings enabled.",INFO_INFO);
return 0;
} | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 278,975,933,428,360,800,000,000,000,000,000,000,000 | 7 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec) |
void ACLosslessScan::WriteMCU(struct Line **prev,struct Line **top)
{
#if ACCUSOFT_CODE
UBYTE c;
//
// Parse a single MCU, which is now a group of pixels.
for(c = 0;c < m_ucCount;c++) {
struct QMContextSet &contextset = m_Context[m_ucContext[c]];
struct Line *line = top[c];
struct Line *pline= prev... | 0 | [
"CWE-119",
"CWE-703"
] | libjpeg | ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a | 59,270,694,919,515,845,000,000,000,000,000,000,000 | 85 | Added out-of-bounds checks for lossless symbol decoding and AC context
indices. Worked around some gcc warnings. Bumped to 1.64. |
graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
{
atomic_set(&t->tracing_graph_pause, 0);
atomic_set(&t->trace_overrun, 0);
t->ftrace_timestamp = 0;
/* make curr_ret_stack visible before we add the ret_stack */
smp_wmb();
t->ret_stack = ret_stack;
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 229,236,682,907,786,760,000,000,000,000,000,000,000 | 9 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
EXPORTED int mboxlist_delete(const char *name)
{
return mboxlist_update_entry(name, NULL, NULL);
} | 0 | [
"CWE-20"
] | cyrus-imapd | 6bd33275368edfa71ae117de895488584678ac79 | 121,893,693,715,202,920,000,000,000,000,000,000,000 | 4 | mboxlist: fix uninitialised memory use where pattern is "Other Users" |
set_permissions_job (GIOSchedulerJob *io_job,
GCancellable *cancellable,
gpointer user_data)
{
SetPermissionsJob *job = user_data;
CommonJob *common;
common = (CommonJob *)job;
common->io_job = io_job;
nautilus_progress_info_set_status (common->progress,
_("Setting permissions"));
nauti... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 189,527,324,859,109,850,000,000,000,000,000,000,000 | 24 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
int ha_partition::prepare_new_partition(TABLE *tbl,
HA_CREATE_INFO *create_info,
handler *file, const char *part_name,
partition_element *p_elem,
uint disable_n... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 29,038,718,714,354,210,000,000,000,000,000,000,000 | 51 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
struct nfs_fattr *fattr, struct iattr *sattr,
struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(inode);
struct nfs4_exception exception = { };
int err;
do {
err = nfs4_handle_exception(server,
_nfs4_do_setattr(... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 88,517,115,228,670,680,000,000,000,000,000,000,000 | 14 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp,
struct xdr_stream *xdr,
void *data)
{
struct nfs_openres *res = data;
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);
if (status)... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 227,635,184,940,857,880,000,000,000,000,000,000,000 | 28 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
apdu_pinpad_modify (int slot, int class, int ins, int p0, int p1,
pininfo_t *pininfo)
{
if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used )
return SW_HOST_NO_DRIVER;
if (reader_table[slot].pinpad_modify)
{
int sw;
if ((sw = lock_slot (slot)))
return sw;
sw = r... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 92,508,701,761,962,830,000,000,000,000,000,000,000 | 21 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
u32 prior_snd_una)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
const unsigned char *ptr = (skb_transport_header(ack_skb) +
TCP_SKB_CB(ack_skb)->sacked);
struct tcp_sack_block_wire *sp_w... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 327,617,882,084,951,130,000,000,000,000,000,000,000 | 216 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
static int i40e_vsi_config_rss(struct i40e_vsi *vsi)
{
struct i40e_pf *pf = vsi->back;
u8 seed[I40E_HKEY_ARRAY_SIZE];
u8 *lut;
int ret;
if (!(pf->hw_features & I40E_HW_RSS_AQ_CAPABLE))
return 0;
if (!vsi->rss_size)
vsi->rss_size = min_t(int, pf->alloc_rss_size,
vsi->num_queue_pairs);
if (!vsi->rss... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 157,979,868,591,963,770,000,000,000,000,000,000,000 | 33 | 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> |
int dn_dev_bind_default(__le16 *addr)
{
struct net_device *dev;
int rv;
dev = dn_dev_get_default();
last_chance:
if (dev) {
rv = dn_dev_get_first(dev, addr);
dev_put(dev);
if (rv == 0 || dev == init_net.loopback_dev)
return rv;
}
dev = init_net.loopback_dev;
dev_hold(dev);
goto last_chance;
} | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 144,017,269,822,729,890,000,000,000,000,000,000,000 | 16 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
bool has_error_code, u32 error_code,
bool reinject)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 intr_info = nr | INTR_INFO_VALID_MASK;
if (nr == PF_VECTOR && is_guest_mode(vcpu) &&
!vmx->nested.nested_run_pending && nested_pf_handled(vc... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 178,349,139,714,699,740,000,000,000,000,000,000,000 | 34 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
{
/* keep them as 32bits */
long x, y, inc;
long dx, dy,tmp;
if (y1 < 0 && y2 < 0) {
return;
}
if (y1 < 0) {
x1 += (y1 * (x1 - x2)) / (y2 - y1);
y1 = 0;
}
if (y2 < 0) {
x2 += (y2 * (x1 - x2)) / (y2 - y1);
y2 = 0;
}
/* bott... | 0 | [
"CWE-119"
] | php-src | e7f2356665c2569191a946b6fc35b437f0ae1384 | 88,241,849,846,254,280,000,000,000,000,000,000,000 | 108 | Fix #66387: Stack overflow with imagefilltoborder
The stack overflow is caused by the recursive algorithm in combination with a
very large negative coordinate passed to gdImageFillToBorder(). As there is
already a clipping for large positive coordinates to the width and height of
the image, it seems to be consequent t... |
EIGEN_STRONG_INLINE bool operator<(const QInt16 a, const QInt16 b) {
return a.value < b.value;
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 46,799,697,340,504,460,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
QUtil::pdf_doc_to_utf8(std::string const& val)
{
std::string result;
size_t len = val.length();
for (unsigned int i = 0; i < len; ++i)
{
unsigned char ch = static_cast<unsigned char>(val.at(i));
unsigned short val = ch;
if ((ch >= 128) && (ch <= 160))
{
val = ... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 256,389,623,873,395,650,000,000,000,000,000,000,000 | 16 | 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 ... |
CheckLocatorPosition(XtermWidget xw, XButtonEvent *event)
{
ANSI reply;
TScreen *screen = TScreenOf(xw);
int row, col;
Bool oor;
LocatorCoords(row, col, event->x, event->y, oor);
/*
* Send report if the pointer left the filter rectangle, if
* the pointer left the window, or if the fi... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 167,769,272,668,668,000,000,000,000,000,000,000,000 | 50 | snapshot of project "xterm", label xterm-365d |
R_API char *r_core_anal_fcn_name(RCore *core, RAnalFunction *fcn) {
bool demangle = r_config_get_i (core->config, "bin.demangle");
const char *lang = demangle ? r_config_get (core->config, "bin.lang") : NULL;
bool keep_lib = r_config_get_i (core->config, "bin.demangle.libs");
char *name = strdup (r_str_get (fcn->na... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 54,495,945,127,838,380,000,000,000,000,000,000,000 | 14 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
static inline struct ist htx_sl_p3(const struct htx_sl *sl)
{
return ist2(HTX_SL_P3_PTR(sl), HTX_SL_P3_LEN(sl));
} | 0 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 168,936,989,131,900,410,000,000,000,000,000,000,000 | 4 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
static size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
ZSTD_hufCTables_t* nextHuf,
ZSTD_strategy strategy, int disableLiteralCompression,
void* dst, size_t dstCapacity,
... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 65,148,965,439,378,680,000,000,000,000,000,000,000 | 82 | fixed T36302429 |
static void vmx_inject_page_fault_nested(struct kvm_vcpu *vcpu,
struct x86_exception *fault)
{
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
WARN_ON(!is_guest_mode(vcpu));
if (nested_vmx_is_page_fault_vmexit(vmcs12, fault->error_code)) {
vmcs12->vm_exit_intr_error_code = fault->error_code;
nested_vmx_vmexit(vcpu... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 75,736,009,755,526,480,000,000,000,000,000,000,000 | 17 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
struct net_device *ipmr_new_tunnel(struct vifctl *v)
{
struct net_device *dev;
dev = __dev_get_by_name("tunl0");
if (dev) {
int err;
struct ifreq ifr;
mm_segment_t oldfs;
struct ip_tunnel_parm p;
struct in_device *in_dev;
memset(&p, 0, sizeof(p));
p.iph.daddr = v->vifc_rmt_addr.s_addr;
p.iph.sad... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 35,141,320,336,207,680,000,000,000,000,000,000,000 | 50 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
START_TEST(test_tm_adopt_ispidowner)
{
/* we are the owner of this pid so should return true */
fail_unless(TRUE == ispidowner(getpid()));
/* assuming the unit test is not run as root, owner */
/* owner of this pid is not the owner of pid 1 (init) */
fail_unless(FALSE == ispidowner(1));
} | 1 | [
"CWE-264"
] | torque | 967cdc80150690459a47a35a658abeee0ca6e5cb | 256,677,480,188,889,360,000,000,000,000,000,000,000 | 9 | TRQ-2885 - clean up unit test so it passes when run as root |
static int ldb_kv_index_dn_less(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
const struct ldb_parse_tree *tree,
struct dn_list *list)
{
return ldb_kv_index_dn_ordered(module,
ldb_kv,
tree,
list, false);
} | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 225,001,991,273,204,720,000,000,000,000,000,000,000 | 10 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
TEST_CASE("String capture test2", "[general]")
{
std::vector<std::string> tags;
Definition ROOT, TAG, TAG_NAME, WS;
ROOT <= seq(WS, zom(TAG));
TAG <= seq(chr('['), TAG_NAME, chr(']'), WS);
TAG_NAME <= oom(seq(npd(chr(']')), dot())), [&](const SemanticValues& sv) { tags.push_back(sv.str());... | 1 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 237,733,039,833,594,600,000,000,000,000,000,000,000 | 18 | Fix #122 |
lys_ext_complex_get_substmt(LY_STMT stmt, struct lys_ext_instance_complex *ext, struct lyext_substmt **info)
{
FUN_IN;
int i;
if (!ext || !ext->def || !ext->def->plugin || ext->def->plugin->type != LYEXT_COMPLEX) {
LOGARG;
return NULL;
}
if (!ext->substmt) {
/* no substate... | 0 | [
"CWE-252"
] | libyang | 59a0bff1a5a2f0a0eac07e4bf94d4aea9dd3708d | 112,378,810,700,010,380,000,000,000,000,000,000,000 | 42 | plugins BUGFIX handle empty revision correctly
Fixes #1451 |
static int check_content(CMS_ContentInfo *cms)
{
ASN1_OCTET_STRING **pos = CMS_get0_content(cms);
if (!pos || !*pos)
{
CMSerr(CMS_F_CHECK_CONTENT, CMS_R_NO_CONTENT);
return 0;
}
return 1;
} | 0 | [
"CWE-399",
"CWE-703"
] | openssl | cd30f03ac5bf2962f44bd02ae8d88245dff2f12c | 69,198,527,796,664,520,000,000,000,000,000,000,000 | 10 | Canonicalise input in CMS_verify.
If content is detached and not binary mode translate the input to
CRLF format. Before this change the input was verified verbatim
which lead to a discrepancy between sign and verify. |
ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal (MonoMethod *method)
{
return mono_method_body_get_object (mono_domain_get (), method);
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 301,587,712,287,569,680,000,000,000,000,000,000,000 | 4 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static enum test_return test_binary_addq(void) {
return test_binary_add_impl("test_binary_addq", PROTOCOL_BINARY_CMD_ADDQ);
} | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 144,941,919,136,344,930,000,000,000,000,000,000,000 | 3 | Issue 102: Piping null to the server will crash it |
static void __io_queue_deferred(struct io_ring_ctx *ctx)
{
do {
struct io_defer_entry *de = list_first_entry(&ctx->defer_list,
struct io_defer_entry, list);
if (req_need_defer(de->req, de->seq))
break;
list_del_init(&de->list);
io_req_task_queue(de->req);
kfree(de);
} while (!list_empty(&ctx->defe... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 224,320,877,027,284,170,000,000,000,000,000,000,000 | 13 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
xfs_link(
xfs_inode_t *tdp,
xfs_inode_t *sip,
struct xfs_name *target_name)
{
xfs_mount_t *mp = tdp->i_mount;
xfs_trans_t *tp;
int error;
int resblks;
trace_xfs_link(tdp, target_name);
ASSERT(!S_ISDIR(VFS_I(sip)->i_mode));
if (XFS_FORCED_SHUTDOWN(mp))
return -EIO;
error = xfs_qm_dqattach(sip);... | 0 | [] | linux | 01ea173e103edd5ec41acec65b9261b87e123fc2 | 166,590,269,513,232,870,000,000,000,000,000,000,000 | 94 | xfs: fix up non-directory creation in SGID directories
XFS always inherits the SGID bit if it is set on the parent inode, while
the generic inode_init_owner does not do this in a few cases where it can
create a possible security problem, see commit 0fa3ecd87848
("Fix up non-directory creation in SGID directories") for... |
mrb_mod_const_missing(mrb_state *mrb, mrb_value mod)
{
mrb_sym sym;
mrb_get_args(mrb, "n", &sym);
mrb->c->ci->mid = 0;
if (mrb_class_real(mrb_class_ptr(mod)) != mrb->object_class) {
mrb_name_error(mrb, sym, "uninitialized constant %v::%n", mod, sym);
}
else {
mrb_name_error(mrb, sym, "uninitialize... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 173,497,087,357,129,500,000,000,000,000,000,000,000 | 16 | class.c: clear method cache after `remove_method`. |
#else
GF_Err gf_isom_get_sample_cenc_info_internal(GF_TrackBox *trak, void *traf, GF_SampleEncryptionBox *senc, u32 sample_number, Bool *IsEncrypted, u8 *crypt_byte_block, u8 *skip_byte_block, const u8 **key_info, u32 *key_info_size)
#endif
{
GF_SampleGroupBox *sample_group;
u32 j, group_desc_index;
GF_SampleGroupDe... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 112,702,173,122,776,500,000,000,000,000,000,000,000 | 140 | fixed #1706 |
explicit SparseSegmentReductionMeanWithNumSegmentsOp(
OpKernelConstruction* context)
: SparseSegmentReductionOpBase<Device, T>(
context, true /*is_mean*/, false /*is_sqrtn*/,
true /* has_num_segments */, T(0) /* default_value */) {} | 0 | [
"CWE-703",
"CWE-681",
"CWE-787"
] | tensorflow | db4f9717c41bccc3ce10099ab61996b246099892 | 89,497,523,256,748,950,000,000,000,000,000,000,000 | 5 | Fix heap buffer overflow in UnsortedSegmentSum.
When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory.
Also:
- Switches some indexing calculations to int64 to avoid signed intege... |
void Pipe::set_socket_options()
{
// disable Nagle algorithm?
if (msgr->cct->_conf->ms_tcp_nodelay) {
int flag = 1;
int r = ::setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(flag));
if (r < 0) {
r = -errno;
ldout(msgr->cct,0) << "couldn't set TCP_NODELAY: "
... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 140,895,624,202,679,220,000,000,000,000,000,000,000 | 76 | 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 RGWPutBucketReplication_ObjStore_S3::send_response()
{
if (op_ret)
set_req_state_err(s, op_ret);
dump_errno(s);
end_header(s, this, "application/xml");
dump_start(s);
} | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 317,469,152,412,971,330,000,000,000,000,000,000,000 | 8 | 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) |
struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
{
struct tty_struct *tty;
int retval;
/*
* First time open is complex, especially for PTY devices.
* This code guarantees that either everything succeeds and the
* TTY is ready for operation, or else the table slots are vacated
* and the al... | 0 | [
"CWE-200",
"CWE-362"
] | linux | 5c17c861a357e9458001f021a7afa7aab9937439 | 115,084,625,271,197,920,000,000,000,000,000,000,000 | 63 | tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However... |
static struct mm_struct *dup_mm(struct task_struct *tsk,
struct mm_struct *oldmm)
{
struct mm_struct *mm;
int err;
mm = allocate_mm();
if (!mm)
goto fail_nomem;
memcpy(mm, oldmm, sizeof(*mm));
if (!mm_init(mm, tsk, mm->user_ns))
goto fail_nomem;
err = dup_mmap(mm, oldmm);
if (err)
goto free_pt;
... | 0 | [
"CWE-665",
"CWE-362"
] | linux | b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948 | 178,613,092,377,952,000,000,000,000,000,000,000,000 | 36 | fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent
current->group_leader->exit_signal may change during copy_process() if
current->real_parent exits.
Move the assignment inside tasklist_lock to avoid the race.
Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com>
Acked-by: Oleg Nesterov <oleg@redhat.... |
vte_sequence_handler_character_attributes (VteTerminal *terminal, GValueArray *params)
{
unsigned int i;
GValue *value;
long param;
/* The default parameter is zero. */
param = 0;
/* Step through each numeric parameter. */
for (i = 0; (params != NULL) && (i < params->n_values); i++) {
/* If this parameter isn'... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 267,775,745,037,955,500,000,000,000,000,000,000,000 | 163 | fix bug #548272
svn path=/trunk/; revision=2365 |
OVS_REQUIRES(ct->buckets[*bucket].lock)
{
if ((ctx_in->key.dl_type == htons(ETH_TYPE_IP) &&
!pkt->md.ct_orig_tuple.ipv4.ipv4_proto) ||
(ctx_in->key.dl_type == htons(ETH_TYPE_IPV6) &&
!pkt->md.ct_orig_tuple.ipv6.ipv6_proto) ||
!(pkt->md.ct_state & (CS_SRC_NAT | CS_DST_NAT)) ||
... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 75,549,912,442,457,110,000,000,000,000,000,000,000 | 57 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static int adjust_insn_aux_data(struct bpf_verifier_env *env,
struct bpf_prog *new_prog, u32 off, u32 cnt)
{
struct bpf_insn_aux_data *new_data, *old_data = env->insn_aux_data;
struct bpf_insn *insn = new_prog->insnsi;
u32 prog_len;
int i;
/* aux info at OFF always needs adjustment, no matter fast path
* (c... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 235,834,669,823,158,500,000,000,000,000,000,000,000 | 32 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
static TEE_Result put_user_u64(uint64_t *dst, size_t value)
{
uint64_t v = value;
return tee_svc_copy_to_user(dst, &v, sizeof(v));
} | 0 | [
"CWE-327"
] | optee_os | 34a08bec755670ea0490cb53bbc68058cafc69b6 | 6,237,434,061,734,056,000,000,000,000,000,000,000 | 6 | cryp: prevent direct calls to update and final functions
With inconsistent or malformed data it has been possible to call
"update" and "final" crypto functions directly. Using a fuzzer tool [1]
we have seen that this results in asserts, i.e., a crash that
potentially could leak sensitive information.
By setting the s... |
static inline void *vmemmap_alloc_block_buf(unsigned long size, int node)
{
return __vmemmap_alloc_block_buf(size, node, NULL);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 330,515,175,176,426,240,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static void analyzeAggregatesInSelectEnd(Walker *pWalker, Select *pSelect){
UNUSED_PARAMETER(pSelect);
pWalker->walkerDepth--;
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 249,762,883,239,398,800,000,000,000,000,000,000,000 | 4 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
eval_command()
{
char *command;
c_token++;
command = try_to_get_string();
if (!command)
int_error(c_token, "Expected command string");
do_string_and_free(command);
} | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 331,848,401,362,404,930,000,000,000,000,000,000,000 | 9 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
void RemoteFsDevice::unmount()
{
if (details.isLocalFile()) {
return;
}
if (!isConnected() || proc) {
return;
}
if (messageSent) {
return;
}
if (constSambaProtocol==details.url.scheme() || constSambaAvahiProtocol==details.url.scheme()) {
mounter()->umount(mo... | 1 | [
"CWE-20",
"CWE-22"
] | cantata | afc4f8315d3e96574925fb530a7004cc9e6ce3d3 | 319,587,890,022,697,840,000,000,000,000,000,000,000 | 42 | Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested |
static size_t send_control_msg(VirtIOSerial *vser, void *buf, size_t len)
{
VirtQueueElement elem;
VirtQueue *vq;
vq = vser->c_ivq;
if (!virtio_queue_ready(vq)) {
return 0;
}
if (!virtqueue_pop(vq, &elem)) {
return 0;
}
memcpy(elem.in_sg[0].iov_base, buf, len);
vir... | 1 | [
"CWE-120",
"CWE-787"
] | qemu | 7882080388be5088e72c425b02223c02e6cb4295 | 6,672,846,869,563,615,000,000,000,000,000,000,000 | 19 | virtio-serial: fix ANY_LAYOUT
Don't assume a specific layout for control messages.
Required by virtio 1.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com> |
static int is_same_colorspace(i_ctx_t * i_ctx_p, ref *space1, ref *space2, bool isCIE)
{
PS_colour_space_t *oldcspace = 0, *newcspace = 0;
ref oldspace, *poldspace = &oldspace, newspace, *pnewspace = &newspace;
int code, CIESubst;
/* Silence compiler warnings */
oldspace.tas.type_attrs = 0;
old... | 0 | [] | ghostpdl | b326a71659b7837d3acde954b18bda1a6f5e9498 | 98,548,873,122,142,220,000,000,000,000,000,000,000 | 79 | Bug 699655: Properly check the return value....
...when getting a value from a dictionary |
long vorbis_book_decode(codebook *book, oggpack_buffer *b){
if(book->used_entries>0){
long packed_entry=decode_packed_entry_number(book,b);
if(packed_entry>=0)
return(book->dec_index[packed_entry]);
}
/* if there's no dec_index, the codebook unpacking isn't collapsed */
return(-1);
} | 0 | [
"CWE-787"
] | vorbis | 667ceb4aab60c1f74060143bb24e5f427b3cce5f | 3,044,463,416,780,379,000,000,000,000,000,000,000 | 10 | CVE-2018-5146: Prevent out-of-bounds write in codebook decoding.
Codebooks that are not an exact divisor of the partition size are now
truncated to fit within the partition. |
format_quote(const char *s)
{
const char *cp;
char *out, *at;
at = out = xmalloc(strlen(s) * 2 + 1);
for (cp = s; *cp != '\0'; cp++) {
if (strchr("|&;<>()$`\\\"'*?[# =%", *cp) != NULL)
*at++ = '\\';
*at++ = *cp;
}
*at = '\0';
return (out);
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 244,103,444,937,137,000,000,000,000,000,000,000,000 | 14 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
static void store_adapter_info(struct btd_adapter *adapter)
{
GKeyFile *key_file;
char filename[PATH_MAX];
char *str;
gsize length = 0;
gboolean discoverable;
key_file = g_key_file_new();
if (adapter->pairable_timeout != btd_opts.pairto)
g_key_file_set_integer(key_file, "General", "PairableTimeout",
ada... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 27,905,480,371,991,140,000,000,000,000,000,000,000 | 43 | 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 void prepare_playback_urb(struct snd_usb_substream *subs,
struct urb *urb)
{
struct snd_pcm_runtime *runtime = subs->pcm_substream->runtime;
struct snd_usb_endpoint *ep = subs->data_endpoint;
struct snd_urb_ctx *ctx = urb->context;
unsigned int counts, frames, bytes;
int i, stride, period_elapsed = 0;
... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 2,516,608,808,618,230,500,000,000,000,000,000,000 | 108 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
static int rc_table_update(struct qcow_state *s, unsigned int rc_index, uint64_t refblock_offset)
{
ssize_t ret;
tcmu_dbg("%s: setting RC[%d] to %llx\n", __func__, rc_index, refblock_offset);
s->refcount_table[rc_index] = htobe64(refblock_offset);
ret = pwrite(s->fd,
&s->refcount_table[rc_index],
sizeof(uint6... | 0 | [
"CWE-200"
] | tcmu-runner | 8cf8208775022301adaa59c240bb7f93742d1329 | 302,774,047,603,199,960,000,000,000,000,000,000,000 | 18 | removed all check_config callback implementations to avoid security issues
see github issue #194
qcow.c contained an information leak, could test for existance of any
file in the system
file_example.c and file_optical.c allow also to test for existance of
any file, plus to temporarily create empty new files anywhere... |
queue_local_notify(xmlNode * notify_src, const char *client_id, gboolean sync_reply, gboolean from_peer)
{
cib_local_notify_t *notify = calloc(1, sizeof(cib_local_notify_t));
notify->notify_src = notify_src;
notify->client_id = strdup(client_id);
notify->sync_reply = sync_reply;
notify->from_peer =... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 54,423,602,791,311,270,000,000,000,000,000,000,000 | 16 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
const xmlChar *value,
xmlSchemaValPtr *val)
{
int ret = 0;
xmlSchemaNodeInfoPtr inode = vctxt->inode;
/*
* cos-valid-default:
* Schema Component Constraint: Element Default Valid (Immediate)
* For a string to be a vali... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 201,094,507,568,037,460,000,000,000,000,000,000,000 | 62 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static void fault_status_analysis(uint32_t status)
{
if (dma_fsts_pfo(status)) {
pr_info("Primary Fault Overflow");
}
if (dma_fsts_ppf(status)) {
pr_info("Primary Pending Fault");
}
if (dma_fsts_afo(status)) {
pr_info("Advanced Fault Overflow");
}
if (dma_fsts_apf(status)) {
pr_info("Advanced Pending ... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 99,349,364,213,728,660,000,000,000,000,000,000,000 | 34 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
PerspectiveCamera()
: aspectRatio(0.0),
yfov(0.0),
zfar(0.0) // 0 = use infinite projecton matrix
,
znear(0.0) {} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 189,030,737,080,876,850,000,000,000,000,000,000,000 | 6 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
int ssl3_setup_buffers(SSL *s)
{
unsigned char *p;
size_t len,align=0;
#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
align = (-SSL3_RT_HEADER_LENGTH)&(SSL3_ALIGN_PAYLOAD-1);
#endif
if (s->s3->rbuf.buf == NULL)
{
len = SSL3_RT_MAX_PLAIN_LENGTH
+ SSL3_RT_MAX_ENCRYPTED_OVERHEAD
+ SSL3_RT_HEADER... | 1 | [] | openssl | 8671b898609777c95aedf33743419a523874e6e8 | 229,654,856,394,176,250,000,000,000,000,000,000,000 | 52 | Memory saving patch. |
static int blk_mq_sched_alloc_tags(struct request_queue *q,
struct blk_mq_hw_ctx *hctx,
unsigned int hctx_idx)
{
struct blk_mq_tag_set *set = q->tag_set;
int ret;
hctx->sched_tags = blk_mq_alloc_rq_map(set, hctx_idx, q->nr_requests,
set->reserved_tags);
if (!hctx->sched_tags)
return -EN... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 194,088,719,037,345,400,000,000,000,000,000,000,000 | 18 | 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 bool io_wq_worker_wake(struct io_worker *worker, void *data)
{
wake_up_process(worker->task);
return false;
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 16,703,809,572,248,430,000,000,000,000,000,000,000 | 5 | 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... |
static inline u16 kvm_read_gs(void)
{
u16 seg;
asm("mov %%gs, %0" : "=g"(seg));
return seg;
} | 1 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 46,310,731,353,131,930,000,000,000,000,000,000,000 | 6 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
OVS_REQUIRES(ctb->lock)
{
struct conn *conn = NULL;
HMAP_FOR_EACH_WITH_HASH (conn, node, hash, &ctb->connections) {
if (!conn_key_cmp(&conn->key, key)
&& conn->conn_type == CT_CONN_TYPE_DEFAULT) {
break;
}
if (!conn_key_cmp(&conn->rev_key, key)
&&... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 248,638,606,545,604,800,000,000,000,000,000,000,000 | 16 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static void set_error_detail(vpx_codec_alg_priv_t *ctx,
const char *const error) {
ctx->base.err_detail = error;
} | 0 | [
"CWE-125"
] | libvpx | 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 | 258,319,734,987,056,630,000,000,000,000,000,000,000 | 4 | vp9: fix OOB read in decoder_peek_si_internal
Profile 1 or 3 bitstreams may require 11 bytes for the header in the
intra-only case.
Additionally add a check on the bit reader's error handler callback to
ensure it's non-NULL before calling to avoid future regressions.
This has existed since at least (pre-1.4.0):
09bf... |
image_is_loadable(EFI_IMAGE_OPTIONAL_HEADER_UNION *PEHdr)
{
/* If the machine type doesn't match the binary, bail, unless
* we're in an allowed 64-on-32 scenario */
if (PEHdr->Pe32.FileHeader.Machine != machine_type) {
if (!(machine_type == IMAGE_FILE_MACHINE_I386 &&
PEHdr->Pe32.FileHeader.Machine == IMAG... | 0 | [
"CWE-787"
] | shim | 159151b6649008793d6204a34d7b9c41221fb4b0 | 339,998,035,067,726,700,000,000,000,000,000,000,000 | 31 | Also avoid CVE-2022-28737 in verify_image()
PR 446 ("Add verify_image") duplicates some of the code affected by
Chris Coulson's defense in depth patch against CVE-2022-28737 ("pe:
Perform image verification earlier when loading grub").
This patch makes the same change to the new function.
Signed-off-by: Peter Jones ... |
local void compress_thread(void *dummy)
{
struct job *job; /* job pulled and working on */
struct job *here, **prior; /* pointers for inserting in write list */
unsigned long check; /* check value of input */
unsigned char *next; /* pointer for blocks, check val... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 46,851,686,002,619,440,000,000,000,000,000,000,000 | 221 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... |
DEFUN (clear_ip_bgp_instance_all_ipv4_soft,
clear_ip_bgp_instance_all_ipv4_soft_cmd,
"clear ip bgp view WORD * ipv4 (unicast|multicast) soft",
CLEAR_STR
IP_STR
BGP_STR
"BGP view\n"
"view name\n"
"Clear all peers\n"
"Address family\n"
"Address Family ... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 300,200,005,477,481,530,000,000,000,000,000,000,000 | 21 | [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... |
static void nfs41_sequence_prepare(struct rpc_task *task, void *data)
{
struct nfs4_sequence_data *calldata = data;
struct nfs_client *clp = calldata->clp;
struct nfs4_sequence_args *args;
struct nfs4_sequence_res *res;
args = task->tk_msg.rpc_argp;
res = task->tk_msg.rpc_resp;
nfs4_setup_sequence(clp, args, r... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 261,673,475,916,016,430,000,000,000,000,000,000,000 | 12 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
translate_compat_table(struct net *net,
struct xt_table_info **pinfo,
void **pentry0,
const struct compat_ip6t_replace *compatr)
{
unsigned int i, j;
struct xt_table_info *newinfo, *info;
void *pos, *entry0, *entry1;
struct compat_ip6t_entry *iter0;
struct ip6t_replace repl;
unsigned in... | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 43,123,435,538,264,040,000,000,000,000,000,000,000 | 92 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
ldns_rr_set_question(ldns_rr *rr, bool question)
{
rr->_rr_question = question;
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 121,038,872,975,613,510,000,000,000,000,000,000,000 | 4 | CAA and URI |
static void execlists_context_destroy(struct kref *kref)
{
struct intel_context *ce = container_of(kref, typeof(*ce), ref);
GEM_BUG_ON(!i915_active_is_idle(&ce->active));
GEM_BUG_ON(intel_context_is_pinned(ce));
if (ce->state)
__execlists_context_fini(ce);
intel_context_fini(ce);
intel_context_free(ce);
} | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 118,657,289,624,401,530,000,000,000,000,000,000,000 | 13 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
enter_record(struct ftrace_hash *hash, struct dyn_ftrace *rec, int not)
{
struct ftrace_func_entry *entry;
int ret = 0;
entry = ftrace_lookup_ip(hash, rec->ip);
if (not) {
/* Do nothing if it doesn't exist */
if (!entry)
return 0;
free_hash_entry(hash, entry);
} else {
/* Do nothing if it exists */
... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 146,794,801,220,851,840,000,000,000,000,000,000,000 | 21 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static void CreateDecodeTables ( Int32 *limit,
Int32 *base,
Int32 *perm,
UChar *length,
Int32 minLen,
Int32 maxLen,
Int32 alphaS... | 0 | [] | clamav-devel | fcd8091474d12592d509adcfd0bdd0b0dc8835f5 | 121,883,695,378,767,330,000,000,000,000,000,000,000 | 31 | bb#2230-2231 |
static void
e1000e_set_itr(E1000ECore *core, int index, uint32_t val)
{
uint32_t interval = val & 0xffff;
trace_e1000e_irq_itr_set(val);
core->itr_guest_value = interval;
core->mac[index] = MAX(interval, E1000E_MIN_XITR); | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 170,719,050,918,522,100,000,000,000,000,000,000,000 | 9 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
gpgsm_get_fingerprint (ksba_cert_t cert, int algo,
unsigned char *array, int *r_len)
{
gcry_md_hd_t md;
int rc, len;
if (!algo)
algo = GCRY_MD_SHA1;
len = gcry_md_get_algo_dlen (algo);
assert (len);
if (!array)
array = xmalloc (len);
if (r_len)
*r_len = len;
/* Fis... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 251,854,364,226,614,300,000,000,000,000,000,000,000 | 56 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
build_gs_outline_font(i_ctx_t *i_ctx_p, os_ptr op, gs_font_base ** ppfont,
font_type ftype, gs_memory_type_ptr_t pstype,
const build_proc_refs * pbuild,
build_font_options_t options,
build_base_font_proc_t build_base_font)
{
int... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 144,598,084,987,386,070,000,000,000,000,000,000,000 | 25 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
routerstatus_sl_choose_by_bandwidth(smartlist_t *sl,
bandwidth_weight_rule_t rule)
{
/* We are choosing neither exit nor guard here. Weight accordingly. */
routerstatus_t *ret;
if ((ret = smartlist_choose_by_bandwidth_weights(sl, rule, 1))) {
return ret;
} else {
retu... | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 297,254,419,290,174,150,000,000,000,000,000,000,000 | 11 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
bool tcp_oow_rate_limited(struct net *net, const struct sk_buff *skb,
int mib_idx, u32 *last_oow_ack_time)
{
/* Data packets without SYNs are not likely part of an ACK loop. */
if ((TCP_SKB_CB(skb)->seq != TCP_SKB_CB(skb)->end_seq) &&
!tcp_hdr(skb)->syn)
goto not_rate_limited;
if (*last_oow_ack_time) {
... | 0 | [
"CWE-200"
] | net | 75ff39ccc1bd5d3c455b6822ab09e533c551f758 | 135,075,648,457,358,700,000,000,000,000,000,000,000 | 22 | tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
s... |
static BlockErrorAction mirror_error_action(MirrorBlockJob *s, bool read,
int error)
{
s->synced = false;
s->actively_synced = false;
if (read) {
return block_job_error_action(&s->common, s->on_source_error,
true, erro... | 0 | [
"CWE-476"
] | qemu | 66fed30c9cd11854fc878a4eceb507e915d7c9cd | 69,625,055,786,710,960,000,000,000,000,000,000,000 | 13 | block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()
In mirror_iteration() we call mirror_wait_on_conflicts() with
`self` parameter set to NULL.
Starting from commit d44dae1a7c we dereference `self` pointer in
mirror_wait_on_conflicts() without checks if it is not NULL.
Backtrace:
Program termi... |
static int opfbstp(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_MEMORY &&
op->operands[0].type & OT_TBYTE ) {
data[l++] = 0xdf;
data[l++] = 0x30 | op->operands[0].regs[0];
} else {
return -1;
}
break;
default:
retur... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | radare2 | 9b46d38dd3c4de6048a488b655c7319f845af185 | 54,858,160,886,257,040,000,000,000,000,000,000,000 | 17 | Fix #12372 and #12373 - Crash in x86 assembler (#12380)
0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL-
leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- |
check_and_update_table_version(THD *thd,
TABLE_LIST *tables, TABLE_SHARE *table_share)
{
if (! tables->is_table_ref_id_equal(table_share))
{
if (thd->m_reprepare_observer &&
thd->m_reprepare_observer->report_error(thd))
{
/*
Version of the table share is ... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 31,931,910,984,902,760,000,000,000,000,000,000,000 | 23 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
static void test_fetch_tiny()
{
int rc;
myheader("test_fetch_tiny");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 tinyint unsigned, \
c2 tinyint, \
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 1,719,454,898,035,742,000,000,000,000,000,000,000 | 21 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
if (icsk->icsk_af_ops->compat_setsockopt)
return icsk->icsk_af_ops->compat_setsockopt(sk, level, optname,
optval, optlen);... | 0 | [
"CWE-200",
"CWE-415"
] | linux | 657831ffc38e30092a2d5f03d385d710eb88b09a | 63,809,148,029,820,100,000,000,000,000,000,000,000 | 11 | dccp/tcp: do not inherit mc_list from parent
syzkaller found a way to trigger double frees from ip_mc_drop_socket()
It turns out that leave a copy of parent mc_list at accept() time,
which is very bad.
Very similar to commit 8b485ce69876 ("tcp: do not inherit
fastopen_req from parent")
Initial report from Pray3r, c... |
RZ_API RZ_OWN RzList /*<RzBinImport *>*/ *rz_bin_dex_imports(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexFieldId *field_id;
DexMethodId *method_id;
DexClassDef *class_def;
RzList *imports = NULL;
ut32 *class_ids = NULL;
void **vit;
ut32 n_classes = rz_pvector_len(dex->class_defs);
if (n_... | 0 | [
"CWE-787"
] | rizin | 1524f85211445e41506f98180f8f69f7bf115406 | 38,553,225,858,468,773,000,000,000,000,000,000,000 | 135 | fix #2969 - oob write (1 byte) in dex.c |
static char *list_of_tainted_modules(const char *proc_modules)
{
struct strbuf *result = strbuf_new();
const char *p = proc_modules;
for (;;)
{
const char *end = strchrnul(p, '\n');
const char *paren = strchrnul(p, '(');
/* We look for a line with this format:
* "kvm_in... | 0 | [
"CWE-200"
] | abrt | 8939398b82006ba1fec4ed491339fc075f43fc7c | 78,689,114,063,958,760,000,000,000,000,000,000,000 | 39 | make the dump directories owned by root by default
It was discovered that the abrt event scripts create a user-readable
copy of a sosreport file in abrt problem directories, and include
excerpts of /var/log/messages selected by the user-controlled process
name, leading to an information disclosure.
This issue was dis... |
PackLinuxElf32::PackLinuxElf32help1(InputFile *f)
{
e_type = get_te16(&ehdri.e_type);
e_phnum = get_te16(&ehdri.e_phnum);
e_shnum = get_te16(&ehdri.e_shnum);
unsigned const e_phentsize = get_te16(&ehdri.e_phentsize);
if (ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32
|| sizeof(Elf3... | 0 | [] | upx | 77c914bce58aab9459029bed699f2bfb7ff2f90f | 175,684,509,635,683,000,000,000,000,000,000,000,000 | 85 | Check de-compressed SHT_SYMTAB
https://github.com/upx/upx/issues/396
modified: p_lx_elf.cpp |
dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, guint8 *drep _U_, char **data,
int hf_name)
{
gint len, remaining;
char *text;
if (offset % 2)
offset += 2 - (offset % 2);
/* Get remaining data in buffer as a string */
remaining = tvb_reported_length_rem... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 100,216,235,252,728,530,000,000,000,000,000,000,000 | 31 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
ex_oldfiles(exarg_T *eap UNUSED)
{
list_T *l = get_vim_var_list(VV_OLDFILES);
listitem_T *li;
int nr = 0;
char_u *fname;
if (l == NULL)
msg(_("No old files"));
else
{
msg_start();
msg_scroll = TRUE;
for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
{
++nr;
fna... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 266,905,652,274,089,530,000,000,000,000,000,000,000 | 57 | 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. |
ecma_op_iterator_set_index (ecma_object_t *iter_obj_p, /**< iterator object pointer */
uint32_t index) /* iterator index to set */
{
if (JERRY_UNLIKELY (index >= ECMA_ITERATOR_INDEX_LIMIT))
{
/* After the ECMA_ITERATOR_INDEX_LIMIT limit is reached the [[%Iterator%NextIndex]]
p... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703"
] | jerryscript | c2b662170245a16f46ce02eae68815c325d99821 | 174,747,781,889,239,300,000,000,000,000,000,000,000 | 27 | Fix adding entries to the internal buffer of a Map object (#3805)
When appending the key/value pair separately, garbage collection could be
triggered before the value is added, which could cause problems during
marking. This patch changes insertion to add both values at the same
time, which prevents partial entries... |
do_invoke_method (VerifyContext *ctx, int method_token, gboolean virtual)
{
int param_count, i;
MonoMethodSignature *sig;
ILStackDesc *value;
MonoMethod *method;
gboolean virt_check_this = FALSE;
gboolean constrained = ctx->prefix_set & PREFIX_CONSTRAINED;
if (!(method = verifier_load_method (ctx, method_token,... | 0 | [
"CWE-20"
] | mono | cf1ec146f7c6acdc6697032b3aaafc68ffacdcac | 176,283,418,510,785,830,000,000,000,000,000,000,000 | 156 | 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 |
MagickExport Image *FlopImage(const Image *image,ExceptionInfo *exception)
{
#define FlopImageTag "Flop/Image"
CacheView
*flop_view,
*image_view;
Image
*flop_image;
MagickBooleanType
status;
MagickOffsetType
progress;
RectangleInfo
page;
ssize_t
y;
assert(image != (cons... | 0 | [
"CWE-190"
] | ImageMagick | 64dc80b2e1907f7f20bf34d4df9483f938b0de71 | 232,676,419,733,075,800,000,000,000,000,000,000,000 | 110 | https://github.com/ImageMagick/ImageMagick/issues/1731 |
void *idr_find(struct idr *idp, int id)
{
int n;
struct idr_layer *p;
p = rcu_dereference_raw(idp->top);
if (!p)
return NULL;
n = (p->layer+1) * IDR_BITS;
/* Mask off upper bits we don't use for the search. */
id &= MAX_IDR_MASK;
if (id >= (1 << n))
return NULL;
BUG_ON(n == 0);
while (n > 0 && p) {
... | 1 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 332,991,693,659,006,940,000,000,000,000,000,000,000 | 24 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
int Http2Handler::submit_push_promise(Stream *stream,
const StringRef &push_path) {
auto authority = stream->header.authority;
if (authority.empty()) {
authority = stream->header.host;
}
auto scheme = get_config()->no_tls ? StringRef::from_lit("http")
... | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 146,576,749,677,886,230,000,000,000,000,000,000,000 | 37 | Don't read too greedily |
struct bio *bio_copy_kern(struct request_queue *q, void *data, unsigned int len,
gfp_t gfp_mask, int reading)
{
unsigned long kaddr = (unsigned long)data;
unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
unsigned long start = kaddr >> PAGE_SHIFT;
struct bio *bio;
void *p = data;
int nr_pages ... | 0 | [
"CWE-772",
"CWE-787"
] | linux | 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 | 323,726,809,225,423,000,000,000,000,000,000,000,000 | 56 | fix unbalanced page refcounting in bio_map_user_iov
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if
IO vector has small consecutive buffers belonging to the same page.
bio_add_pc_page merges them into one, but the page reference is never
dropped.
Cc: stable@vger.kernel.org
Signed-off-by: Vitaly... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.